mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-05 21:06:58 +03:00
Instance model (or at least something like it)
This commit is contained in:
parent
f33ab9beb1
commit
00893b3cfc
12 changed files with 1002 additions and 107 deletions
|
|
@ -20,9 +20,11 @@
|
|||
#include <QString>
|
||||
|
||||
#include "../data/inifile.h"
|
||||
#include "instancemodel.h"
|
||||
|
||||
class InstanceBase : public QObject
|
||||
class InstanceBase : public QObject, public InstanceModelItem
|
||||
{
|
||||
friend class InstanceGroup;
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit InstanceBase(QString rootDir, QObject *parent = 0);
|
||||
|
|
@ -32,13 +34,25 @@ public:
|
|||
QString getInstName() const;
|
||||
void setInstName(QString name);
|
||||
|
||||
protected:
|
||||
QString getInstID() const;
|
||||
|
||||
virtual IMI_type getModelItemType() const;
|
||||
virtual InstanceModelItem* getParent() const;
|
||||
virtual int numChildren() const;
|
||||
virtual InstanceModelItem* getChild ( int index ) const;
|
||||
virtual InstanceModel* getModel() const;
|
||||
virtual QVariant data ( int column ) const;
|
||||
virtual int getRow() const;
|
||||
|
||||
private:
|
||||
QString rootDir;
|
||||
void setGroup ( InstanceGroup* group )
|
||||
{
|
||||
currentGroup = group;
|
||||
};
|
||||
|
||||
QString rootDir;
|
||||
INIFile config;
|
||||
InstanceGroup * currentGroup;
|
||||
};
|
||||
|
||||
#endif // INSTANCEBASE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue