diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-03 13:49:56 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-03 13:56:58 +0200 |
commit | 2085b83960cbb8e4693cf48a5bd265aa946256de (patch) | |
tree | 58f5d6f7ff18cd63ac0aa8827dadfbb66e269083 /framework/src/domain/daylongeventmodel.h | |
parent | 064367aec304708591f5cd4d010ed462119a0323 (diff) | |
download | kube-2085b83960cbb8e4693cf48a5bd265aa946256de.tar.gz kube-2085b83960cbb8e4693cf48a5bd265aa946256de.zip |
Weekview with calendar colors
Diffstat (limited to 'framework/src/domain/daylongeventmodel.h')
-rw-r--r-- | framework/src/domain/daylongeventmodel.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/framework/src/domain/daylongeventmodel.h b/framework/src/domain/daylongeventmodel.h index 21bcbfba..12827bef 100644 --- a/framework/src/domain/daylongeventmodel.h +++ b/framework/src/domain/daylongeventmodel.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <QSortFilterProxyModel> | 28 | #include <QSortFilterProxyModel> |
29 | #include <QVector> | 29 | #include <QVector> |
30 | 30 | ||
31 | class EntityCacheInterface; | ||
31 | class KUBE_EXPORT DayLongEventModel : public QSortFilterProxyModel | 32 | class KUBE_EXPORT DayLongEventModel : public QSortFilterProxyModel |
32 | { | 33 | { |
33 | Q_OBJECT | 34 | Q_OBJECT |
@@ -37,6 +38,7 @@ class KUBE_EXPORT DayLongEventModel : public QSortFilterProxyModel | |||
37 | 38 | ||
38 | public: | 39 | public: |
39 | using Event = Sink::ApplicationDomain::Event; | 40 | using Event = Sink::ApplicationDomain::Event; |
41 | using Calendar = Sink::ApplicationDomain::Calendar; | ||
40 | 42 | ||
41 | enum Roles | 43 | enum Roles |
42 | { | 44 | { |
@@ -44,6 +46,7 @@ public: | |||
44 | Description, | 46 | Description, |
45 | StartDate, | 47 | StartDate, |
46 | Duration, | 48 | Duration, |
49 | Color | ||
47 | }; | 50 | }; |
48 | Q_ENUM(Roles); | 51 | Q_ENUM(Roles); |
49 | 52 | ||
@@ -62,7 +65,10 @@ public: | |||
62 | void setPeriodLength(int); | 65 | void setPeriodLength(int); |
63 | 66 | ||
64 | private: | 67 | private: |
68 | QByteArray getColor(const QByteArray &calendar) const; | ||
69 | |||
65 | QSharedPointer<QAbstractItemModel> mModel; | 70 | QSharedPointer<QAbstractItemModel> mModel; |
71 | QSharedPointer<EntityCacheInterface> mCalendarCache; | ||
66 | 72 | ||
67 | QDate mPeriodStart; | 73 | QDate mPeriodStart; |
68 | int mPeriodLength = 7; | 74 | int mPeriodLength = 7; |