┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmodel.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-02-26 06:33:21 +0000
committerPeter Penz <[email protected]>2008-02-26 06:33:21 +0000
commit1da13e6e47d62f562e77ab2862ee1a2890f879bf (patch)
treefe665934f6a09cc846d55f5d462eec6d0184c321 /src/dolphinmodel.h
parent3dc1043b73f7b76e29f7d6fe5cf7842d8d9204a3 (diff)
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. 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
Diffstat (limited to 'src/dolphinmodel.h')
-rw-r--r--src/dolphinmodel.h10
1 files changed, 7 insertions, 3 deletions
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