summaryrefslogtreecommitdiff
path: root/src/modinfodialogcategories.h
diff options
context:
space:
mode:
authorJeremy Rimpo <jrim@rimpo.org>2019-07-03 10:24:14 -0500
committerGitHub <noreply@github.com>2019-07-03 10:24:14 -0500
commitefec72a85a351f53880bffdba2438f6802d4f9ab (patch)
tree94cf5dd724a16f29b458776ef5a83477ccfe2a52 /src/modinfodialogcategories.h
parent1822c1dc655e60c7693b528004ed715305df45f5 (diff)
parent7fe637ce4421e0c6d6ee6b103db5fcc4ef676c25 (diff)
Merge pull request #782 from isanae/modinfodialog-rework
Mod info dialog rework
Diffstat (limited to 'src/modinfodialogcategories.h')
-rw-r--r--src/modinfodialogcategories.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/modinfodialogcategories.h b/src/modinfodialogcategories.h
new file mode 100644
index 00000000..c8b52fec
--- /dev/null
+++ b/src/modinfodialogcategories.h
@@ -0,0 +1,27 @@
+#include "modinfodialogtab.h"
+
+class CategoryFactory;
+
+class CategoriesTab : public ModInfoDialogTab
+{
+public:
+ CategoriesTab(ModInfoDialogTabContext cx);
+
+ void clear() override;
+ void update() override;
+ bool canHandleSeparators() const override;
+ bool usesOriginFiles() const override;
+
+private:
+ void add(
+ const CategoryFactory& factory, const std::set<int>& enabledCategories,
+ QTreeWidgetItem* root, int rootLevel);
+
+ void updatePrimary();
+ void addChecked(QTreeWidgetItem* tree);
+
+ void save(QTreeWidgetItem* currentNode);
+
+ void onCategoryChanged(QTreeWidgetItem* item, int col);
+ void onPrimaryChanged(int index);
+};