]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kfileitemmodel.h
Interface cleanups to prepare the return of "grouped sorting"
[dolphin.git] / src / kitemviews / kfileitemmodel.h
index 4c36a2c215ea82a129fd57988f473da9122b3b87..7d10aad8e78a39d88776ec9a6ee4307a6c9d86a0 100644 (file)
@@ -54,18 +54,6 @@ public:
     virtual QHash<QByteArray, QVariant> data(int index) const;
     virtual bool setData(int index, const QHash<QByteArray, QVariant>& values);
 
-    /**
-     * @return True
-     * @reimp
-     */
-    virtual bool supportsGrouping() const;
-
-    /**
-     * @return True
-     * @reimp
-     */
-    virtual bool supportsSorting() const;
-
     /**
      * Sets a separate sorting with folders first (true) or a mixed sorting of files and folders (false).
      */
@@ -84,6 +72,9 @@ public:
     /** @reimp */
     virtual QString roleDescription(const QByteArray& role) const;
 
+    /** @reimp */
+    virtual QList<QPair<int, QVariant> > groups() const;
+
     /**
      * @return The file-item for the index \a index. If the index is in a valid
      *         range it is assured that the file-item is not null. The runtime
@@ -135,7 +126,7 @@ signals:
     void loadingCompleted();
 
 protected:
-    virtual void onGroupRoleChanged(const QByteArray& current, const QByteArray& previous);
+    virtual void onGroupedSortingChanged(bool current);
     virtual void onSortRoleChanged(const QByteArray& current, const QByteArray& previous);
     virtual void onSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous);
 
@@ -209,7 +200,6 @@ private:
     bool m_naturalSorting;
     bool m_sortFoldersFirst;
 
-    Role m_groupRole;
     Role m_sortRole;
     Qt::CaseSensitivity m_caseSensitivity;