From 57db4a7edbaa3b749ba44524d37fcc580b97fca5 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 1 Aug 2018 18:30:25 +0200 Subject: Dimm past days and show a line at the current time --- framework/src/domain/perioddayeventmodel.cpp | 3 +++ framework/src/domain/perioddayeventmodel.h | 1 + 2 files changed, 4 insertions(+) (limited to 'framework/src') 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 switch (role) { case Qt::DisplayRole: return mPeriodStart.addDays(day).toString(); + case Date: + return mPeriodStart.addDays(day); case Events: { auto result = QVariantList{}; @@ -222,6 +224,7 @@ QHash PeriodDayEventModel::roleNames() const { return { {Events, "events"}, + {Date, "date"}, {Summary, "summary"}, {Description, "description"}, {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: enum Roles { Events = Qt::UserRole + 1, + Date, Summary, Description, StartTime, -- cgit v1.2.3