summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/IconPickerDialog.cpp2
-rw-r--r--gui/LegacyModEditDialog.cpp (renamed from gui/legacymodeditdialog.cpp)9
-rw-r--r--gui/LegacyModEditDialog.h (renamed from gui/legacymodeditdialog.h)11
-rw-r--r--gui/LegacyModEditDialog.ui (renamed from gui/legacymodeditdialog.ui)2
-rw-r--r--gui/consolewindow.h2
-rw-r--r--gui/instancemodel.cpp4
-rw-r--r--gui/instancemodel.h2
-rw-r--r--gui/lwjglselectdialog.cpp2
-rw-r--r--gui/mainwindow.cpp31
-rw-r--r--gui/mainwindow.h6
-rw-r--r--gui/modeditdialog.cpp2
-rw-r--r--gui/modeditdialog.h2
-rw-r--r--gui/modeditdialog.ui2
-rw-r--r--gui/newinstancedialog.cpp12
-rw-r--r--gui/newinstancedialog.h2
-rw-r--r--gui/taskdialog.cpp2
-rw-r--r--gui/versionselectdialog.cpp6
-rw-r--r--gui/versionselectdialog.h2
18 files changed, 47 insertions, 54 deletions
diff --git a/gui/IconPickerDialog.cpp b/gui/IconPickerDialog.cpp
index 27e7f3b6..d80673a8 100644
--- a/gui/IconPickerDialog.cpp
+++ b/gui/IconPickerDialog.cpp
@@ -1,7 +1,7 @@
#include "IconPickerDialog.h"
#include "instancedelegate.h"
#include "ui_IconPickerDialog.h"
-#include <IconListModel.h>
+#include "logic/IconListModel.h"
IconPickerDialog::IconPickerDialog(QWidget *parent) :
QDialog(parent),
diff --git a/gui/legacymodeditdialog.cpp b/gui/LegacyModEditDialog.cpp
index 319705f9..a6becd7d 100644
--- a/gui/legacymodeditdialog.cpp
+++ b/gui/LegacyModEditDialog.cpp
@@ -13,15 +13,16 @@
* limitations under the License.
*/
-#include "legacymodeditdialog.h"
-#include "ui_legacymodeditdialog.h"
-#include "BaseInstance.h"
+#include "LegacyModEditDialog.h"
+#include "ui_LegacyModEditDialog.h"
-LegacyModEditDialog::LegacyModEditDialog(QWidget *parent, BaseInstance* m_inst) :
+LegacyModEditDialog::LegacyModEditDialog( LegacyInstance* inst, QWidget* parent ) :
+ m_inst(inst),
QDialog(parent),
ui(new Ui::LegacyModEditDialog)
{
ui->setupUi(this);
+
}
LegacyModEditDialog::~LegacyModEditDialog()
diff --git a/gui/legacymodeditdialog.h b/gui/LegacyModEditDialog.h
index 54dceffe..3af6c8d7 100644
--- a/gui/legacymodeditdialog.h
+++ b/gui/LegacyModEditDialog.h
@@ -13,12 +13,10 @@
* limitations under the License.
*/
-#ifndef LEGACYMODEDITDIALOG_H
-#define LEGACYMODEDITDIALOG_H
+#pragma once
#include <QDialog>
-
-#include "BaseInstance.h"
+#include "logic/LegacyInstance.h"
namespace Ui {
class LegacyModEditDialog;
@@ -29,7 +27,7 @@ class LegacyModEditDialog : public QDialog
Q_OBJECT
public:
- explicit LegacyModEditDialog(QWidget *parent = 0, BaseInstance* m_inst = 0);
+ explicit LegacyModEditDialog(LegacyInstance* inst, QWidget *parent = 0);
~LegacyModEditDialog();
private slots:
@@ -57,6 +55,5 @@ private slots:
private:
Ui::LegacyModEditDialog *ui;
+ LegacyInstance * m_inst;
};
-
-#endif // LEGACYMODEDITDIALOG_H
diff --git a/gui/legacymodeditdialog.ui b/gui/LegacyModEditDialog.ui
index d8b09bfe..d55c3e1c 100644
--- a/gui/legacymodeditdialog.ui
+++ b/gui/LegacyModEditDialog.ui
@@ -20,7 +20,7 @@
<bool>false</bool>
</property>
<property name="currentIndex">
- <number>3</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="jarTab">
<attribute name="title">
diff --git a/gui/consolewindow.h b/gui/consolewindow.h
index 3ea02ad9..60bec69f 100644
--- a/gui/consolewindow.h
+++ b/gui/consolewindow.h
@@ -2,7 +2,7 @@
#define CONSOLEWINDOW_H
#include <QDialog>
-#include "MinecraftProcess.h"
+#include "logic/MinecraftProcess.h"
namespace Ui {
class ConsoleWindow;
diff --git a/gui/instancemodel.cpp b/gui/instancemodel.cpp
index 3cbb0fb9..39dea34b 100644
--- a/gui/instancemodel.cpp
+++ b/gui/instancemodel.cpp
@@ -1,6 +1,6 @@
#include "instancemodel.h"
-#include <BaseInstance.h>
-#include <IconListModel.h>
+#include <logic/BaseInstance.h>
+#include <logic/IconListModel.h>
#include <QIcon>
//#include "iconcache.h"
diff --git a/gui/instancemodel.h b/gui/instancemodel.h
index fe05744f..52b58081 100644
--- a/gui/instancemodel.h
+++ b/gui/instancemodel.h
@@ -2,7 +2,7 @@
#include <QAbstractListModel>
#include "categorizedsortfilterproxymodel.h"
-#include "lists/InstanceList.h"
+#include "logic/lists/InstanceList.h"
#include <QIcon>
class InstanceModel : public QAbstractListModel
diff --git a/gui/lwjglselectdialog.cpp b/gui/lwjglselectdialog.cpp
index d4a42b59..9de92754 100644
--- a/gui/lwjglselectdialog.cpp
+++ b/gui/lwjglselectdialog.cpp
@@ -16,7 +16,7 @@
#include "lwjglselectdialog.h"
#include "ui_lwjglselectdialog.h"
-#include "lists/LwjglVersionList.h"
+#include "logic/lists/LwjglVersionList.h"
LWJGLSelectDialog::LWJGLSelectDialog(QWidget *parent) :
QDialog(parent),
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
index 6176c079..5087b38f 100644
--- a/gui/mainwindow.cpp
+++ b/gui/mainwindow.cpp
@@ -33,6 +33,9 @@
#include "userutils.h"
#include "pathutils.h"
+#include "categorizedview.h"
+#include "categorydrawer.h"
+
#include "gui/settingsdialog.h"
#include "gui/newinstancedialog.h"
#include "gui/logindialog.h"
@@ -42,31 +45,25 @@
#include "gui/versionselectdialog.h"
#include "gui/lwjglselectdialog.h"
#include "gui/consolewindow.h"
-#include "gui/legacymodeditdialog.h"
#include "gui/instancesettings.h"
-#include "categorizedview.h"
-#include "categorydrawer.h"
-
-#include "lists/InstanceList.h"
#include "AppSettings.h"
#include "AppVersion.h"
-#include "tasks/LoginTask.h"
-
-#include "BaseInstance.h"
-#include "InstanceFactory.h"
-#include "MinecraftProcess.h"
-#include "OneSixAssets.h"
-#include "OneSixUpdate.h"
+#include "logic/lists/InstanceList.h"
+#include "logic/tasks/LoginTask.h"
+#include "logic/BaseInstance.h"
+#include "logic/InstanceFactory.h"
+#include "logic/MinecraftProcess.h"
+#include "logic/OneSixAssets.h"
+#include "logic/OneSixUpdate.h"
+#include "logic/lists/MinecraftVersionList.h"
+#include "logic/lists/LwjglVersionList.h"
#include "instancemodel.h"
#include "instancedelegate.h"
#include "IconPickerDialog.h"
-#include "lists/MinecraftVersionList.h"
-#include "lists/LwjglVersionList.h"
-
// Opens the given file in the default application.
// TODO: Move this somewhere.
void openFileInDefaultProgram ( QString filename );
@@ -378,8 +375,8 @@ void MainWindow::on_actionEditInstMods_triggered()
BaseInstance* inst = selectedInstance();
if (inst)
{
- LegacyModEditDialog dialog ( this, inst );
- dialog.exec();
+ auto dialog = inst->createModEditDialog(this);
+ dialog->exec();
}
}
diff --git a/gui/mainwindow.h b/gui/mainwindow.h
index 62115e1d..79716e5e 100644
--- a/gui/mainwindow.h
+++ b/gui/mainwindow.h
@@ -18,9 +18,9 @@
#include <QMainWindow>
-#include "lists/InstanceList.h"
-#include "tasks/LoginTask.h"
-#include "BaseInstance.h"
+#include "logic/lists/InstanceList.h"
+#include "logic/tasks/LoginTask.h"
+#include "logic/BaseInstance.h"
class InstanceModel;
class InstanceProxyModel;
diff --git a/gui/modeditdialog.cpp b/gui/modeditdialog.cpp
index 2f437101..011de53d 100644
--- a/gui/modeditdialog.cpp
+++ b/gui/modeditdialog.cpp
@@ -15,7 +15,7 @@
#include "modeditdialog.h"
#include "ui_modeditdialog.h"
-#include "BaseInstance.h"
+#include "logic/BaseInstance.h"
ModEditDialog::ModEditDialog(QWidget *parent, BaseInstance* m_inst) :
QDialog(parent),
diff --git a/gui/modeditdialog.h b/gui/modeditdialog.h
index 329a1b4e..94272a32 100644
--- a/gui/modeditdialog.h
+++ b/gui/modeditdialog.h
@@ -18,7 +18,7 @@
#include <QDialog>
-#include "BaseInstance.h"
+#include "logic/BaseInstance.h"
namespace Ui {
class ModEditDialog;
diff --git a/gui/modeditdialog.ui b/gui/modeditdialog.ui
index 380aec39..dfc59d21 100644
--- a/gui/modeditdialog.ui
+++ b/gui/modeditdialog.ui
@@ -26,7 +26,7 @@
</size>
</property>
<property name="currentIndex">
- <number>2</number>
+ <number>0</number>
</property>
<property name="elideMode">
<enum>Qt::ElideNone</enum>
diff --git a/gui/newinstancedialog.cpp b/gui/newinstancedialog.cpp
index 4f19e9a2..3a4adbc1 100644
--- a/gui/newinstancedialog.cpp
+++ b/gui/newinstancedialog.cpp
@@ -16,13 +16,11 @@
#include "newinstancedialog.h"
#include "ui_newinstancedialog.h"
-#include "InstanceFactory.h"
-
-#include <lists/MinecraftVersionList.h>
-#include "InstanceVersion.h"
-
-#include "tasks/Task.h"
-#include <IconListModel.h>
+#include "logic/InstanceFactory.h"
+#include "logic/InstanceVersion.h"
+#include "logic/IconListModel.h"
+#include "logic/lists/MinecraftVersionList.h"
+#include "logic/tasks/Task.h"
#include "versionselectdialog.h"
#include "taskdialog.h"
diff --git a/gui/newinstancedialog.h b/gui/newinstancedialog.h
index 07267e19..e8c57024 100644
--- a/gui/newinstancedialog.h
+++ b/gui/newinstancedialog.h
@@ -17,7 +17,7 @@
#define NEWINSTANCEDIALOG_H
#include <QDialog>
-#include "InstanceVersion.h"
+#include "logic/InstanceVersion.h"
namespace Ui {
class NewInstanceDialog;
diff --git a/gui/taskdialog.cpp b/gui/taskdialog.cpp
index f61614e8..8c745b38 100644
--- a/gui/taskdialog.cpp
+++ b/gui/taskdialog.cpp
@@ -18,7 +18,7 @@
#include <QKeyEvent>
-#include "tasks/Task.h"
+#include "logic/tasks/Task.h"
TaskDialog::TaskDialog(QWidget *parent) :
QDialog(parent),
diff --git a/gui/versionselectdialog.cpp b/gui/versionselectdialog.cpp
index 33aedc71..afe112f4 100644
--- a/gui/versionselectdialog.cpp
+++ b/gui/versionselectdialog.cpp
@@ -22,9 +22,9 @@
#include <gui/taskdialog.h>
-#include <lists/InstVersionList.h>
-#include <InstanceVersion.h>
-#include <tasks/Task.h>
+#include <logic/InstanceVersion.h>
+#include <logic/lists/InstVersionList.h>
+#include <logic/tasks/Task.h>
VersionSelectDialog::VersionSelectDialog(InstVersionList *vlist, QWidget *parent) :
QDialog(parent),
diff --git a/gui/versionselectdialog.h b/gui/versionselectdialog.h
index 752c937b..b864aee1 100644
--- a/gui/versionselectdialog.h
+++ b/gui/versionselectdialog.h
@@ -19,7 +19,7 @@
#include <QDialog>
#include <QSortFilterProxyModel>
-#include <InstanceVersion.h>
+#include "logic/InstanceVersion.h"
class InstVersionList;