summaryrefslogtreecommitdiff
path: root/src/categories.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/categories.h')
-rw-r--r--src/categories.h31
1 files changed, 14 insertions, 17 deletions
diff --git a/src/categories.h b/src/categories.h
index 67fee3e7..02695e4d 100644
--- a/src/categories.h
+++ b/src/categories.h
@@ -37,25 +37,20 @@ class CategoryFactory {
friend class CategoriesDialog;
public:
-
- static const int CATEGORY_NONE = 0;
-
- static const int CATEGORY_SPECIAL_FIRST = 10000;
- static const int CATEGORY_SPECIAL_CHECKED = CATEGORY_SPECIAL_FIRST;
- static const int CATEGORY_SPECIAL_UNCHECKED = 10001;
- static const int CATEGORY_SPECIAL_UPDATEAVAILABLE = 10002;
- static const int CATEGORY_SPECIAL_NOCATEGORY = 10003;
- static const int CATEGORY_SPECIAL_CONFLICT = 10004;
- static const int CATEGORY_SPECIAL_NOTENDORSED = 10005;
- static const int CATEGORY_SPECIAL_BACKUP = 10006;
- static const int CATEGORY_SPECIAL_MANAGED = 10007;
- static const int CATEGORY_SPECIAL_UNMANAGED = 10008;
- static const int CATEGORY_SPECIAL_NOGAMEDATA = 10009;
- static const int CATEGORY_SPECIAL_NONEXUSID = 10010;
-
+ enum SpecialCategories
+ {
+ Checked = 10000,
+ UpdateAvailable,
+ HasCategory,
+ Conflict,
+ Endorsed,
+ Backup,
+ Managed,
+ HasGameData,
+ HasNexusID
+ };
public:
-
struct Category {
Category(int sortValue, int id, const QString &name, const std::vector<int> &nexusIDs, int parentID)
: m_SortValue(sortValue), m_ID(id), m_Name(name), m_HasChildren(false),
@@ -144,6 +139,8 @@ public:
* @return QString name of the category
**/
QString getCategoryName(unsigned int index) const;
+ QString getSpecialCategoryName(SpecialCategories type) const;
+ QString getCategoryNameByID(int id) const;
/**
* @brief look up the id of a category by its index