summaryrefslogtreecommitdiffstats
path: root/logic/VersionFinal.h
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2014-03-14 19:51:56 +0100
committerJan Dalheimer <jan@dalheimer.de>2014-03-14 19:51:56 +0100
commite5b4dee1c05d0d6ebc0d7b2dd802b93cb8765e63 (patch)
treede2a575b630669a9a4c19866372ba95fdc7e6d4c /logic/VersionFinal.h
parentde2eb3fc5404cbbfd438919c250885e5e8450a82 (diff)
downloadMultiMC-e5b4dee1c05d0d6ebc0d7b2dd802b93cb8765e63.tar
MultiMC-e5b4dee1c05d0d6ebc0d7b2dd802b93cb8765e63.tar.gz
MultiMC-e5b4dee1c05d0d6ebc0d7b2dd802b93cb8765e63.tar.lz
MultiMC-e5b4dee1c05d0d6ebc0d7b2dd802b93cb8765e63.tar.xz
MultiMC-e5b4dee1c05d0d6ebc0d7b2dd802b93cb8765e63.zip
Move version stuff to the model and reimplement reordering
Diffstat (limited to 'logic/VersionFinal.h')
-rw-r--r--logic/VersionFinal.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/logic/VersionFinal.h b/logic/VersionFinal.h
index 99fd5ff0..fcffb3c3 100644
--- a/logic/VersionFinal.h
+++ b/logic/VersionFinal.h
@@ -41,12 +41,22 @@ public:
bool reload(const bool onlyVanilla = false, const QStringList &external = QStringList());
void clear();
- void dump() const;
-
bool canRemove(const int index) const;
QString versionFileId(const int index) const;
+ // does this instance have an all overriding custom.json
+ bool isCustom();
+ // remove custom.json
+ bool revertToBase();
+
+ enum MoveDirection { MoveUp, MoveDown };
+ void move(const int index, const MoveDirection direction);
+ void resetOrder();
+
+ // clears and reapplies all version files
+ void reapply(const bool alreadyReseting = false);
+
public
slots:
bool remove(const int index);
@@ -120,7 +130,9 @@ public:
// QList<Rule> rules;
QList<VersionFilePtr> versionFiles;
+ VersionFilePtr versionFile(const QString &id);
private:
OneSixInstance *m_instance;
+ QMap<QString, int> getExistingOrder() const;
};