From 3957884bf2e44619a4ed35ba0ffead519988885b Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Mon, 8 Aug 2011 23:41:18 +0200 Subject: Improvements for selections, smooth scrolling, tooltips and info-panel --- src/kitemviews/kitemmodelbase.h | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) (limited to 'src/kitemviews/kitemmodelbase.h') diff --git a/src/kitemviews/kitemmodelbase.h b/src/kitemviews/kitemmodelbase.h index 4eb96c8fd..44135d2f4 100644 --- a/src/kitemviews/kitemmodelbase.h +++ b/src/kitemviews/kitemmodelbase.h @@ -106,9 +106,46 @@ public: virtual QString roleDescription(const QByteArray& role) const; signals: + /** + * Is emitted if one or more items have been inserted. Each item-range consists + * of: + * - an index where items have been inserted + * - the number of inserted items. + * The index of each item-range represents the index of the model + * before the items have been inserted. + * + * For the item-ranges it is assured that: + * - They don't overlap + * - The index of item-range n is smaller than the index of item-range n + 1. + */ void itemsInserted(const KItemRangeList& itemRanges); + + /** + * Is emitted if one or more items have been removed. Each item-range consists + * of: + * - an index where items have been inserted + * - the number of inserted items. + * The index of each item-range represents the index of the model + * before the items have been removed. + * + * For the item-ranges it is assured that: + * - They don't overlap + * - The index of item-range n is smaller than the index of item-range n + 1. + */ void itemsRemoved(const KItemRangeList& itemRanges); - void itemsMoved(const KItemRangeList& itemRanges); + + /** + * Is emitted if one ore more items get moved. + * @param itemRanges Item-ranges that get moved to a new position. + * @param movedToIndexes New position of the ranges. + * It is assured that the itemRanges list has the same size as the movedToIndexes list. + * + * For the item-ranges it is assured that: + * - They don't overlap + * - The index of item-range n is smaller than the index of item-range n + 1. + */ + void itemsMoved(const KItemRangeList& itemRanges, const QList movedToIndexes); + void itemsChanged(const KItemRangeList& itemRanges, const QSet& roles); void groupRoleChanged(const QByteArray& current, const QByteArray& previous); -- cgit v1.3.1