GH-328 overhaul all relevant version lists

This commit is contained in:
Petr Mrázek
2015-04-28 09:01:37 +02:00
parent 75dfbc61fc
commit aea51a0876
23 changed files with 688 additions and 288 deletions

View File

@ -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.