aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-01-20 00:26:50 +0100
committerPetr Mrázek <peterix@gmail.com>2013-01-20 00:26:50 +0100
commit3e0ba1ffd399e4d6e92ba901fc9ea07f589e2af8 (patch)
tree48e0edfb441c42bfb7c7d80489e358a9a27a59bf
parentb1d00fce8da901b31fa52ea59b4bc3c8edb9d9cc (diff)
parentb371ee1de22be6d846aa53ae5574555ca012f1c3 (diff)
downloadPrismLauncher-3e0ba1ffd399e4d6e92ba901fc9ea07f589e2af8.tar.gz
PrismLauncher-3e0ba1ffd399e4d6e92ba901fc9ea07f589e2af8.tar.bz2
PrismLauncher-3e0ba1ffd399e4d6e92ba901fc9ea07f589e2af8.zip
Merge https://github.com/Forkk/MultiMC5
-rw-r--r--MultiMC.pro18
-rw-r--r--MultiMC.pro.user2
-rw-r--r--README.md8
-rw-r--r--data/appsettings.cpp22
-rw-r--r--data/appsettings.h27
-rw-r--r--data/inifile.cpp75
-rw-r--r--data/inifile.h36
-rw-r--r--data/instancebase.cpp22
-rw-r--r--data/instancebase.h13
-rw-r--r--data/instancelist.cpp52
-rw-r--r--data/instancelist.h38
-rw-r--r--data/settingsbase.cpp22
-rw-r--r--data/settingsbase.h33
-rw-r--r--data/settingsmacros.h35
-rw-r--r--data/settingsmacrosundef.h26
-rw-r--r--data/stdinstance.cpp22
-rw-r--r--data/stdinstance.h28
-rw-r--r--gui/mainwindow.cpp8
-rw-r--r--gui/mainwindow.h7
-rw-r--r--gui/modeditwindow.cpp29
-rw-r--r--gui/modeditwindow.h37
-rw-r--r--gui/modeditwindow.ui241
-rw-r--r--gui/settingsdialog.cpp77
-rw-r--r--gui/settingsdialog.h50
-rw-r--r--gui/settingsdialog.ui541
-rw-r--r--stdinstance.cpp0
-rw-r--r--stdinstance.h0
-rw-r--r--util/pathutils.cpp5
-rw-r--r--util/pathutils.h1
29 files changed, 1453 insertions, 22 deletions
diff --git a/MultiMC.pro b/MultiMC.pro
index 6115627c..0ca6daee 100644
--- a/MultiMC.pro
+++ b/MultiMC.pro
@@ -15,13 +15,25 @@ TEMPLATE = app
SOURCES += main.cpp\
gui/mainwindow.cpp \
data/instancebase.cpp \
- util/pathutils.cpp
+ util/pathutils.cpp \
+ data/instancelist.cpp \
+ data/stdinstance.cpp \
+ data/inifile.cpp \
+ gui/settingsdialog.cpp \
+ gui/modeditwindow.cpp
HEADERS += gui/mainwindow.h \
data/instancebase.h \
util/pathutils.h \
-
-FORMS += gui/mainwindow.ui
+ data/instancelist.h \
+ data/stdinstance.h \
+ data/inifile.h \
+ gui/settingsdialog.h \
+ gui/modeditwindow.h
+
+FORMS += gui/mainwindow.ui \
+ gui/settingsdialog.ui \
+ gui/modeditwindow.ui
RESOURCES += \
multimc.qrc
diff --git a/MultiMC.pro.user b/MultiMC.pro.user
index c72c06aa..21852a10 100644
--- a/MultiMC.pro.user
+++ b/MultiMC.pro.user
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
-<!-- Written by Qt Creator 2.6.1, 2013-01-09T12:15:16. -->
+<!-- Written by Qt Creator 2.6.1, 2013-01-15T19:01:37. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..6578b53e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+![MultiMC](http://i.imgur.com/QJXbz.png)
+<h1>MultiMC 5</h1>
+<p>MultiMC is a custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once. It also allows you to easily install and remove mods by simply dragging and dropping.</p>
+
+<h3>License</h3>
+<p>Copyright &copy; 2013 MultiMC Contributors</p>
+<p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this program except in compliance with the License. You may obtain a copy of the License at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>.</p>
+<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>
diff --git a/data/appsettings.cpp b/data/appsettings.cpp
new file mode 100644
index 00000000..525def6e
--- /dev/null
+++ b/data/appsettings.cpp
@@ -0,0 +1,22 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "appsettings.h"
+
+AppSettings::AppSettings(QString fileName) :
+ SettingsBase(fileName)
+{
+
+}
diff --git a/data/appsettings.h b/data/appsettings.h
new file mode 100644
index 00000000..f8c7ff73
--- /dev/null
+++ b/data/appsettings.h
@@ -0,0 +1,27 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef APPSETTINGS_H
+#define APPSETTINGS_H
+
+#include "settingsbase.h"
+
+class AppSettings : public SettingsBase
+{
+public:
+ AppSettings(QString fileName);
+};
+
+#endif // APPSETTINGS_H
diff --git a/data/inifile.cpp b/data/inifile.cpp
new file mode 100644
index 00000000..df94e43e
--- /dev/null
+++ b/data/inifile.cpp
@@ -0,0 +1,75 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "inifile.h"
+
+#include <QFile>
+#include <QTextStream>
+#include <QStringList>
+
+INIFile::INIFile()
+{
+
+}
+
+bool INIFile::saveFile(QString fileName)
+{
+ // TODO Handle errors.
+ QFile file(fileName);
+ file.open(QIODevice::WriteOnly);
+ QTextStream out(&file);
+
+ for (Iterator iter = begin(); iter != end(); iter++)
+ {
+ out << iter.key() << "=" << iter.value().toString() << "\n";
+ }
+
+ return true;
+}
+
+bool INIFile::loadFile(QString fileName)
+{
+ // TODO Handle errors.
+ QFile file(fileName);
+ file.open(QIODevice::ReadOnly);
+ QTextStream in(&file);
+
+ QStringList lines = in.readAll().split('\n');
+ for (int i = 0; i < lines.count(); i++)
+ {
+ // Ignore comments.
+ QString line = lines[i].left('#').trimmed();
+
+ QString key = line.section('=', 0).trimmed();
+ QVariant value(line.section('=', 1).trimmed());
+
+ this->operator [](key) = value;
+ }
+
+ return true;
+}
+
+QVariant INIFile::get(QString key, QVariant def) const
+{
+ if (!this->contains(key))
+ return def;
+ else
+ return this->operator [](key);
+}
+
+void INIFile::set(QString key, QVariant val)
+{
+ this->operator [](key) = val;
+}
diff --git a/data/inifile.h b/data/inifile.h
new file mode 100644
index 00000000..75783859
--- /dev/null
+++ b/data/inifile.h
@@ -0,0 +1,36 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INIFILE_H
+#define INIFILE_H
+
+#include <QMap>
+#include <QString>
+#include <QVariant>
+
+// Sectionless INI parser (for instance config files)
+class INIFile : public QMap<QString, QVariant>
+{
+public:
+ explicit INIFile();
+
+ bool loadFile(QString fileName);
+ bool saveFile(QString fileName);
+
+ QVariant get(QString key, QVariant def) const;
+ void set(QString key, QVariant val);
+};
+
+#endif // INIFILE_H
diff --git a/data/instancebase.cpp b/data/instancebase.cpp
index 2e0a65df..15dc54f4 100644
--- a/data/instancebase.cpp
+++ b/data/instancebase.cpp
@@ -15,31 +15,35 @@
#include "instancebase.h"
+#include <QFileInfo>
+
#include "../util/pathutils.h"
-InstanceBase::InstanceBase(QString rootDir, QObject *parent) :
+InstanceBase::InstanceBase(QString dir, QObject *parent) :
QObject(parent),
- m_rootDir(rootDir),
- m_config(PathCombine(rootDir, "instance.cfg"), QSettings::IniFormat)
+ rootDir(dir)
{
+ QFileInfo cfgFile;
+ if (cfgFile.exists())
+ config.loadFile(PathCombine(rootDir, "instance.cfg"));
}
-QString InstanceBase::GetRootDir() const
+QString InstanceBase::getRootDir() const
{
- return m_rootDir;
+ return rootDir;
}
///////////// Config Values /////////////
// Name
-QString InstanceBase::GetInstName() const
+QString InstanceBase::getInstName() const
{
- return m_config.value("name", "Unnamed").toString();
+ return config.get("name", "Unnamed").toString();
}
-void InstanceBase::SetInstName(QString name)
+void InstanceBase::setInstName(QString name)
{
- m_config.setValue("name", name);
+ config.set("name", name);
}
diff --git a/data/instancebase.h b/data/instancebase.h
index df23b1b0..8c61aee0 100644
--- a/data/instancebase.h
+++ b/data/instancebase.h
@@ -18,7 +18,8 @@
#include <QObject>
#include <QString>
-#include <QSettings>
+
+#include "../data/inifile.h"
class InstanceBase : public QObject
{
@@ -26,18 +27,18 @@ class InstanceBase : public QObject
public:
explicit InstanceBase(QString rootDir, QObject *parent = 0);
- QString GetRootDir() const;
+ QString getRootDir() const;
- QString GetInstName() const;
- void SetInstName(QString name);
+ QString getInstName() const;
+ void setInstName(QString name);
protected:
private:
- QString m_rootDir;
+ QString rootDir;
- QSettings m_config;
+ INIFile config;
};
#endif // INSTANCEBASE_H
diff --git a/data/instancelist.cpp b/data/instancelist.cpp
new file mode 100644
index 00000000..7385ba86
--- /dev/null
+++ b/data/instancelist.cpp
@@ -0,0 +1,52 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "instancelist.h"
+
+#include <QDir>
+#include <QDirIterator>
+
+#include "stdinstance.h"
+
+#include "../util/pathutils.h"
+
+InstanceList::InstanceList() :
+ QList()
+{
+
+}
+
+void InstanceList::addInstance(InstanceBase *inst)
+{
+ append(inst);
+}
+
+void InstanceList::loadInstances(QString dir)
+{
+ qDebug("Loading instances");
+ QDir instDir(dir);
+ QDirIterator iter(instDir);
+
+ while (iter.hasNext())
+ {
+ QString subDir = iter.next();
+ if (QFileInfo(PathCombine(subDir, "instance.cfg")).exists())
+ {
+ // TODO Differentiate between different instance types.
+ InstanceBase* inst = new StdInstance(subDir);
+ addInstance(inst);
+ }
+ }
+}
diff --git a/data/instancelist.h b/data/instancelist.h
new file mode 100644
index 00000000..83ea48e2
--- /dev/null
+++ b/data/instancelist.h
@@ -0,0 +1,38 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef INSTANCELIST_H
+#define INSTANCELIST_H
+
+#include <QList>
+
+#include "instancebase.h"
+
+class InstanceList : public QList<InstanceBase*>
+{
+public:
+ explicit InstanceList();
+
+ void addInstance(InstanceBase *inst);
+
+ void loadInstances(QString dir);
+
+signals:
+
+public slots:
+
+};
+
+#endif // INSTANCELIST_H
diff --git a/data/settingsbase.cpp b/data/settingsbase.cpp
new file mode 100644
index 00000000..66195603
--- /dev/null
+++ b/data/settingsbase.cpp
@@ -0,0 +1,22 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "settingsbase.h"
+
+SettingsBase::SettingsBase(QString fileName) :
+ QSettings(fileName, QSettings::IniFormat)
+{
+
+}
diff --git a/data/settingsbase.h b/data/settingsbase.h
new file mode 100644
index 00000000..8a7e7e77
--- /dev/null
+++ b/data/settingsbase.h
@@ -0,0 +1,33 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SETTINGSBASE_H
+#define SETTINGSBASE_H
+
+#include <QSettings>
+
+#include "../util/settingsmacros.h"
+
+class SettingsBase : public QSettings
+{
+public:
+ SettingsBase(QString fileName);
+
+
+};
+
+#include "../util/settingsmacrosundef.h"
+
+#endif // SETTINGSBASE_H
diff --git a/data/settingsmacros.h b/data/settingsmacros.h
new file mode 100644
index 00000000..94e52155
--- /dev/null
+++ b/data/settingsmacros.h
@@ -0,0 +1,35 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SETTINGSMACROS_H
+#define SETTINGSMACROS_H
+
+#define STR_VAL(val) # val
+
+#define DEFINE_SETTING(funcName, name, defVal, typeName, toFunc) \
+ virtual typeName Get ## funcName() const { return value(name). ## toFunc(); } \
+ virtual void Set ## funcName(typeName value) { setValue(name, value); } \
+ virtual void Reset ## funcName() {
+
+#define DEFINE_SETTING_STR(name, defVal) \
+ DEFINE_SETTING(name, STR_VAL(name), defVal, QString, toString)
+
+#define DEFINE_SETTING_BOOL(name, defVal) \
+ DEFINE_SETTING(name, STR_VAL(name), defVal, bool, toBool)
+
+#define DEFINE_SETTING_INT(name, defVal) \
+ DEFINE_SETTING(name, STR_VAL(name), defVal, int, toInt)
+
+#endif // SETTINGSMACROS_H
diff --git a/data/settingsmacrosundef.h b/data/settingsmacrosundef.h
new file mode 100644
index 00000000..85b13bac
--- /dev/null
+++ b/data/settingsmacrosundef.h
@@ -0,0 +1,26 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SETTINGSMACROSUNDEF_H
+#define SETTINGSMACROSUNDEF_H
+
+#undef DEFINE_SETTING
+#undef DEFINE_SETTING_STR
+#undef DEFINE_SETTING_BOOL
+#undef DEFINE_SETTING_INT
+
+#undef STR_VAL
+
+#endif // SETTINGSMACROSUNDEF_H
diff --git a/data/stdinstance.cpp b/data/stdinstance.cpp
new file mode 100644
index 00000000..1324b510
--- /dev/null
+++ b/data/stdinstance.cpp
@@ -0,0 +1,22 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "stdinstance.h"
+
+StdInstance::StdInstance(QString rootDir) :
+ InstanceBase(rootDir)
+{
+
+}
diff --git a/data/stdinstance.h b/data/stdinstance.h
new file mode 100644
index 00000000..59b1c8ab
--- /dev/null
+++ b/data/stdinstance.h
@@ -0,0 +1,28 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef STDINSTANCE_H
+#define STDINSTANCE_H
+
+#include "instancebase.h"
+
+// Standard client instance.
+class StdInstance : public InstanceBase
+{
+public:
+ explicit StdInstance(QString rootDir);
+};
+
+#endif // STDINSTANCE_H
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index 875cc256..8f7372c8 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -19,11 +19,14 @@
#include <QDesktopServices>
#include <QUrl>
+#include "../gui/settingsdialog.h"
+
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
+ instList.loadInstances("instances");
}
MainWindow::~MainWindow()
@@ -43,7 +46,7 @@ void MainWindow::on_actionViewInstanceFolder_triggered()
void MainWindow::on_actionRefresh_triggered()
{
-
+ instList.loadInstances("instances");
}
void MainWindow::on_actionViewCentralModsFolder_triggered()
@@ -58,7 +61,8 @@ void MainWindow::on_actionCheckUpdate_triggered()
void MainWindow::on_actionSettings_triggered()
{
-
+ SettingsDialog dialog(this);
+ dialog.exec();
}
void MainWindow::on_actionReportBug_triggered()
diff --git a/gui/mainwindow.h b/gui/mainwindow.h
index 6d9a0216..09cd0817 100644
--- a/gui/mainwindow.h
+++ b/gui/mainwindow.h
@@ -18,7 +18,10 @@
#include <QMainWindow>
-namespace Ui {
+#include "../data/instancelist.h"
+
+namespace Ui
+{
class MainWindow;
}
@@ -51,6 +54,8 @@ private slots:
private:
Ui::MainWindow *ui;
+
+ InstanceList instList;
};
#endif // MAINWINDOW_H
diff --git a/gui/modeditwindow.cpp b/gui/modeditwindow.cpp
new file mode 100644
index 00000000..e457252a
--- /dev/null
+++ b/gui/modeditwindow.cpp
@@ -0,0 +1,29 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "modeditwindow.h"
+#include "ui_modeditwindow.h"
+
+ModEditWindow::ModEditWindow(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::ModEditWindow)
+{
+ ui->setupUi(this);
+}
+
+ModEditWindow::~ModEditWindow()
+{
+ delete ui;
+}
diff --git a/gui/modeditwindow.h b/gui/modeditwindow.h
new file mode 100644
index 00000000..c669e0b1
--- /dev/null
+++ b/gui/modeditwindow.h
@@ -0,0 +1,37 @@
+/* Copyright 2013 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef MODEDITWINDOW_H
+#define MODEDITWINDOW_H
+
+#include <QDialog>
+
+namespace Ui {
+class ModEditWindow;
+}
+
+class ModEditWindow : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit ModEditWindow(QWidget *parent = 0);
+ ~ModEditWindow();
+
+private:
+ Ui::ModEditWindow *ui;
+};
+
+#endif // MODEDITWINDOW_H
diff --git a/gui/modeditwindow.ui b/gui/modeditwindow.ui
new file mode 100644
index 00000000..c35c35d1
--- /dev/null
+++ b/gui/modeditwindow.ui
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ModEditWindow</class>
+ <widget class="QDialog" name="ModEditWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>540</width>
+ <height>420</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="jarModsTab">
+ <attribute name="title">
+ <string>Jar Mods</string>
+ </attribute>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QListView" name="jarModsListView"/>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="jarModsButtonBox">
+ <item>
+ <widget class="QPushButton" name="addJarModButton">
+ <property name="text">
+ <string>&amp;Add</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="delJarModButton">
+ <property name="text">
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="mcforgeButton">
+ <property name="text">
+ <string>MCForge</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="jarModsButtonSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="jarModMoveUpButton">
+ <property name="text">
+ <string>Move &amp;Up</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="jarModMoveDownButton">
+ <property name="text">
+ <string>Move &amp;Down</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="mlModsTab">
+ <attribute name="title">
+ <string>Mods</string>
+ </attribute>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QListView" name="mlModListView"/>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="mlModsButtonBox">
+ <item>
+ <widget class="QPushButton" name="addMlModButton">
+ <property name="text">
+ <string>&amp;Add</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="delMlModButton">
+ <property name="text">
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ </item>
+ <item>