summaryrefslogtreecommitdiff
path: root/src/frontend/qtwidgets/rule.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/qtwidgets/rule.h')
-rw-r--r--src/frontend/qtwidgets/rule.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/frontend/qtwidgets/rule.h b/src/frontend/qtwidgets/rule.h
new file mode 100644
index 0000000..cf9abfe
--- /dev/null
+++ b/src/frontend/qtwidgets/rule.h
@@ -0,0 +1,28 @@
+#ifndef RULE_H
+#define RULE_H
+
+#include <QDateTime>
+#include <QString>
+
+struct Rule {
+ enum When { before, after };
+ int id;
+ int entry_id;
+ When when;
+ QDateTime date;
+ QString color; // consider making this a QColor instead
+ QString highlight; // see color comment
+
+ Rule(
+ int id,
+ int entry_id,
+ When when,
+ QDateTime date = QDateTime::currentDateTime(),
+ QString color = "",
+ QString highlight = ""
+ );
+
+ static QList<Rule> rules;
+};
+
+#endif