From 42adf258b65f2785bd08d6dcbdabce92187c99cf Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 11 Dec 2011 20:23:21 +0100 Subject: Remember sort settings If the user has changed the sort-role or sort-order by clicking on the view-header of the details-view, the settings have been adjusted to the model but not remembered in the directory settings. --- src/kitemviews/kitemlistheader_p.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/kitemviews/kitemlistheader_p.h') diff --git a/src/kitemviews/kitemlistheader_p.h b/src/kitemviews/kitemlistheader_p.h index a3f06f114..41505585e 100644 --- a/src/kitemviews/kitemlistheader_p.h +++ b/src/kitemviews/kitemlistheader_p.h @@ -60,6 +60,22 @@ signals: qreal currentWidth, qreal previousWidth); + /** + * Is emitted if the user has changed the sort order by clicking on a + * header item. The sort order of the model has already been adjusted to + * the current sort order. Note that no signal will be emitted if the + * sort order of the model has been changed without user interaction. + */ + void sortOrderChanged(Qt::SortOrder current, Qt::SortOrder previous); + + /** + * Is emitted if the user has changed the sort role by clicking on a + * header item. The sort role of the model has already been adjusted to + * the current sort role. Note that no signal will be emitted if the + * sort role of the model has been changed without user interaction. + */ + void sortRoleChanged(const QByteArray& current, const QByteArray& previous); + protected: virtual void mousePressEvent(QGraphicsSceneMouseEvent* event); virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); -- cgit v1.3.1