diff options
| author | Peter Penz <[email protected]> | 2011-10-29 19:50:15 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-10-29 19:52:05 +0200 |
| commit | d062256db2c0590b7628ad7dcb9e720a5ef4f4a9 (patch) | |
| tree | 1920189854157b987253179064739480a44e68ec /src/kitemviews/kitemlistview.h | |
| parent | 74bc3cac2530031c0ec78fc5039342ac0f077eb7 (diff) | |
Fix grouping-issue with not visible sorting roles
It must be assured that the data for a sorting role always is
determined even it is not shown as "additional info" in the view.
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
| -rw-r--r-- | src/kitemviews/kitemlistview.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index fd2f286db..397ecedf5 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -252,10 +252,13 @@ protected slots: virtual void slotItemsChanged(const KItemRangeList& itemRanges, const QSet<QByteArray>& roles); + virtual void slotGroupedSortingChanged(bool current); + virtual void slotSortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous); + virtual void slotSortRoleChanged(const QByteArray& current, const QByteArray& previous); + virtual void slotCurrentChanged(int current, int previous); + virtual void slotSelectionChanged(const QSet<int>& current, const QSet<int>& previous); + private slots: - void slotGroupedSortingChanged(bool current); - void slotCurrentChanged(int current, int previous); - void slotSelectionChanged(const QSet<int>& current, const QSet<int>& previous); void slotAnimationFinished(QGraphicsWidget* widget, KItemListViewAnimation::AnimationType type); void slotLayoutTimerFinished(); @@ -348,6 +351,13 @@ private: void recycleGroupHeaderForWidget(KItemListWidget* widget); /** + * Helper method for slotGroupedSortingChanged(), slotSortOrderChanged() + * and slotSortRoleChanged(): Iterates through all visible items and updates + * the group-header widgets. + */ + void updateVisibleGroupHeaders(); + + /** * @return The widths of each visible role that is shown in the KItemListHeader. */ QHash<QByteArray, qreal> headerRolesWidths() const; |
