]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemmodelbase.h
Merge remote-tracking branch 'origin/KDE/4.11'
[dolphin.git] / src / kitemviews / kitemmodelbase.h
index 52fcaee36dcb08cb811d713c4909bf6ad577d897..7545192da411dbe79724775f7e1331efa02e55fa 100644 (file)
@@ -63,7 +63,7 @@ class LIBDOLPHINPRIVATE_EXPORT KItemModelBase : public QObject
 
 public:
     KItemModelBase(QObject* parent = 0);
-    KItemModelBase(const QByteArray& sortRole, QObject* parent = 0);
+    explicit KItemModelBase(const QByteArray& sortRole, QObject* parent = 0);
     virtual ~KItemModelBase();
 
     /** @return The number of items. */
@@ -154,7 +154,8 @@ public:
     /**
      * @return MIME-data for the items given by \a indexes. The default implementation
      *         returns 0. The ownership of the returned instance is in the hand of the
-     *         caller of this method.
+     *         caller of this method. The method must be implemented if dragging of
+     *         items should be possible.
      */
     virtual QMimeData* createMimeData(const QSet<int>& indexes) const;
 
@@ -217,11 +218,20 @@ signals:
      * with the items 5 and 6 then the parameters look like this:
      * - itemRange: has the index 0 and a count of 7.
      * - movedToIndexes: Contains the seven values 5, 6, 2, 3, 4, 0, 1
+     *
+     * This signal implies that the groups might have changed. Therefore,
+     * gropusChanged() is not emitted if this signal is emitted.
      */
     void itemsMoved(const KItemRange& itemRange, const QList<int>& movedToIndexes);
 
     void itemsChanged(const KItemRangeList& itemRanges, const QSet<QByteArray>& roles);
 
+    /**
+     * Is emitted if the groups have changed, even though the order of the
+     * items has not been modified.
+     */
+    void groupsChanged();
+
     void groupedSortingChanged(bool current);
     void sortRoleChanged(const QByteArray& current, const QByteArray& previous);
     void sortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous);