diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-01-22 05:56:12 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-01-22 05:56:12 +0100 |
commit | 00893b3cfc68f12c09e84643d255044a488b0eb6 (patch) | |
tree | 229762a1cc56827b7bbfedd237dbf5c3bd57808c /data/instancebase.h | |
parent | f33ab9beb17bd11cb55951cb04d24cef34f6dec0 (diff) | |
download | MultiMC-00893b3cfc68f12c09e84643d255044a488b0eb6.tar MultiMC-00893b3cfc68f12c09e84643d255044a488b0eb6.tar.gz MultiMC-00893b3cfc68f12c09e84643d255044a488b0eb6.tar.lz MultiMC-00893b3cfc68f12c09e84643d255044a488b0eb6.tar.xz MultiMC-00893b3cfc68f12c09e84643d255044a488b0eb6.zip |
Instance model (or at least something like it)
Diffstat (limited to 'data/instancebase.h')
-rw-r--r-- | data/instancebase.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/data/instancebase.h b/data/instancebase.h index 8c61aee0..fa043c5f 100644 --- a/data/instancebase.h +++ b/data/instancebase.h @@ -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 |