summaryrefslogtreecommitdiff
path: root/src/frontend/qtwidgets/rulesDialog.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/rulesDialog.h
parentf820f439910ef0243e6b9aded293190341b058ac (diff)
Rearrange source file locations
Diffstat (limited to 'src/frontend/qtwidgets/rulesDialog.h')
-rw-r--r--src/frontend/qtwidgets/rulesDialog.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/frontend/qtwidgets/rulesDialog.h b/src/frontend/qtwidgets/rulesDialog.h
new file mode 100644
index 0000000..7e74dc2
--- /dev/null
+++ b/src/frontend/qtwidgets/rulesDialog.h
@@ -0,0 +1,32 @@
+#ifndef RULESDIALOG_H
+#define RULESDIALOG_H
+
+#include <QDialog>
+
+#include "entry.h"
+#include "rule.h"
+#include "ui_rulesDialog.h"
+
+// show the list of rules associated with an entry
+class RulesDialog : public QDialog {
+ Q_OBJECT
+
+ public:
+ RulesDialog(const Entry &entry);
+ void drawRules();
+
+ private:
+ Ui::rulesDialog ui;
+ int entry_id;
+ QList<Rule> rules;
+ QList<Rule> deleted_rules;
+
+ void updateRulesList();
+
+ private slots:
+ void addRule();
+ void deleteRule(int i);
+ void accept();
+};
+
+#endif