summaryrefslogtreecommitdiff
path: root/src/frontend/qtwidgets/rule.h
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-07-23 20:37:48 -0400
committerLouie S <louie@example.com>2024-07-23 20:37:48 -0400
commitc34930425fadfc4083067b9306159cd8e8ecf6c6 (patch)
treed9c09709f1b9cf7e9bcf098d48c7036044098a7d /src/frontend/qtwidgets/rule.h
parentf820f439910ef0243e6b9aded293190341b058ac (diff)
Rearrange source file locations
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