diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-05 12:21:13 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-06 15:20:46 +0200 |
commit | bbc8fcaefa1cc4c8dafb4d1453990154c7b00d3c (patch) | |
tree | 743018b0719338cf0fc560c2a59ecc2219bb4aed /framework/src/domain/perioddayeventmodel.h | |
parent | 0d929de1743e9574f7972c9f5b84592202601a00 (diff) | |
download | kube-bbc8fcaefa1cc4c8dafb4d1453990154c7b00d3c.tar.gz kube-bbc8fcaefa1cc4c8dafb4d1453990154c7b00d3c.zip |
A calendar filter
Diffstat (limited to 'framework/src/domain/perioddayeventmodel.h')
-rw-r--r-- | framework/src/domain/perioddayeventmodel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/framework/src/domain/perioddayeventmodel.h b/framework/src/domain/perioddayeventmodel.h index 2d1d0177..2f53486c 100644 --- a/framework/src/domain/perioddayeventmodel.h +++ b/framework/src/domain/perioddayeventmodel.h | |||
@@ -86,6 +86,7 @@ class KUBE_EXPORT PeriodDayEventModel : public QAbstractItemModel | |||
86 | 86 | ||
87 | Q_PROPERTY(QVariant start READ periodStart WRITE setPeriodStart) | 87 | Q_PROPERTY(QVariant start READ periodStart WRITE setPeriodStart) |
88 | Q_PROPERTY(int length READ periodLength WRITE setPeriodLength) | 88 | Q_PROPERTY(int length READ periodLength WRITE setPeriodLength) |
89 | Q_PROPERTY(QSet<QByteArray> calendarFilter READ calendarFilter WRITE setCalendarFilter) | ||
89 | 90 | ||
90 | public: | 91 | public: |
91 | using Event = Sink::ApplicationDomain::Event; | 92 | using Event = Sink::ApplicationDomain::Event; |
@@ -122,6 +123,9 @@ public: | |||
122 | int periodLength() const; | 123 | int periodLength() const; |
123 | void setPeriodLength(int); | 124 | void setPeriodLength(int); |
124 | 125 | ||
126 | QSet<QByteArray> calendarFilter() const; | ||
127 | void setCalendarFilter(const QSet<QByteArray> &); | ||
128 | |||
125 | private: | 129 | private: |
126 | void updateQuery(); | 130 | void updateQuery(); |
127 | void partitionData(); | 131 | void partitionData(); |
@@ -137,6 +141,7 @@ private: | |||
137 | QSharedPointer<QAbstractItemModel> eventModel; | 141 | QSharedPointer<QAbstractItemModel> eventModel; |
138 | QVector<QList<QSharedPointer<Event>>> partitionedEvents; | 142 | QVector<QList<QSharedPointer<Event>>> partitionedEvents; |
139 | QSharedPointer<EntityCacheInterface> mCalendarCache; | 143 | QSharedPointer<EntityCacheInterface> mCalendarCache; |
144 | QSet<QByteArray> mCalendarFilter; | ||
140 | 145 | ||
141 | static const constexpr quintptr DAY_ID = std::numeric_limits<quintptr>::max(); | 146 | static const constexpr quintptr DAY_ID = std::numeric_limits<quintptr>::max(); |
142 | }; | 147 | }; |