summaryrefslogtreecommitdiff
path: root/src/rule.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rule.h')
-rw-r--r--src/rule.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/rule.h b/src/rule.h
new file mode 100644
index 0000000..ecd2285
--- /dev/null
+++ b/src/rule.h
@@ -0,0 +1,32 @@
+#ifndef RULE_H
+#define RULE_H
+
+#include <QDateTime>
+#include <QHBoxLayout>
+#include <QString>
+
+// rule's widgets will always be allocated, even though they are only rendered when options are open
+// TODO determine whether an alternative approach is better (same goes for group and entry)
+
+class Rule : QHBoxLayout {
+ enum When { before, after };
+
+ public:
+ int id;
+ int entry_id;
+ When when;
+ QDateTime date;
+ QString color = "";
+ QString highlight = "";
+
+ Rule(
+ int id,
+ int entry_id,
+ When when,
+ QDateTime date,
+ QString color,
+ QString highlight
+ );
+};
+
+#endif