From 471ba4cfbb161bbae0641fe26360c8218fa31ef1 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 2 Aug 2018 20:18:24 +0200 Subject: Calendar color --- common/domain/applicationdomaintype.cpp | 1 + common/domain/applicationdomaintype.h | 1 + common/domain/calendar.fbs | 1 + common/domain/typeimplementations.cpp | 1 + 4 files changed, 4 insertions(+) (limited to 'common/domain') diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index 9bc3d08..97bf9f2 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp @@ -163,6 +163,7 @@ SINK_REGISTER_PROPERTY(Todo, Calendar); SINK_REGISTER_ENTITY(Calendar); SINK_REGISTER_PROPERTY(Calendar, Name); +SINK_REGISTER_PROPERTY(Calendar, Color); static const int foo = [] { QMetaType::registerEqualsComparator(); diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 802efd8..7f214ba 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -394,6 +394,7 @@ SINK_EXPORT QDebug operator<< (QDebug d, const Contact::Email &); struct SINK_EXPORT Calendar : public Entity { SINK_ENTITY(Calendar, calendar); SINK_PROPERTY(QString, Name, name); + SINK_PROPERTY(QByteArray, Color, color); }; struct SINK_EXPORT Event : public Entity { diff --git a/common/domain/calendar.fbs b/common/domain/calendar.fbs index 9788539..375b9fb 100644 --- a/common/domain/calendar.fbs +++ b/common/domain/calendar.fbs @@ -2,6 +2,7 @@ namespace Sink.ApplicationDomain.Buffer; table Calendar { name:string; + color:string; } root_type Calendar; diff --git a/common/domain/typeimplementations.cpp b/common/domain/typeimplementations.cpp index 2b2d2ac..bb3f455 100644 --- a/common/domain/typeimplementations.cpp +++ b/common/domain/typeimplementations.cpp @@ -269,6 +269,7 @@ QMap TypeImplementation::typeDatabases() void TypeImplementation::configure(PropertyMapper &propertyMapper) { SINK_REGISTER_SERIALIZER(propertyMapper, Calendar, Name, name); + SINK_REGISTER_SERIALIZER(propertyMapper, Calendar, Color, color); } void TypeImplementation::configure(IndexPropertyMapper &) {} -- cgit v1.2.3