summaryrefslogtreecommitdiffstats
path: root/framework/src
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-01 18:30:25 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-08-01 18:30:25 +0200
commit57db4a7edbaa3b749ba44524d37fcc580b97fca5 (patch)
tree70fe6837e3aa1690054551181959893df382b67c /framework/src
parent16d30e9be08785f9f1c9f2c0b840b8793596e89a (diff)
downloadkube-57db4a7edbaa3b749ba44524d37fcc580b97fca5.tar.gz
kube-57db4a7edbaa3b749ba44524d37fcc580b97fca5.zip
Dimm past days and show a line at the current time
Diffstat (limited to 'framework/src')
-rw-r--r--framework/src/domain/perioddayeventmodel.cpp3
-rw-r--r--framework/src/domain/perioddayeventmodel.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/framework/src/domain/perioddayeventmodel.cpp b/framework/src/domain/perioddayeventmodel.cpp
index 6fd6e0ff..c5f2c197 100644
--- a/framework/src/domain/perioddayeventmodel.cpp
+++ b/framework/src/domain/perioddayeventmodel.cpp
@@ -168,6 +168,8 @@ QVariant PeriodDayEventModel::data(const QModelIndex &id, int role) const
168 switch (role) { 168 switch (role) {
169 case Qt::DisplayRole: 169 case Qt::DisplayRole:
170 return mPeriodStart.addDays(day).toString(); 170 return mPeriodStart.addDays(day).toString();
171 case Date:
172 return mPeriodStart.addDays(day);
171 case Events: { 173 case Events: {
172 auto result = QVariantList{}; 174 auto result = QVariantList{};
173 175
@@ -222,6 +224,7 @@ QHash<int, QByteArray> PeriodDayEventModel::roleNames() const
222{ 224{
223 return { 225 return {
224 {Events, "events"}, 226 {Events, "events"},
227 {Date, "date"},
225 {Summary, "summary"}, 228 {Summary, "summary"},
226 {Description, "description"}, 229 {Description, "description"},
227 {StartTime, "starts"}, 230 {StartTime, "starts"},
diff --git a/framework/src/domain/perioddayeventmodel.h b/framework/src/domain/perioddayeventmodel.h
index 672afbea..a7d9cea8 100644
--- a/framework/src/domain/perioddayeventmodel.h
+++ b/framework/src/domain/perioddayeventmodel.h
@@ -91,6 +91,7 @@ public:
91 enum Roles 91 enum Roles
92 { 92 {
93 Events = Qt::UserRole + 1, 93 Events = Qt::UserRole + 1,
94 Date,
94 Summary, 95 Summary,
95 Description, 96 Description,
96 StartTime, 97 StartTime,