summaryrefslogtreecommitdiffstats
path: root/logic/lists/InstanceList.h
diff options
context:
space:
mode:
Diffstat (limited to 'logic/lists/InstanceList.h')
-rw-r--r--logic/lists/InstanceList.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/logic/lists/InstanceList.h b/logic/lists/InstanceList.h
index 0ce808e5..ebe3e051 100644
--- a/logic/lists/InstanceList.h
+++ b/logic/lists/InstanceList.h
@@ -18,7 +18,7 @@
#include <QObject>
#include <QAbstractListModel>
#include <QSet>
-#include "categorizedsortfilterproxymodel.h"
+#include <gui/groupview/GroupedProxyModel.h>
#include <QIcon>
#include "logic/BaseInstance.h"
@@ -27,11 +27,24 @@ class BaseInstance;
class QDir;
+struct FTBRecord
+{
+ QString dirName;
+ QString name;
+ QString logo;
+ QString mcVersion;
+ QString description;
+ QString instanceDir;
+ QString templateDir;
+};
+
class InstanceList : public QAbstractListModel
{
Q_OBJECT
private:
void loadGroupList(QMap<QString, QString> &groupList);
+ QList<FTBRecord> discoverFTBInstances();
+ void loadFTBInstances(QMap<QString, QString> &groupMap, QList<InstancePtr> & tempList);
private
slots:
@@ -109,7 +122,6 @@ slots:
* \brief Loads the instance list. Triggers notifications.
*/
InstListError loadList();
- void loadForgeInstances(QMap<QString, QString> groupMap);
private
slots:
@@ -120,7 +132,7 @@ slots:
private:
int getInstIndex(BaseInstance *inst) const;
- void continueProcessInstance(BaseInstance *instPtr, const int error, const QDir &dir,
+ bool continueProcessInstance(BaseInstance *instPtr, const int error, const QDir &dir,
QMap<QString, QString> &groupMap);
protected:
@@ -129,7 +141,7 @@ protected:
QSet<QString> m_groups;
};
-class InstanceProxyModel : public KCategorizedSortFilterProxyModel
+class InstanceProxyModel : public GroupedProxyModel
{
public:
explicit InstanceProxyModel(QObject *parent = 0);