diff options
author | Louie S <louie@example.com> | 2024-02-21 20:43:58 -0500 |
---|---|---|
committer | Louie S <louie@example.com> | 2024-02-21 20:43:58 -0500 |
commit | e659d5be0974fab8c1cbfad4dbe9c680dfa6f374 (patch) | |
tree | f9084777019e4d8a3ad4b4293b652dc2f2919f49 /src/rule.h | |
parent | 5d1fbe2c839aa33d3855a29efc628e49a17b95f4 (diff) |
Create rule class
Diffstat (limited to 'src/rule.h')
-rw-r--r-- | src/rule.h | 32 |
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 |