summaryrefslogtreecommitdiff
path: root/src/modlist.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-01 12:24:57 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 15:38:18 +0100
commite02ba3b26d30ffb5010394992c69e94b287eacd7 (patch)
tree7b24f7a0654cf19246bf4e2f0e1afaedc86042de /src/modlist.h
parent73b4a590ca4403b0c07590f426f9b962c4c0ec6a (diff)
Some cleaning. Avoid using Qt::UserRole.
Diffstat (limited to 'src/modlist.h')
-rw-r--r--src/modlist.h32
1 files changed, 29 insertions, 3 deletions
diff --git a/src/modlist.h b/src/modlist.h
index 4b0e0157..e77ceb1f 100644
--- a/src/modlist.h
+++ b/src/modlist.h
@@ -31,6 +31,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QFile>
#include <QListWidget>
#include <QNetworkReply>
+#include <QMetaEnum>
#include <QNetworkAccessManager>
#ifndef Q_MOC_RUN
#include <boost/signals2.hpp>
@@ -56,9 +57,34 @@ class ModList : public QAbstractItemModel
public:
- // role of the index of the mod
- //
- constexpr static int IndexRole = Qt::UserRole + 1;
+ enum ModListRole {
+
+ // data(GroupingRole) contains the "group" role - This is used by the
+ // category and Nexus ID grouping proxy (but not the ByPriority proxy)
+ GroupingRole = Qt::UserRole,
+
+ IndexRole = Qt::UserRole + 1,
+
+ // data(AggrRole) contains aggregation information (for
+ // grouping I assume?)
+ AggrRole = Qt::UserRole + 2,
+
+ // data(ContentsRole) contains mod data contents as a QVariantList
+ // containing icon paths
+ ContentsRole = Qt::UserRole + 3,
+
+ NameRole = Qt::UserRole + 4,
+
+ PriorityRole = Qt::UserRole + 5,
+
+ // marking role for the scrollbar
+ ScrollMarkRole = Qt::UserRole + 6
+ };
+
+ Q_ENUM(ModListRole)
+
+ // this is the first available role
+ static const int ModUserRole;
enum EColumn {
COL_NAME,