summaryrefslogtreecommitdiffstats
path: root/logic/BaseVersionList.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-04-28 09:01:37 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-01 20:50:24 +0200
commitaea51a08763d81ce82326b2b875ace8a0039fb1a (patch)
tree7d92d2ed9500f7cd205257b79e49dd03bc84f001 /logic/BaseVersionList.h
parent75dfbc61fcc451239254049a362b227e72d94d90 (diff)
downloadMultiMC-aea51a08763d81ce82326b2b875ace8a0039fb1a.tar
MultiMC-aea51a08763d81ce82326b2b875ace8a0039fb1a.tar.gz
MultiMC-aea51a08763d81ce82326b2b875ace8a0039fb1a.tar.lz
MultiMC-aea51a08763d81ce82326b2b875ace8a0039fb1a.tar.xz
MultiMC-aea51a08763d81ce82326b2b875ace8a0039fb1a.zip
GH-328 overhaul all relevant version lists
Diffstat (limited to 'logic/BaseVersionList.h')
-rw-r--r--logic/BaseVersionList.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/logic/BaseVersionList.h b/logic/BaseVersionList.h
index 584d6ca7..6089c31c 100644
--- a/logic/BaseVersionList.h
+++ b/logic/BaseVersionList.h
@@ -41,20 +41,17 @@ class BaseVersionList : public QAbstractListModel
public:
enum ModelRoles
{
- VersionPointerRole = 0x34B1CB48
- };
-
- enum VListColumns
- {
- // First column - Name
- NameColumn = 0,
-
- // Second column - Type
- TypeColumn,
-
- // Third column - Timestamp
- TimeColumn
+ VersionPointerRole = Qt::UserRole,
+ VersionRole,
+ VersionIdRole,
+ ParentGameVersionRole,
+ RecommendedRole,
+ TypeRole,
+ BranchRole,
+ PathRole,
+ ArchitectureRole
};
+ typedef QList<ModelRoles> RoleList;
explicit BaseVersionList(QObject *parent = 0);
@@ -78,10 +75,12 @@ public:
//////// List Model Functions ////////
virtual QVariant data(const QModelIndex &index, int role) const;
- virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;
virtual int rowCount(const QModelIndex &parent) const;
virtual int columnCount(const QModelIndex &parent) const;
+ //! which roles are provided by this version list?
+ virtual RoleList providesRoles();
+
/*!
* \brief Finds a version by its descriptor.
* \param The descriptor of the version to find.