From 1da13e6e47d62f562e77ab2862ee1a2890f879bf Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 26 Feb 2008 06:33:21 +0000 Subject: When a grouping per date is done, per default the granularity is one month. This patch increases the granularity for the last month: - "Weeks" are used for the last 4 weeks excluding the current week. - "Days" are used for the current week. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Additionally some cleanups of the code has been done, as the method DolphinModel::data() was too long already. No backport will be done as new strings are introduced. The patch has been reviewed by Rafael Fernández López. BUG: 158267 svn path=/trunk/KDE/kdebase/apps/; revision=779438 --- src/dolphinmodel.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/dolphinmodel.h') diff --git a/src/dolphinmodel.h b/src/dolphinmodel.h index 4bca6aca0..abd53a7c3 100644 --- a/src/dolphinmodel.h +++ b/src/dolphinmodel.h @@ -35,12 +35,12 @@ public: ExtraColumnCount }; - DolphinModel(QObject *parent = 0); + DolphinModel(QObject* parent = 0); virtual ~DolphinModel(); - virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; - virtual int columnCount(const QModelIndex &parent = QModelIndex()) const; + virtual int columnCount(const QModelIndex& parent = QModelIndex()) const; /** * Returns the rating for the item with the index \a index. 0 is @@ -53,6 +53,10 @@ public: * tag is applied, a predefined string will be returned. */ static QString tagsForIndex(const QModelIndex& index); + +private: + QVariant displayRoleData(const QModelIndex& index) const; + QVariant sortRoleData(const QModelIndex& index) const; }; #endif // DOLPHINMODEL_H -- cgit v1.3