diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cf937581..5e3022ac9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,8 @@ endif() ##################################### Set CMake options ##################################### set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTORCC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/") diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 7a2662131..37724038c 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -1,36 +1,42 @@ #include "Application.h" #include "BuildConfig.h" -#include "MainWindow.h" -#include "InstanceWindow.h" -#include "instanceview/AccessibleInstanceView.h" -#include +#include "ui/MainWindow.h" +#include "ui/InstanceWindow.h" -#include "pages/BasePageProvider.h" -#include "pages/global/LauncherPage.h" -#include "pages/global/MinecraftPage.h" -#include "pages/global/JavaPage.h" -#include "pages/global/LanguagePage.h" -#include "pages/global/ProxyPage.h" -#include "pages/global/ExternalToolsPage.h" -#include "pages/global/AccountListPage.h" -#include "pages/global/PasteEEPage.h" -#include "pages/global/CustomCommandsPage.h" +#include "ui/instanceview/AccessibleInstanceView.h" -#include "themes/ITheme.h" -#include "themes/SystemTheme.h" -#include "themes/DarkTheme.h" -#include "themes/BrightTheme.h" -#include "themes/CustomTheme.h" +#include "ui/pages/BasePageProvider.h" +#include "ui/pages/global/LauncherPage.h" +#include "ui/pages/global/MinecraftPage.h" +#include "ui/pages/global/JavaPage.h" +#include "ui/pages/global/LanguagePage.h" +#include "ui/pages/global/ProxyPage.h" +#include "ui/pages/global/ExternalToolsPage.h" +#include "ui/pages/global/AccountListPage.h" +#include "ui/pages/global/PasteEEPage.h" +#include "ui/pages/global/CustomCommandsPage.h" + +#include "ui/themes/ITheme.h" +#include "ui/themes/SystemTheme.h" +#include "ui/themes/DarkTheme.h" +#include "ui/themes/BrightTheme.h" +#include "ui/themes/CustomTheme.h" + +#include "ui/setupwizard/SetupWizard.h" +#include "ui/setupwizard/LanguageWizardPage.h" +#include "ui/setupwizard/JavaWizardPage.h" +#include "ui/setupwizard/AnalyticsWizardPage.h" + +#include "ui/dialogs/CustomMessageBox.h" + +#include "ui/pagedialog/PageDialog.h" #include "ApplicationMessage.h" -#include "setupwizard/SetupWizard.h" -#include "setupwizard/LanguageWizardPage.h" -#include "setupwizard/JavaWizardPage.h" -#include "setupwizard/AnalyticsWizardPage.h" - #include + +#include #include #include #include @@ -41,7 +47,6 @@ #include #include -#include "dialogs/CustomMessageBox.h" #include "InstanceList.h" #include @@ -71,7 +76,6 @@ #include #include -#include "pagedialog/PageDialog.h" #include diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt index f2f42ab03..601f3b117 100644 --- a/launcher/CMakeLists.txt +++ b/launcher/CMakeLists.txt @@ -128,6 +128,8 @@ set(NET_SOURCES # Game launch logic set(LAUNCH_SOURCES + launch/steps/CheckJava.cpp + launch/steps/CheckJava.h launch/steps/LookupServerAddress.cpp launch/steps/LookupServerAddress.h launch/steps/PostLaunchCommand.cpp @@ -419,9 +421,6 @@ add_unit_test(INIFile ) set(JAVA_SOURCES - # Java related code - java/launch/CheckJava.cpp - java/launch/CheckJava.h java/JavaChecker.h java/JavaChecker.cpp java/JavaCheckerJob.h @@ -568,20 +567,27 @@ SET(LAUNCHER_SOURCES # GUI - general utilities DesktopServices.h DesktopServices.cpp - GuiUtil.h - GuiUtil.cpp - ColumnResizer.h - ColumnResizer.cpp VersionProxyModel.h VersionProxyModel.cpp - ColorCache.h - ColorCache.cpp HoeDown.h # Super secret! KonamiCode.h KonamiCode.cpp + # Bundled resources + resources/backgrounds/backgrounds.qrc + resources/multimc/multimc.qrc + resources/pe_dark/pe_dark.qrc + resources/pe_light/pe_light.qrc + resources/pe_colored/pe_colored.qrc + resources/pe_blue/pe_blue.qrc + resources/OSX/OSX.qrc + resources/iOS/iOS.qrc + resources/flat/flat.qrc + resources/documents/documents.qrc + ../${Launcher_Branding_LogoQRC} + # Icons icons/MMCIcon.h icons/MMCIcon.cpp @@ -589,39 +595,43 @@ SET(LAUNCHER_SOURCES icons/IconList.cpp # GUI - windows - MainWindow.h - MainWindow.cpp - InstanceWindow.h - InstanceWindow.cpp + ui/GuiUtil.h + ui/GuiUtil.cpp + ui/ColorCache.h + ui/ColorCache.cpp + ui/MainWindow.h + ui/MainWindow.cpp + ui/InstanceWindow.h + ui/InstanceWindow.cpp # FIXME: maybe find a better home for this. SkinUtils.cpp SkinUtils.h # GUI - setup wizard - setupwizard/SetupWizard.h - setupwizard/SetupWizard.cpp - setupwizard/AnalyticsWizardPage.cpp - setupwizard/AnalyticsWizardPage.h - setupwizard/BaseWizardPage.h - setupwizard/JavaWizardPage.cpp - setupwizard/JavaWizardPage.h - setupwizard/LanguageWizardPage.cpp - setupwizard/LanguageWizardPage.h + ui/setupwizard/SetupWizard.h + ui/setupwizard/SetupWizard.cpp + ui/setupwizard/AnalyticsWizardPage.cpp + ui/setupwizard/AnalyticsWizardPage.h + ui/setupwizard/BaseWizardPage.h + ui/setupwizard/JavaWizardPage.cpp + ui/setupwizard/JavaWizardPage.h + ui/setupwizard/LanguageWizardPage.cpp + ui/setupwizard/LanguageWizardPage.h # GUI - themes - themes/FusionTheme.cpp - themes/FusionTheme.h - themes/BrightTheme.cpp - themes/BrightTheme.h - themes/CustomTheme.cpp - themes/CustomTheme.h - themes/DarkTheme.cpp - themes/DarkTheme.h - themes/ITheme.cpp - themes/ITheme.h - themes/SystemTheme.cpp - themes/SystemTheme.h + ui/themes/FusionTheme.cpp + ui/themes/FusionTheme.h + ui/themes/BrightTheme.cpp + ui/themes/BrightTheme.h + ui/themes/CustomTheme.cpp + ui/themes/CustomTheme.h + ui/themes/DarkTheme.cpp + ui/themes/DarkTheme.h + ui/themes/ITheme.cpp + ui/themes/ITheme.h + ui/themes/SystemTheme.cpp + ui/themes/SystemTheme.h # Processes LaunchController.h @@ -635,255 +645,183 @@ SET(LAUNCHER_SOURCES JavaCommon.cpp # GUI - paged dialog base - pages/BasePage.h - pages/BasePageContainer.h - pages/BasePageProvider.h + ui/pages/BasePage.h + ui/pages/BasePageContainer.h + ui/pages/BasePageProvider.h # GUI - instance pages - pages/instance/GameOptionsPage.cpp - pages/instance/GameOptionsPage.h - pages/instance/VersionPage.cpp - pages/instance/VersionPage.h - pages/instance/TexturePackPage.h - pages/instance/ResourcePackPage.h - pages/instance/ShaderPackPage.h - pages/instance/ModFolderPage.cpp - pages/instance/ModFolderPage.h - pages/instance/NotesPage.cpp - pages/instance/NotesPage.h - pages/instance/LogPage.cpp - pages/instance/LogPage.h - pages/instance/InstanceSettingsPage.cpp - pages/instance/InstanceSettingsPage.h - pages/instance/ScreenshotsPage.cpp - pages/instance/ScreenshotsPage.h - pages/instance/OtherLogsPage.cpp - pages/instance/OtherLogsPage.h - pages/instance/ServersPage.cpp - pages/instance/ServersPage.h - pages/instance/LegacyUpgradePage.cpp - pages/instance/LegacyUpgradePage.h - pages/instance/WorldListPage.cpp - pages/instance/WorldListPage.h + ui/pages/instance/GameOptionsPage.cpp + ui/pages/instance/GameOptionsPage.h + ui/pages/instance/VersionPage.cpp + ui/pages/instance/VersionPage.h + ui/pages/instance/TexturePackPage.h + ui/pages/instance/ResourcePackPage.h + ui/pages/instance/ShaderPackPage.h + ui/pages/instance/ModFolderPage.cpp + ui/pages/instance/ModFolderPage.h + ui/pages/instance/NotesPage.cpp + ui/pages/instance/NotesPage.h + ui/pages/instance/LogPage.cpp + ui/pages/instance/LogPage.h + ui/pages/instance/InstanceSettingsPage.cpp + ui/pages/instance/InstanceSettingsPage.h + ui/pages/instance/ScreenshotsPage.cpp + ui/pages/instance/ScreenshotsPage.h + ui/pages/instance/OtherLogsPage.cpp + ui/pages/instance/OtherLogsPage.h + ui/pages/instance/ServersPage.cpp + ui/pages/instance/ServersPage.h + ui/pages/instance/LegacyUpgradePage.cpp + ui/pages/instance/LegacyUpgradePage.h + ui/pages/instance/WorldListPage.cpp + ui/pages/instance/WorldListPage.h # GUI - global settings pages - pages/global/AccountListPage.cpp - pages/global/AccountListPage.h - pages/global/CustomCommandsPage.cpp - pages/global/CustomCommandsPage.h - pages/global/ExternalToolsPage.cpp - pages/global/ExternalToolsPage.h - pages/global/JavaPage.cpp - pages/global/JavaPage.h - pages/global/LanguagePage.cpp - pages/global/LanguagePage.h - pages/global/MinecraftPage.cpp - pages/global/MinecraftPage.h - pages/global/LauncherPage.cpp - pages/global/LauncherPage.h - pages/global/ProxyPage.cpp - pages/global/ProxyPage.h - pages/global/PasteEEPage.cpp - pages/global/PasteEEPage.h + ui/pages/global/AccountListPage.cpp + ui/pages/global/AccountListPage.h + ui/pages/global/CustomCommandsPage.cpp + ui/pages/global/CustomCommandsPage.h + ui/pages/global/ExternalToolsPage.cpp + ui/pages/global/ExternalToolsPage.h + ui/pages/global/JavaPage.cpp + ui/pages/global/JavaPage.h + ui/pages/global/LanguagePage.cpp + ui/pages/global/LanguagePage.h + ui/pages/global/MinecraftPage.cpp + ui/pages/global/MinecraftPage.h + ui/pages/global/LauncherPage.cpp + ui/pages/global/LauncherPage.h + ui/pages/global/ProxyPage.cpp + ui/pages/global/ProxyPage.h + ui/pages/global/PasteEEPage.cpp + ui/pages/global/PasteEEPage.h # GUI - platform pages - pages/modplatform/VanillaPage.cpp - pages/modplatform/VanillaPage.h + ui/pages/modplatform/VanillaPage.cpp + ui/pages/modplatform/VanillaPage.h - pages/modplatform/atlauncher/AtlFilterModel.cpp - pages/modplatform/atlauncher/AtlFilterModel.h - pages/modplatform/atlauncher/AtlListModel.cpp - pages/modplatform/atlauncher/AtlListModel.h - pages/modplatform/atlauncher/AtlOptionalModDialog.cpp - pages/modplatform/atlauncher/AtlOptionalModDialog.h - pages/modplatform/atlauncher/AtlPage.cpp - pages/modplatform/atlauncher/AtlPage.h + ui/pages/modplatform/atlauncher/AtlFilterModel.cpp + ui/pages/modplatform/atlauncher/AtlFilterModel.h + ui/pages/modplatform/atlauncher/AtlListModel.cpp + ui/pages/modplatform/atlauncher/AtlListModel.h + ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp + ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h + ui/pages/modplatform/atlauncher/AtlPage.cpp + ui/pages/modplatform/atlauncher/AtlPage.h - pages/modplatform/ftb/FtbFilterModel.cpp - pages/modplatform/ftb/FtbFilterModel.h - pages/modplatform/ftb/FtbListModel.cpp - pages/modplatform/ftb/FtbListModel.h - pages/modplatform/ftb/FtbPage.cpp - pages/modplatform/ftb/FtbPage.h + ui/pages/modplatform/ftb/FtbFilterModel.cpp + ui/pages/modplatform/ftb/FtbFilterModel.h + ui/pages/modplatform/ftb/FtbListModel.cpp + ui/pages/modplatform/ftb/FtbListModel.h + ui/pages/modplatform/ftb/FtbPage.cpp + ui/pages/modplatform/ftb/FtbPage.h - pages/modplatform/legacy_ftb/Page.cpp - pages/modplatform/legacy_ftb/Page.h - pages/modplatform/legacy_ftb/ListModel.h - pages/modplatform/legacy_ftb/ListModel.cpp + ui/pages/modplatform/legacy_ftb/Page.cpp + ui/pages/modplatform/legacy_ftb/Page.h + ui/pages/modplatform/legacy_ftb/ListModel.h + ui/pages/modplatform/legacy_ftb/ListModel.cpp - pages/modplatform/flame/FlameModel.cpp - pages/modplatform/flame/FlameModel.h - pages/modplatform/flame/FlamePage.cpp - pages/modplatform/flame/FlamePage.h + ui/pages/modplatform/flame/FlameModel.cpp + ui/pages/modplatform/flame/FlameModel.h + ui/pages/modplatform/flame/FlamePage.cpp + ui/pages/modplatform/flame/FlamePage.h - pages/modplatform/technic/TechnicModel.cpp - pages/modplatform/technic/TechnicModel.h - pages/modplatform/technic/TechnicPage.cpp - pages/modplatform/technic/TechnicPage.h + ui/pages/modplatform/technic/TechnicModel.cpp + ui/pages/modplatform/technic/TechnicModel.h + ui/pages/modplatform/technic/TechnicPage.cpp + ui/pages/modplatform/technic/TechnicPage.h - pages/modplatform/ImportPage.cpp - pages/modplatform/ImportPage.h + ui/pages/modplatform/ImportPage.cpp + ui/pages/modplatform/ImportPage.h # GUI - dialogs - dialogs/AboutDialog.cpp - dialogs/AboutDialog.h - dialogs/ProfileSelectDialog.cpp - dialogs/ProfileSelectDialog.h - dialogs/ProfileSetupDialog.cpp - dialogs/ProfileSetupDialog.h - dialogs/CopyInstanceDialog.cpp - dialogs/CopyInstanceDialog.h - dialogs/CustomMessageBox.cpp - dialogs/CustomMessageBox.h - dialogs/EditAccountDialog.cpp - dialogs/EditAccountDialog.h - dialogs/ExportInstanceDialog.cpp - dialogs/ExportInstanceDialog.h - dialogs/IconPickerDialog.cpp - dialogs/IconPickerDialog.h - dialogs/LoginDialog.cpp - dialogs/LoginDialog.h - dialogs/MSALoginDialog.cpp - dialogs/MSALoginDialog.h - dialogs/NewComponentDialog.cpp - dialogs/NewComponentDialog.h - dialogs/NewInstanceDialog.cpp - dialogs/NewInstanceDialog.h - dialogs/NotificationDialog.cpp - dialogs/NotificationDialog.h - pagedialog/PageDialog.cpp - pagedialog/PageDialog.h - dialogs/ProgressDialog.cpp - dialogs/ProgressDialog.h - dialogs/UpdateDialog.cpp - dialogs/UpdateDialog.h - dialogs/VersionSelectDialog.cpp - dialogs/VersionSelectDialog.h - dialogs/SkinUploadDialog.cpp - dialogs/SkinUploadDialog.h + ui/dialogs/AboutDialog.cpp + ui/dialogs/AboutDialog.h + ui/dialogs/ProfileSelectDialog.cpp + ui/dialogs/ProfileSelectDialog.h + ui/dialogs/ProfileSetupDialog.cpp + ui/dialogs/ProfileSetupDialog.h + ui/dialogs/CopyInstanceDialog.cpp + ui/dialogs/CopyInstanceDialog.h + ui/dialogs/CustomMessageBox.cpp + ui/dialogs/CustomMessageBox.h + ui/dialogs/EditAccountDialog.cpp + ui/dialogs/EditAccountDialog.h + ui/dialogs/ExportInstanceDialog.cpp + ui/dialogs/ExportInstanceDialog.h + ui/dialogs/IconPickerDialog.cpp + ui/dialogs/IconPickerDialog.h + ui/dialogs/LoginDialog.cpp + ui/dialogs/LoginDialog.h + ui/dialogs/MSALoginDialog.cpp + ui/dialogs/MSALoginDialog.h + ui/dialogs/NewComponentDialog.cpp + ui/dialogs/NewComponentDialog.h + ui/dialogs/NewInstanceDialog.cpp + ui/dialogs/NewInstanceDialog.h + ui/dialogs/NotificationDialog.cpp + ui/dialogs/NotificationDialog.h + ui/pagedialog/PageDialog.cpp + ui/pagedialog/PageDialog.h + ui/dialogs/ProgressDialog.cpp + ui/dialogs/ProgressDialog.h + ui/dialogs/UpdateDialog.cpp + ui/dialogs/UpdateDialog.h + ui/dialogs/VersionSelectDialog.cpp + ui/dialogs/VersionSelectDialog.h + ui/dialogs/SkinUploadDialog.cpp + ui/dialogs/SkinUploadDialog.h # GUI - widgets - widgets/Common.cpp - widgets/Common.h - widgets/CustomCommands.cpp - widgets/CustomCommands.h - widgets/DropLabel.cpp - widgets/DropLabel.h - widgets/FocusLineEdit.cpp - widgets/FocusLineEdit.h - widgets/IconLabel.cpp - widgets/IconLabel.h - widgets/JavaSettingsWidget.cpp - widgets/JavaSettingsWidget.h - widgets/LabeledToolButton.cpp - widgets/LabeledToolButton.h - widgets/LanguageSelectionWidget.cpp - widgets/LanguageSelectionWidget.h - widgets/LineSeparator.cpp - widgets/LineSeparator.h - widgets/LogView.cpp - widgets/LogView.h - widgets/MCModInfoFrame.cpp - widgets/MCModInfoFrame.h - widgets/ModListView.cpp - widgets/ModListView.h - widgets/PageContainer.cpp - widgets/PageContainer.h - widgets/PageContainer_p.h - widgets/VersionListView.cpp - widgets/VersionListView.h - widgets/VersionSelectWidget.cpp - widgets/VersionSelectWidget.h - widgets/ProgressWidget.h - widgets/ProgressWidget.cpp - widgets/WideBar.h - widgets/WideBar.cpp + ui/widgets/Common.cpp + ui/widgets/Common.h + ui/widgets/CustomCommands.cpp + ui/widgets/CustomCommands.h + ui/widgets/DropLabel.cpp + ui/widgets/DropLabel.h + ui/widgets/FocusLineEdit.cpp + ui/widgets/FocusLineEdit.h + ui/widgets/IconLabel.cpp + ui/widgets/IconLabel.h + ui/widgets/JavaSettingsWidget.cpp + ui/widgets/JavaSettingsWidget.h + ui/widgets/LabeledToolButton.cpp + ui/widgets/LabeledToolButton.h + ui/widgets/LanguageSelectionWidget.cpp + ui/widgets/LanguageSelectionWidget.h + ui/widgets/LineSeparator.cpp + ui/widgets/LineSeparator.h + ui/widgets/LogView.cpp + ui/widgets/LogView.h + ui/widgets/MCModInfoFrame.cpp + ui/widgets/MCModInfoFrame.h + ui/widgets/ModListView.cpp + ui/widgets/ModListView.h + ui/widgets/PageContainer.cpp + ui/widgets/PageContainer.h + ui/widgets/PageContainer_p.h + ui/widgets/VersionListView.cpp + ui/widgets/VersionListView.h + ui/widgets/VersionSelectWidget.cpp + ui/widgets/VersionSelectWidget.h + ui/widgets/ProgressWidget.h + ui/widgets/ProgressWidget.cpp + ui/widgets/WideBar.h + ui/widgets/WideBar.cpp # GUI - instance group view - instanceview/InstanceProxyModel.cpp - instanceview/InstanceProxyModel.h - instanceview/AccessibleInstanceView.cpp - instanceview/AccessibleInstanceView.h - instanceview/AccessibleInstanceView_p.h - instanceview/InstanceView.cpp - instanceview/InstanceView.h - instanceview/InstanceDelegate.cpp - instanceview/InstanceDelegate.h - instanceview/VisualGroup.cpp - instanceview/VisualGroup.h - ) - -######## UIs ######## -SET(LAUNCHER_UIS - # Instance pages - pages/instance/GameOptionsPage.ui - pages/instance/VersionPage.ui - pages/instance/ModFolderPage.ui - pages/instance/LogPage.ui - pages/instance/InstanceSettingsPage.ui - pages/instance/NotesPage.ui - pages/instance/ScreenshotsPage.ui - pages/instance/OtherLogsPage.ui - pages/instance/LegacyUpgradePage.ui - pages/instance/ServersPage.ui - pages/instance/WorldListPage.ui - - # Global settings pages - pages/global/AccountListPage.ui - pages/global/ExternalToolsPage.ui - pages/global/JavaPage.ui - pages/global/MinecraftPage.ui - pages/global/LauncherPage.ui - pages/global/ProxyPage.ui - pages/global/PasteEEPage.ui - - # Platform pages - pages/modplatform/VanillaPage.ui - pages/modplatform/atlauncher/AtlPage.ui - pages/modplatform/ftb/FtbPage.ui - pages/modplatform/legacy_ftb/Page.ui - pages/modplatform/flame/FlamePage.ui - pages/modplatform/technic/TechnicPage.ui - pages/modplatform/ImportPage.ui - - # Platform Dialogs - pages/modplatform/atlauncher/AtlOptionalModDialog.ui - - # Dialogs - dialogs/CopyInstanceDialog.ui - dialogs/NewComponentDialog.ui - dialogs/NewInstanceDialog.ui - dialogs/AboutDialog.ui - dialogs/ProgressDialog.ui - dialogs/IconPickerDialog.ui - dialogs/ProfileSelectDialog.ui - dialogs/ProfileSetupDialog.ui - dialogs/EditAccountDialog.ui - dialogs/ExportInstanceDialog.ui - dialogs/LoginDialog.ui - dialogs/MSALoginDialog.ui - dialogs/UpdateDialog.ui - dialogs/NotificationDialog.ui - dialogs/SkinUploadDialog.ui - - # Widgets/other - widgets/CustomCommands.ui - widgets/MCModInfoFrame.ui -) - -set(LAUNCHER_QRCS - resources/backgrounds/backgrounds.qrc - resources/multimc/multimc.qrc - resources/pe_dark/pe_dark.qrc - resources/pe_light/pe_light.qrc - resources/pe_colored/pe_colored.qrc - resources/pe_blue/pe_blue.qrc - resources/OSX/OSX.qrc - resources/iOS/iOS.qrc - resources/flat/flat.qrc - resources/documents/documents.qrc - ../${Launcher_Branding_LogoQRC} + ui/instanceview/InstanceProxyModel.cpp + ui/instanceview/InstanceProxyModel.h + ui/instanceview/AccessibleInstanceView.cpp + ui/instanceview/AccessibleInstanceView.h + ui/instanceview/AccessibleInstanceView_p.h + ui/instanceview/InstanceView.cpp + ui/instanceview/InstanceView.h + ui/instanceview/InstanceDelegate.cpp + ui/instanceview/InstanceDelegate.h + ui/instanceview/VisualGroup.cpp + ui/instanceview/VisualGroup.h ) ######## Windows resource files ######## @@ -891,12 +829,8 @@ if(WIN32) set(LAUNCHER_RCS ../${Launcher_Branding_WindowsRC}) endif() -# Qt 5 stuff -qt5_wrap_ui(LAUNCHER_UI ${LAUNCHER_UIS}) -qt5_add_resources(LAUNCHER_RESOURCES ${LAUNCHER_QRCS}) - # Add executable -add_library(Launcher_logic STATIC ${LOGIC_SOURCES} ${LAUNCHER_SOURCES} ${LAUNCHER_UI} ${LAUNCHER_RESOURCES}) +add_library(Launcher_logic STATIC ${LOGIC_SOURCES} ${LAUNCHER_SOURCES}) target_link_libraries(Launcher_logic systeminfo Launcher_quazip diff --git a/launcher/ColumnResizer.cpp b/launcher/ColumnResizer.cpp deleted file mode 100644 index fe4150674..000000000 --- a/launcher/ColumnResizer.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/* -* Copyright 2011 Aurélien Gâteau -* License: BSD-3-Clause -*/ -#include - -#include -#include -#include -#include -#include -#include - -class FormLayoutWidgetItem : public QWidgetItem -{ -public: - FormLayoutWidgetItem(QWidget* widget, QFormLayout* formLayout, QFormLayout::ItemRole itemRole) - : QWidgetItem(widget) - , m_width(-1) - , m_formLayout(formLayout) - , m_itemRole(itemRole) - {} - - QSize sizeHint() const - { - QSize size = QWidgetItem::sizeHint(); - if (m_width != -1) { - size.setWidth(m_width); - } - return size; - } - - QSize minimumSize() const - { - QSize size = QWidgetItem::minimumSize(); - if (m_width != -1) { - size.setWidth(m_width); - } - return size; - } - - QSize maximumSize() const - { - QSize size = QWidgetItem::maximumSize(); - if (m_width != -1) { - size.setWidth(m_width); - } - return size; - } - - void setWidth(int width) - { - if (width != m_width) { - m_width = width; - invalidate(); - } - } - - void setGeometry(const QRect& _rect) - { - QRect rect = _rect; - int width = widget()->sizeHint().width(); - if (m_itemRole == QFormLayout::LabelRole && m_formLayout->labelAlignment() & Qt::AlignRight) { - rect.setLeft(rect.right() - width); - } - QWidgetItem::setGeometry(rect); - } - - QFormLayout* formLayout() const - { - return m_formLayout; - } - -private: - int m_width; - QFormLayout* m_formLayout; - QFormLayout::ItemRole m_itemRole; -}; - -typedef QPair GridColumnInfo; - -class ColumnResizerPrivate -{ -public: - ColumnResizerPrivate(ColumnResizer* q_ptr) - : q(q_ptr) - , m_updateTimer(new QTimer(q)) - { - m_updateTimer->setSingleShot(true); - m_updateTimer->setInterval(0); - QObject::connect(m_updateTimer, SIGNAL(timeout()), q, SLOT(updateWidth())); - } - - void scheduleWidthUpdate() - { - m_updateTimer->start(); - } - - ColumnResizer* q; - QTimer* m_updateTimer; - QList m_widgets; - QList m_wrWidgetItemList; - QList m_gridColumnInfoList; -}; - -ColumnResizer::ColumnResizer(QObject* parent) -: QObject(parent) -, d(new ColumnResizerPrivate(this)) -{} - -ColumnResizer::~ColumnResizer() -{ - delete d; -} - -void ColumnResizer::addWidget(QWidget* widget) -{ - d->m_widgets.append(widget); - widget->installEventFilter(this); - d->scheduleWidthUpdate(); -} - -void ColumnResizer::updateWidth() -{ - int width = 0; - Q_FOREACH(QWidget* widget, d->m_widgets) { - width = qMax(widget->sizeHint().width(), width); - } - Q_FOREACH(FormLayoutWidgetItem* item, d->m_wrWidgetItemList) { - item->setWidth(width); - item->formLayout()->update(); - } - Q_FOREACH(GridColumnInfo info, d->m_gridColumnInfoList) { - info.first->setColumnMinimumWidth(info.second, width); - } -} - -bool ColumnResizer::eventFilter(QObject*, QEvent* event) -{ - if (event->type() == QEvent::Resize) { - d->scheduleWidthUpdate(); - } - return false; -} - -void ColumnResizer::addWidgetsFromLayout(QLayout* layout, int column) -{ - Q_ASSERT(column >= 0); - QGridLayout* gridLayout = qobject_cast(layout); - QFormLayout* formLayout = qobject_cast(layout); - if (gridLayout) { - addWidgetsFromGridLayout(gridLayout, column); - } else if (formLayout) { - if (column > QFormLayout::SpanningRole) { - qCritical() << "column should not be more than" << QFormLayout::SpanningRole << "for QFormLayout"; - return; - } - QFormLayout::ItemRole role = static_cast(column); - addWidgetsFromFormLayout(formLayout, role); - } else { - qCritical() << "Don't know how to handle layout" << layout; - } -} - -void ColumnResizer::addWidgetsFromGridLayout(QGridLayout* layout, int column) -{ - for (int row = 0; row < layout->rowCount(); ++row) { - QLayoutItem* item = layout->itemAtPosition(row, column); - if (!item) { - continue; - } - QWidget* widget = item->widget(); - if (!widget) { - continue; - } - addWidget(widget); - } - d->m_gridColumnInfoList << GridColumnInfo(layout, column); -} - -void ColumnResizer::addWidgetsFromFormLayout(QFormLayout* layout, QFormLayout::ItemRole role) -{ - for (int row = 0; row < layout->rowCount(); ++row) { - QLayoutItem* item = layout->itemAt(row, role); - if (!item) { - continue; - } - QWidget* widget = item->widget(); - if (!widget) { - continue; - } - layout->removeItem(item); - delete item; - FormLayoutWidgetItem* newItem = new FormLayoutWidgetItem(widget, layout, role); - layout->setItem(row, role, newItem); - addWidget(widget); - d->m_wrWidgetItemList << newItem; - } -} diff --git a/launcher/ColumnResizer.h b/launcher/ColumnResizer.h deleted file mode 100644 index 8c920f018..000000000 --- a/launcher/ColumnResizer.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -* Copyright 2011 Aurélien Gâteau -* License: BSD-3-Clause -*/ -#ifndef COLUMNRESIZER_H -#define COLUMNRESIZER_H - -#include - -#include -#include - -class QEvent; -class QGridLayout; -class QLayout; -class QWidget; - -class ColumnResizerPrivate; -class ColumnResizer : public QObject -{ - Q_OBJECT -public: - ColumnResizer(QObject* parent = 0); - ~ColumnResizer(); - - void addWidget(QWidget* widget); - void addWidgetsFromLayout(QLayout*, int column); - void addWidgetsFromGridLayout(QGridLayout*, int column); - void addWidgetsFromFormLayout(QFormLayout*, QFormLayout::ItemRole role); - -private Q_SLOTS: - void updateWidth(); - -protected: - bool eventFilter(QObject*, QEvent* event); - -private: - ColumnResizerPrivate* const d; -}; - -#endif /* COLUMNRESIZER_H */ diff --git a/launcher/InstancePageProvider.h b/launcher/InstancePageProvider.h index 555c07edc..2af90b911 100644 --- a/launcher/InstancePageProvider.h +++ b/launcher/InstancePageProvider.h @@ -2,22 +2,22 @@ #include "minecraft/MinecraftInstance.h" #include "minecraft/legacy/LegacyInstance.h" #include -#include "pages/BasePage.h" -#include "pages/BasePageProvider.h" -#include "pages/instance/LogPage.h" -#include "pages/instance/VersionPage.h" -#include "pages/instance/ModFolderPage.h" -#include "pages/instance/ResourcePackPage.h" -#include "pages/instance/TexturePackPage.h" -#include "pages/instance/ShaderPackPage.h" -#include "pages/instance/NotesPage.h" -#include "pages/instance/ScreenshotsPage.h" -#include "pages/instance/InstanceSettingsPage.h" -#include "pages/instance/OtherLogsPage.h" -#include "pages/instance/LegacyUpgradePage.h" -#include "pages/instance/WorldListPage.h" -#include "pages/instance/ServersPage.h" -#include "pages/instance/GameOptionsPage.h" +#include "ui/pages/BasePage.h" +#include "ui/pages/BasePageProvider.h" +#include "ui/pages/instance/LogPage.h" +#include "ui/pages/instance/VersionPage.h" +#include "ui/pages/instance/ModFolderPage.h" +#include "ui/pages/instance/ResourcePackPage.h" +#include "ui/pages/instance/TexturePackPage.h" +#include "ui/pages/instance/ShaderPackPage.h" +#include "ui/pages/instance/NotesPage.h" +#include "ui/pages/instance/ScreenshotsPage.h" +#include "ui/pages/instance/InstanceSettingsPage.h" +#include "ui/pages/instance/OtherLogsPage.h" +#include "ui/pages/instance/LegacyUpgradePage.h" +#include "ui/pages/instance/WorldListPage.h" +#include "ui/pages/instance/ServersPage.h" +#include "ui/pages/instance/GameOptionsPage.h" class InstancePageProvider : public QObject, public BasePageProvider { diff --git a/launcher/JavaCommon.cpp b/launcher/JavaCommon.cpp index 92a058f09..6fa5851b1 100644 --- a/launcher/JavaCommon.cpp +++ b/launcher/JavaCommon.cpp @@ -1,5 +1,5 @@ #include "JavaCommon.h" -#include "dialogs/CustomMessageBox.h" +#include "ui/dialogs/CustomMessageBox.h" #include bool JavaCommon::checkJVMArgs(QString jvmargs, QWidget *parent) diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp index 3ecb01349..8bd5732f4 100644 --- a/launcher/LaunchController.cpp +++ b/launcher/LaunchController.cpp @@ -1,24 +1,27 @@ #include "LaunchController.h" -#include "MainWindow.h" -#include +#include "minecraft/auth/AccountList.h" #include "Application.h" -#include "dialogs/CustomMessageBox.h" -#include "dialogs/ProfileSelectDialog.h" -#include "dialogs/ProgressDialog.h" -#include "dialogs/EditAccountDialog.h" -#include "InstanceWindow.h" -#include "BuildConfig.h" -#include "JavaCommon.h" + +#include "ui/MainWindow.h" +#include "ui/InstanceWindow.h" +#include "ui/dialogs/CustomMessageBox.h" +#include "ui/dialogs/ProfileSelectDialog.h" +#include "ui/dialogs/ProgressDialog.h" +#include "ui/dialogs/EditAccountDialog.h" +#include "ui/dialogs/ProfileSetupDialog.h" + #include #include -#include -#include -#include #include #include #include #include -#include "dialogs/ProfileSetupDialog.h" + +#include "BuildConfig.h" +#include "JavaCommon.h" +#include "tasks/Task.h" +#include "minecraft/auth/AccountTask.h" +#include "launch/steps/TextPrint.h" LaunchController::LaunchController(QObject *parent) : Task(parent) { diff --git a/launcher/java/launch/CheckJava.cpp b/launcher/launch/steps/CheckJava.cpp similarity index 100% rename from launcher/java/launch/CheckJava.cpp rename to launcher/launch/steps/CheckJava.cpp diff --git a/launcher/java/launch/CheckJava.h b/launcher/launch/steps/CheckJava.h similarity index 100% rename from launcher/java/launch/CheckJava.h rename to launcher/launch/steps/CheckJava.h diff --git a/launcher/main.cpp b/launcher/main.cpp index 3138e7afb..aabb5a067 100644 --- a/launcher/main.cpp +++ b/launcher/main.cpp @@ -1,8 +1,4 @@ #include "Application.h" -#include "MainWindow.h" -#include "LaunchController.h" -#include -#include // #define BREAK_INFINITE_LOOP // #define BREAK_EXCEPTION diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index fe04168f8..4c16e5727 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -19,6 +19,7 @@ #include "launch/steps/Update.h" #include "launch/steps/PreLaunchCommand.h" #include "launch/steps/TextPrint.h" +#include "launch/steps/CheckJava.h" #include "minecraft/launch/LauncherPartLaunch.h" #include "minecraft/launch/DirectJavaLaunch.h" @@ -28,7 +29,6 @@ #include "minecraft/launch/ScanModFolders.h" #include "minecraft/launch/VerifyJavaInstall.h" -#include "java/launch/CheckJava.h" #include "java/JavaUtils.h" #include "meta/Index.h" diff --git a/launcher/ColorCache.cpp b/launcher/ui/ColorCache.cpp similarity index 100% rename from launcher/ColorCache.cpp rename to launcher/ui/ColorCache.cpp diff --git a/launcher/ColorCache.h b/launcher/ui/ColorCache.h similarity index 100% rename from launcher/ColorCache.h rename to launcher/ui/ColorCache.h diff --git a/launcher/GuiUtil.cpp b/launcher/ui/GuiUtil.cpp similarity index 92% rename from launcher/GuiUtil.cpp rename to launcher/ui/GuiUtil.cpp index 7988bbf83..efb1a4dfc 100644 --- a/launcher/GuiUtil.cpp +++ b/launcher/ui/GuiUtil.cpp @@ -4,9 +4,9 @@ #include #include -#include "dialogs/ProgressDialog.h" +#include "ui/dialogs/ProgressDialog.h" +#include "ui/dialogs/CustomMessageBox.h" #include "net/PasteUpload.h" -#include "dialogs/CustomMessageBox.h" #include "Application.h" #include @@ -35,8 +35,12 @@ QString GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget) dialog.execWithTask(paste.get()); if (!paste->wasSuccessful()) { - CustomMessageBox::selectable(parentWidget, QObject::tr("Upload failed"), - paste->failReason(), QMessageBox::Critical)->exec(); + CustomMessageBox::selectable( + parentWidget, + QObject::tr("Upload failed"), + paste->failReason(), + QMessageBox::Critical + )->exec(); return QString(); } else @@ -66,8 +70,9 @@ static QStringList BrowseForFileInternal(QString context, QString caption, QStri { QString location = QStandardPaths::writableLocation(l); QFileInfo finfo(location); - if (!finfo.exists()) + if (!finfo.exists()) { return; + } locations.insert(location); }; f(QStandardPaths::DesktopLocation); diff --git a/launcher/GuiUtil.h b/launcher/ui/GuiUtil.h similarity index 100% rename from launcher/GuiUtil.h rename to launcher/ui/GuiUtil.h diff --git a/launcher/InstanceWindow.cpp b/launcher/ui/InstanceWindow.cpp similarity index 98% rename from launcher/InstanceWindow.cpp rename to launcher/ui/InstanceWindow.cpp index de8708392..ae765c3c2 100644 --- a/launcher/InstanceWindow.cpp +++ b/launcher/ui/InstanceWindow.cpp @@ -23,9 +23,10 @@ #include #include -#include -#include -#include "widgets/PageContainer.h" +#include "ui/dialogs/CustomMessageBox.h" +#include "ui/dialogs/ProgressDialog.h" +#include "ui/widgets/PageContainer.h" + #include "InstancePageProvider.h" #include "icons/IconList.h" diff --git a/launcher/InstanceWindow.h b/launcher/ui/InstanceWindow.h similarity index 96% rename from launcher/InstanceWindow.h rename to launcher/ui/InstanceWindow.h index cd7d24944..1acf684ea 100644 --- a/launcher/InstanceWindow.h +++ b/launcher/ui/InstanceWindow.h @@ -16,11 +16,14 @@ #pragma once #include -#include "LaunchController.h" -#include #include + +#include "LaunchController.h" #include "launch/LaunchTask.h" -#include "pages/BasePageContainer.h" + +#include "ui/pages/BasePageContainer.h" + +#include "QObjectPtr.h" class QPushButton; class PageContainer; diff --git a/launcher/MainWindow.cpp b/launcher/ui/MainWindow.cpp similarity index 98% rename from launcher/MainWindow.cpp rename to launcher/ui/MainWindow.cpp index cb02d9e08..95d9ae5d8 100644 --- a/launcher/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -66,27 +66,31 @@ #include #include "InstanceWindow.h" #include "InstancePageProvider.h" -#include "instanceview/InstanceProxyModel.h" #include "JavaCommon.h" #include "LaunchController.h" -#include "instanceview/InstanceView.h" -#include "instanceview/InstanceDelegate.h" -#include "widgets/LabeledToolButton.h" -#include "dialogs/NewInstanceDialog.h" -#include "dialogs/ProgressDialog.h" -#include "dialogs/AboutDialog.h" -#include "dialogs/VersionSelectDialog.h" -#include "dialogs/CustomMessageBox.h" -#include "dialogs/IconPickerDialog.h" -#include "dialogs/CopyInstanceDialog.h" -#include "dialogs/UpdateDialog.h" -#include "dialogs/EditAccountDialog.h" -#include "dialogs/NotificationDialog.h" -#include "dialogs/ExportInstanceDialog.h" -#include + +#include "ui/instanceview/InstanceProxyModel.h" +#include "ui/instanceview/InstanceView.h" +#include "ui/instanceview/InstanceDelegate.h" +#include "ui/widgets/LabeledToolButton.h" +#include "ui/dialogs/NewInstanceDialog.h" +#include "ui/dialogs/ProgressDialog.h" +#include "ui/dialogs/AboutDialog.h" +#include "ui/dialogs/VersionSelectDialog.h" +#include "ui/dialogs/CustomMessageBox.h" +#include "ui/dialogs/IconPickerDialog.h" +#include "ui/dialogs/CopyInstanceDialog.h" +#include "ui/dialogs/UpdateDialog.h" +#include "ui/dialogs/EditAccountDialog.h" +#include "ui/dialogs/NotificationDialog.h" +#include "ui/dialogs/ExportInstanceDialog.h" + #include "UpdateController.h" #include "KonamiCode.h" -#include + +#include "InstanceImportTask.h" +#include "InstanceCopyTask.h" + #include "MMCTime.h" namespace { diff --git a/launcher/MainWindow.h b/launcher/ui/MainWindow.h similarity index 100% rename from launcher/MainWindow.h rename to launcher/ui/MainWindow.h diff --git a/launcher/dialogs/AboutDialog.cpp b/launcher/ui/dialogs/AboutDialog.cpp similarity index 100% rename from launcher/dialogs/AboutDialog.cpp rename to launcher/ui/dialogs/AboutDialog.cpp diff --git a/launcher/dialogs/AboutDialog.h b/launcher/ui/dialogs/AboutDialog.h similarity index 100% rename from launcher/dialogs/AboutDialog.h rename to launcher/ui/dialogs/AboutDialog.h diff --git a/launcher/dialogs/AboutDialog.ui b/launcher/ui/dialogs/AboutDialog.ui similarity index 100% rename from launcher/dialogs/AboutDialog.ui rename to launcher/ui/dialogs/AboutDialog.ui diff --git a/launcher/dialogs/CopyInstanceDialog.cpp b/launcher/ui/dialogs/CopyInstanceDialog.cpp similarity index 98% rename from launcher/dialogs/CopyInstanceDialog.cpp rename to launcher/ui/dialogs/CopyInstanceDialog.cpp index 1c8d6711e..e5113981c 100644 --- a/launcher/dialogs/CopyInstanceDialog.cpp +++ b/launcher/ui/dialogs/CopyInstanceDialog.cpp @@ -20,7 +20,7 @@ #include "CopyInstanceDialog.h" #include "ui_CopyInstanceDialog.h" -#include "dialogs/IconPickerDialog.h" +#include "ui/dialogs/IconPickerDialog.h" #include "BaseVersion.h" #include "icons/IconList.h" diff --git a/launcher/dialogs/CopyInstanceDialog.h b/launcher/ui/dialogs/CopyInstanceDialog.h similarity index 100% rename from launcher/dialogs/CopyInstanceDialog.h rename to launcher/ui/dialogs/CopyInstanceDialog.h diff --git a/launcher/dialogs/CopyInstanceDialog.ui b/launcher/ui/dialogs/CopyInstanceDialog.ui similarity index 100% rename from launcher/dialogs/CopyInstanceDialog.ui rename to launcher/ui/dialogs/CopyInstanceDialog.ui diff --git a/launcher/dialogs/CustomMessageBox.cpp b/launcher/ui/dialogs/CustomMessageBox.cpp similarity index 100% rename from launcher/dialogs/CustomMessageBox.cpp rename to launcher/ui/dialogs/CustomMessageBox.cpp diff --git a/launcher/dialogs/CustomMessageBox.h b/launcher/ui/dialogs/CustomMessageBox.h similarity index 100% rename from launcher/dialogs/CustomMessageBox.h rename to launcher/ui/dialogs/CustomMessageBox.h diff --git a/launcher/dialogs/EditAccountDialog.cpp b/launcher/ui/dialogs/EditAccountDialog.cpp similarity index 100% rename from launcher/dialogs/EditAccountDialog.cpp rename to launcher/ui/dialogs/EditAccountDialog.cpp diff --git a/launcher/dialogs/EditAccountDialog.h b/launcher/ui/dialogs/EditAccountDialog.h similarity index 100% rename from launcher/dialogs/EditAccountDialog.h rename to launcher/ui/dialogs/EditAccountDialog.h diff --git a/launcher/dialogs/EditAccountDialog.ui b/launcher/ui/dialogs/EditAccountDialog.ui similarity index 100% rename from launcher/dialogs/EditAccountDialog.ui rename to launcher/ui/dialogs/EditAccountDialog.ui diff --git a/launcher/dialogs/ExportInstanceDialog.cpp b/launcher/ui/dialogs/ExportInstanceDialog.cpp similarity index 100% rename from launcher/dialogs/ExportInstanceDialog.cpp rename to launcher/ui/dialogs/ExportInstanceDialog.cpp diff --git a/launcher/dialogs/ExportInstanceDialog.h b/launcher/ui/dialogs/ExportInstanceDialog.h similarity index 100% rename from launcher/dialogs/ExportInstanceDialog.h rename to launcher/ui/dialogs/ExportInstanceDialog.h diff --git a/launcher/dialogs/ExportInstanceDialog.ui b/launcher/ui/dialogs/ExportInstanceDialog.ui similarity index 100% rename from launcher/dialogs/ExportInstanceDialog.ui rename to launcher/ui/dialogs/ExportInstanceDialog.ui diff --git a/launcher/dialogs/IconPickerDialog.cpp b/launcher/ui/dialogs/IconPickerDialog.cpp similarity index 99% rename from launcher/dialogs/IconPickerDialog.cpp rename to launcher/ui/dialogs/IconPickerDialog.cpp index af9d06835..fcb645db4 100644 --- a/launcher/dialogs/IconPickerDialog.cpp +++ b/launcher/ui/dialogs/IconPickerDialog.cpp @@ -22,7 +22,7 @@ #include "IconPickerDialog.h" #include "ui_IconPickerDialog.h" -#include "instanceview/InstanceDelegate.h" +#include "ui/instanceview/InstanceDelegate.h" #include "icons/IconList.h" #include "icons/IconUtils.h" diff --git a/launcher/dialogs/IconPickerDialog.h b/launcher/ui/dialogs/IconPickerDialog.h similarity index 100% rename from launcher/dialogs/IconPickerDialog.h rename to launcher/ui/dialogs/IconPickerDialog.h diff --git a/launcher/dialogs/IconPickerDialog.ui b/launcher/ui/dialogs/IconPickerDialog.ui similarity index 100% rename from launcher/dialogs/IconPickerDialog.ui rename to launcher/ui/dialogs/IconPickerDialog.ui diff --git a/launcher/dialogs/LoginDialog.cpp b/launcher/ui/dialogs/LoginDialog.cpp similarity index 100% rename from launcher/dialogs/LoginDialog.cpp rename to launcher/ui/dialogs/LoginDialog.cpp diff --git a/launcher/dialogs/LoginDialog.h b/launcher/ui/dialogs/LoginDialog.h similarity index 100% rename from launcher/dialogs/LoginDialog.h rename to launcher/ui/dialogs/LoginDialog.h diff --git a/launcher/dialogs/LoginDialog.ui b/launcher/ui/dialogs/LoginDialog.ui similarity index 100% rename from launcher/dialogs/LoginDialog.ui rename to launcher/ui/dialogs/LoginDialog.ui diff --git a/launcher/dialogs/MSALoginDialog.cpp b/launcher/ui/dialogs/MSALoginDialog.cpp similarity index 100% rename from launcher/dialogs/MSALoginDialog.cpp rename to launcher/ui/dialogs/MSALoginDialog.cpp diff --git a/launcher/dialogs/MSALoginDialog.h b/launcher/ui/dialogs/MSALoginDialog.h similarity index 100% rename from launcher/dialogs/MSALoginDialog.h rename to launcher/ui/dialogs/MSALoginDialog.h diff --git a/launcher/dialogs/MSALoginDialog.ui b/launcher/ui/dialogs/MSALoginDialog.ui similarity index 100% rename from launcher/dialogs/MSALoginDialog.ui rename to launcher/ui/dialogs/MSALoginDialog.ui diff --git a/launcher/dialogs/NewComponentDialog.cpp b/launcher/ui/dialogs/NewComponentDialog.cpp similarity index 100% rename from launcher/dialogs/NewComponentDialog.cpp rename to launcher/ui/dialogs/NewComponentDialog.cpp diff --git a/launcher/dialogs/NewComponentDialog.h b/launcher/ui/dialogs/NewComponentDialog.h similarity index 100% rename from launcher/dialogs/NewComponentDialog.h rename to launcher/ui/dialogs/NewComponentDialog.h diff --git a/launcher/dialogs/NewComponentDialog.ui b/launcher/ui/dialogs/NewComponentDialog.ui similarity index 100% rename from launcher/dialogs/NewComponentDialog.ui rename to launcher/ui/dialogs/NewComponentDialog.ui diff --git a/launcher/dialogs/NewInstanceDialog.cpp b/launcher/ui/dialogs/NewInstanceDialog.cpp similarity index 94% rename from launcher/dialogs/NewInstanceDialog.cpp rename to launcher/ui/dialogs/NewInstanceDialog.cpp index a19f91b7c..b402839cf 100644 --- a/launcher/dialogs/NewInstanceDialog.cpp +++ b/launcher/ui/dialogs/NewInstanceDialog.cpp @@ -32,14 +32,14 @@ #include #include -#include "widgets/PageContainer.h" -#include -#include -#include -#include -#include -#include -#include +#include "ui/widgets/PageContainer.h" +#include "ui/pages/modplatform/VanillaPage.h" +#include "ui/pages/modplatform/atlauncher/AtlPage.h" +#include "ui/pages/modplatform/ftb/FtbPage.h" +#include "ui/pages/modplatform/legacy_ftb/Page.h" +#include "ui/pages/modplatform/flame/FlamePage.h" +#include "ui/pages/modplatform/ImportPage.h" +#include "ui/pages/modplatform/technic/TechnicPage.h" diff --git a/launcher/dialogs/NewInstanceDialog.h b/launcher/ui/dialogs/NewInstanceDialog.h similarity index 98% rename from launcher/dialogs/NewInstanceDialog.h rename to launcher/ui/dialogs/NewInstanceDialog.h index 53abf8cfb..ef74634ef 100644 --- a/launcher/dialogs/NewInstanceDialog.h +++ b/launcher/ui/dialogs/NewInstanceDialog.h @@ -18,7 +18,7 @@ #include #include "BaseVersion.h" -#include "pages/BasePageProvider.h" +#include "ui/pages/BasePageProvider.h" #include "InstanceTask.h" namespace Ui diff --git a/launcher/dialogs/NewInstanceDialog.ui b/launcher/ui/dialogs/NewInstanceDialog.ui similarity index 100% rename from launcher/dialogs/NewInstanceDialog.ui rename to launcher/ui/dialogs/NewInstanceDialog.ui diff --git a/launcher/dialogs/NotificationDialog.cpp b/launcher/ui/dialogs/NotificationDialog.cpp similarity index 100% rename from launcher/dialogs/NotificationDialog.cpp rename to launcher/ui/dialogs/NotificationDialog.cpp diff --git a/launcher/dialogs/NotificationDialog.h b/launcher/ui/dialogs/NotificationDialog.h similarity index 100% rename from launcher/dialogs/NotificationDialog.h rename to launcher/ui/dialogs/NotificationDialog.h diff --git a/launcher/dialogs/NotificationDialog.ui b/launcher/ui/dialogs/NotificationDialog.ui similarity index 100% rename from launcher/dialogs/NotificationDialog.ui rename to launcher/ui/dialogs/NotificationDialog.ui diff --git a/launcher/dialogs/ProfileSelectDialog.cpp b/launcher/ui/dialogs/ProfileSelectDialog.cpp similarity index 97% rename from launcher/dialogs/ProfileSelectDialog.cpp rename to launcher/ui/dialogs/ProfileSelectDialog.cpp index 0e3e493c3..7882cf45e 100644 --- a/launcher/dialogs/ProfileSelectDialog.cpp +++ b/launcher/ui/dialogs/ProfileSelectDialog.cpp @@ -14,16 +14,15 @@ */ #include "ProfileSelectDialog.h" -#include #include "ui_ProfileSelectDialog.h" #include - #include -#include +#include "SkinUtils.h" +#include "Application.h" -#include +#include "ui/dialogs/ProgressDialog.h" ProfileSelectDialog::ProfileSelectDialog(const QString &message, int flags, QWidget *parent) : QDialog(parent), ui(new Ui::ProfileSelectDialog) diff --git a/launcher/dialogs/ProfileSelectDialog.h b/launcher/ui/dialogs/ProfileSelectDialog.h similarity index 100% rename from launcher/dialogs/ProfileSelectDialog.h rename to launcher/ui/dialogs/ProfileSelectDialog.h diff --git a/launcher/dialogs/ProfileSelectDialog.ui b/launcher/ui/dialogs/ProfileSelectDialog.ui similarity index 100% rename from launcher/dialogs/ProfileSelectDialog.ui rename to launcher/ui/dialogs/ProfileSelectDialog.ui diff --git a/launcher/dialogs/ProfileSetupDialog.cpp b/launcher/ui/dialogs/ProfileSetupDialog.cpp similarity index 98% rename from launcher/dialogs/ProfileSetupDialog.cpp rename to launcher/ui/dialogs/ProfileSetupDialog.cpp index 51c20202f..d3e2b9a4c 100644 --- a/launcher/dialogs/ProfileSetupDialog.cpp +++ b/launcher/ui/dialogs/ProfileSetupDialog.cpp @@ -19,15 +19,15 @@ #include #include #include +#include #include -#include +#include "ui/dialogs/ProgressDialog.h" #include -#include -#include +#include "minecraft/auth/flows/AuthRequest.h" +#include "minecraft/auth/flows/Parsers.h" -#include ProfileSetupDialog::ProfileSetupDialog(MinecraftAccountPtr accountToSetup, QWidget *parent) : QDialog(parent), m_accountToSetup(accountToSetup), ui(new Ui::ProfileSetupDialog) diff --git a/launcher/dialogs/ProfileSetupDialog.h b/launcher/ui/dialogs/ProfileSetupDialog.h similarity index 100% rename from launcher/dialogs/ProfileSetupDialog.h rename to launcher/ui/dialogs/ProfileSetupDialog.h diff --git a/launcher/dialogs/ProfileSetupDialog.ui b/launcher/ui/dialogs/ProfileSetupDialog.ui similarity index 100% rename from launcher/dialogs/ProfileSetupDialog.ui rename to launcher/ui/dialogs/ProfileSetupDialog.ui diff --git a/launcher/dialogs/ProgressDialog.cpp b/launcher/ui/dialogs/ProgressDialog.cpp similarity index 100% rename from launcher/dialogs/ProgressDialog.cpp rename to launcher/ui/dialogs/ProgressDialog.cpp diff --git a/launcher/dialogs/ProgressDialog.h b/launcher/ui/dialogs/ProgressDialog.h similarity index 100% rename from launcher/dialogs/ProgressDialog.h rename to launcher/ui/dialogs/ProgressDialog.h diff --git a/launcher/dialogs/ProgressDialog.ui b/launcher/ui/dialogs/ProgressDialog.ui similarity index 100% rename from launcher/dialogs/ProgressDialog.ui rename to launcher/ui/dialogs/ProgressDialog.ui diff --git a/launcher/dialogs/SkinUploadDialog.cpp b/launcher/ui/dialogs/SkinUploadDialog.cpp similarity index 100% rename from launcher/dialogs/SkinUploadDialog.cpp rename to launcher/ui/dialogs/SkinUploadDialog.cpp diff --git a/launcher/dialogs/SkinUploadDialog.h b/launcher/ui/dialogs/SkinUploadDialog.h similarity index 100% rename from launcher/dialogs/SkinUploadDialog.h rename to launcher/ui/dialogs/SkinUploadDialog.h diff --git a/launcher/dialogs/SkinUploadDialog.ui b/launcher/ui/dialogs/SkinUploadDialog.ui similarity index 100% rename from launcher/dialogs/SkinUploadDialog.ui rename to launcher/ui/dialogs/SkinUploadDialog.ui diff --git a/launcher/dialogs/UpdateDialog.cpp b/launcher/ui/dialogs/UpdateDialog.cpp similarity index 100% rename from launcher/dialogs/UpdateDialog.cpp rename to launcher/ui/dialogs/UpdateDialog.cpp diff --git a/launcher/dialogs/UpdateDialog.h b/launcher/ui/dialogs/UpdateDialog.h similarity index 100% rename from launcher/dialogs/UpdateDialog.h rename to launcher/ui/dialogs/UpdateDialog.h diff --git a/launcher/dialogs/UpdateDialog.ui b/launcher/ui/dialogs/UpdateDialog.ui similarity index 100% rename from launcher/dialogs/UpdateDialog.ui rename to launcher/ui/dialogs/UpdateDialog.ui diff --git a/launcher/dialogs/VersionSelectDialog.cpp b/launcher/ui/dialogs/VersionSelectDialog.cpp similarity index 94% rename from launcher/dialogs/VersionSelectDialog.cpp rename to launcher/ui/dialogs/VersionSelectDialog.cpp index a920f6b7f..70ef72d6c 100644 --- a/launcher/dialogs/VersionSelectDialog.cpp +++ b/launcher/ui/dialogs/VersionSelectDialog.cpp @@ -20,17 +20,17 @@ #include #include #include - -#include -#include "CustomMessageBox.h" - -#include -#include -#include #include + +#include "ui/dialogs/ProgressDialog.h" +#include "ui/widgets/VersionSelectWidget.h" +#include "ui/dialogs/CustomMessageBox.h" + +#include "BaseVersion.h" +#include "BaseVersionList.h" +#include "tasks/Task.h" #include "Application.h" -#include -#include +#include "VersionProxyModel.h" VersionSelectDialog::VersionSelectDialog(BaseVersionList *vlist, QString title, QWidget *parent, bool cancelable) : QDialog(parent) diff --git a/launcher/dialogs/VersionSelectDialog.h b/launcher/ui/dialogs/VersionSelectDialog.h similarity index 100% rename from launcher/dialogs/VersionSelectDialog.h rename to launcher/ui/dialogs/VersionSelectDialog.h diff --git a/launcher/instanceview/AccessibleInstanceView.cpp b/launcher/ui/instanceview/AccessibleInstanceView.cpp similarity index 100% rename from launcher/instanceview/AccessibleInstanceView.cpp rename to launcher/ui/instanceview/AccessibleInstanceView.cpp diff --git a/launcher/instanceview/AccessibleInstanceView.h b/launcher/ui/instanceview/AccessibleInstanceView.h similarity index 100% rename from launcher/instanceview/AccessibleInstanceView.h rename to launcher/ui/instanceview/AccessibleInstanceView.h diff --git a/launcher/instanceview/AccessibleInstanceView_p.h b/launcher/ui/instanceview/AccessibleInstanceView_p.h similarity index 100% rename from launcher/instanceview/AccessibleInstanceView_p.h rename to launcher/ui/instanceview/AccessibleInstanceView_p.h diff --git a/launcher/instanceview/InstanceDelegate.cpp b/launcher/ui/instanceview/InstanceDelegate.cpp similarity index 100% rename from launcher/instanceview/InstanceDelegate.cpp rename to launcher/ui/instanceview/InstanceDelegate.cpp diff --git a/launcher/instanceview/InstanceDelegate.h b/launcher/ui/instanceview/InstanceDelegate.h similarity index 100% rename from launcher/instanceview/InstanceDelegate.h rename to launcher/ui/instanceview/InstanceDelegate.h diff --git a/launcher/instanceview/InstanceProxyModel.cpp b/launcher/ui/instanceview/InstanceProxyModel.cpp similarity index 100% rename from launcher/instanceview/InstanceProxyModel.cpp rename to launcher/ui/instanceview/InstanceProxyModel.cpp diff --git a/launcher/instanceview/InstanceProxyModel.h b/launcher/ui/instanceview/InstanceProxyModel.h similarity index 100% rename from launcher/instanceview/InstanceProxyModel.h rename to launcher/ui/instanceview/InstanceProxyModel.h diff --git a/launcher/instanceview/InstanceView.cpp b/launcher/ui/instanceview/InstanceView.cpp similarity index 100% rename from launcher/instanceview/InstanceView.cpp rename to launcher/ui/instanceview/InstanceView.cpp diff --git a/launcher/instanceview/InstanceView.h b/launcher/ui/instanceview/InstanceView.h similarity index 100% rename from launcher/instanceview/InstanceView.h rename to launcher/ui/instanceview/InstanceView.h diff --git a/launcher/instanceview/VisualGroup.cpp b/launcher/ui/instanceview/VisualGroup.cpp similarity index 100% rename from launcher/instanceview/VisualGroup.cpp rename to launcher/ui/instanceview/VisualGroup.cpp diff --git a/launcher/instanceview/VisualGroup.h b/launcher/ui/instanceview/VisualGroup.h similarity index 100% rename from launcher/instanceview/VisualGroup.h rename to launcher/ui/instanceview/VisualGroup.h diff --git a/launcher/pagedialog/PageDialog.cpp b/launcher/ui/pagedialog/PageDialog.cpp similarity index 96% rename from launcher/pagedialog/PageDialog.cpp rename to launcher/ui/pagedialog/PageDialog.cpp index 3f5089907..18d61dc2f 100644 --- a/launcher/pagedialog/PageDialog.cpp +++ b/launcher/ui/pagedialog/PageDialog.cpp @@ -22,8 +22,9 @@ #include "Application.h" #include "settings/SettingsObject.h" -#include "widgets/IconLabel.h" -#include "widgets/PageContainer.h" + +#include "ui/widgets/IconLabel.h" +#include "ui/widgets/PageContainer.h" PageDialog::PageDialog(BasePageProvider *pageProvider, QString defaultId, QWidget *parent) : QDialog(parent) diff --git a/launcher/pagedialog/PageDialog.h b/launcher/ui/pagedialog/PageDialog.h similarity index 96% rename from launcher/pagedialog/PageDialog.h rename to launcher/ui/pagedialog/PageDialog.h index 1029bc30b..00d8b725b 100644 --- a/launcher/pagedialog/PageDialog.h +++ b/launcher/ui/pagedialog/PageDialog.h @@ -16,7 +16,7 @@ #pragma once #include -#include "pages/BasePageProvider.h" +#include "ui/pages/BasePageProvider.h" class PageContainer; class PageDialog : public QDialog diff --git a/launcher/pages/BasePage.h b/launcher/ui/pages/BasePage.h similarity index 100% rename from launcher/pages/BasePage.h rename to launcher/ui/pages/BasePage.h diff --git a/launcher/pages/BasePageContainer.h b/launcher/ui/pages/BasePageContainer.h similarity index 100% rename from launcher/pages/BasePageContainer.h rename to launcher/ui/pages/BasePageContainer.h diff --git a/launcher/pages/BasePageProvider.h b/launcher/ui/pages/BasePageProvider.h similarity index 98% rename from launcher/pages/BasePageProvider.h rename to launcher/ui/pages/BasePageProvider.h index 7bfaaf3b1..873e8dce2 100644 --- a/launcher/pages/BasePageProvider.h +++ b/launcher/ui/pages/BasePageProvider.h @@ -15,7 +15,7 @@ #pragma once -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include #include diff --git a/launcher/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp similarity index 97% rename from launcher/pages/global/AccountListPage.cpp rename to launcher/ui/pages/global/AccountListPage.cpp index 1e175df73..816dce473 100644 --- a/launcher/pages/global/AccountListPage.cpp +++ b/launcher/ui/pages/global/AccountListPage.cpp @@ -23,10 +23,12 @@ #include "net/NetJob.h" -#include "dialogs/ProgressDialog.h" -#include "dialogs/LoginDialog.h" -#include "dialogs/CustomMessageBox.h" -#include "dialogs/SkinUploadDialog.h" +#include "ui/dialogs/ProgressDialog.h" +#include "ui/dialogs/LoginDialog.h" +#include "ui/dialogs/MSALoginDialog.h" +#include "ui/dialogs/CustomMessageBox.h" +#include "ui/dialogs/SkinUploadDialog.h" + #include "tasks/Task.h" #include "minecraft/auth/AccountTask.h" #include "minecraft/services/SkinDelete.h" @@ -34,7 +36,6 @@ #include "Application.h" #include "BuildConfig.h" -#include #include "Secrets.h" diff --git a/launcher/pages/global/AccountListPage.h b/launcher/ui/pages/global/AccountListPage.h similarity index 98% rename from launcher/pages/global/AccountListPage.h rename to launcher/ui/pages/global/AccountListPage.h index eb131ea88..1c65e7081 100644 --- a/launcher/pages/global/AccountListPage.h +++ b/launcher/ui/pages/global/AccountListPage.h @@ -18,7 +18,7 @@ #include #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include "minecraft/auth/AccountList.h" #include "Application.h" diff --git a/launcher/pages/global/AccountListPage.ui b/launcher/ui/pages/global/AccountListPage.ui similarity index 97% rename from launcher/pages/global/AccountListPage.ui rename to launcher/ui/pages/global/AccountListPage.ui index 8af23a2f0..29738c023 100644 --- a/launcher/pages/global/AccountListPage.ui +++ b/launcher/ui/pages/global/AccountListPage.ui @@ -116,12 +116,12 @@ VersionListView QTreeView -
widgets/VersionListView.h
+
ui/widgets/VersionListView.h
WideBar QToolBar -
widgets/WideBar.h
+
ui/widgets/WideBar.h
diff --git a/launcher/pages/global/CustomCommandsPage.cpp b/launcher/ui/pages/global/CustomCommandsPage.cpp similarity index 100% rename from launcher/pages/global/CustomCommandsPage.cpp rename to launcher/ui/pages/global/CustomCommandsPage.cpp diff --git a/launcher/pages/global/CustomCommandsPage.h b/launcher/ui/pages/global/CustomCommandsPage.h similarity index 95% rename from launcher/pages/global/CustomCommandsPage.h rename to launcher/ui/pages/global/CustomCommandsPage.h index f81b192a2..a1155e0e0 100644 --- a/launcher/pages/global/CustomCommandsPage.h +++ b/launcher/ui/pages/global/CustomCommandsPage.h @@ -18,9 +18,9 @@ #include #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include -#include "widgets/CustomCommands.h" +#include "ui/widgets/CustomCommands.h" class CustomCommandsPage : public QWidget, public BasePage { diff --git a/launcher/pages/global/ExternalToolsPage.cpp b/launcher/ui/pages/global/ExternalToolsPage.cpp similarity index 100% rename from launcher/pages/global/ExternalToolsPage.cpp rename to launcher/ui/pages/global/ExternalToolsPage.cpp diff --git a/launcher/pages/global/ExternalToolsPage.h b/launcher/ui/pages/global/ExternalToolsPage.h similarity index 98% rename from launcher/pages/global/ExternalToolsPage.h rename to launcher/ui/pages/global/ExternalToolsPage.h index 9571ce75f..5ae6148d9 100644 --- a/launcher/pages/global/ExternalToolsPage.h +++ b/launcher/ui/pages/global/ExternalToolsPage.h @@ -17,7 +17,7 @@ #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include namespace Ui { diff --git a/launcher/pages/global/ExternalToolsPage.ui b/launcher/ui/pages/global/ExternalToolsPage.ui similarity index 100% rename from launcher/pages/global/ExternalToolsPage.ui rename to launcher/ui/pages/global/ExternalToolsPage.ui diff --git a/launcher/pages/global/JavaPage.cpp b/launcher/ui/pages/global/JavaPage.cpp similarity index 98% rename from launcher/pages/global/JavaPage.cpp rename to launcher/ui/pages/global/JavaPage.cpp index fe545636d..bd79f11af 100644 --- a/launcher/pages/global/JavaPage.cpp +++ b/launcher/ui/pages/global/JavaPage.cpp @@ -22,7 +22,7 @@ #include #include -#include "dialogs/VersionSelectDialog.h" +#include "ui/dialogs/VersionSelectDialog.h" #include "java/JavaUtils.h" #include "java/JavaInstallList.h" diff --git a/launcher/pages/global/JavaPage.h b/launcher/ui/pages/global/JavaPage.h similarity index 98% rename from launcher/pages/global/JavaPage.h rename to launcher/ui/pages/global/JavaPage.h index 56a1d36b7..8f9b33236 100644 --- a/launcher/pages/global/JavaPage.h +++ b/launcher/ui/pages/global/JavaPage.h @@ -17,7 +17,7 @@ #include #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include "JavaCommon.h" #include #include diff --git a/launcher/pages/global/JavaPage.ui b/launcher/ui/pages/global/JavaPage.ui similarity index 100% rename from launcher/pages/global/JavaPage.ui rename to launcher/ui/pages/global/JavaPage.ui diff --git a/launcher/pages/global/LanguagePage.cpp b/launcher/ui/pages/global/LanguagePage.cpp similarity index 95% rename from launcher/pages/global/LanguagePage.cpp rename to launcher/ui/pages/global/LanguagePage.cpp index 142517dbd..359fdeebd 100644 --- a/launcher/pages/global/LanguagePage.cpp +++ b/launcher/ui/pages/global/LanguagePage.cpp @@ -1,6 +1,6 @@ #include "LanguagePage.h" -#include "widgets/LanguageSelectionWidget.h" +#include "ui/widgets/LanguageSelectionWidget.h" #include LanguagePage::LanguagePage(QWidget* parent) : diff --git a/launcher/pages/global/LanguagePage.h b/launcher/ui/pages/global/LanguagePage.h similarity index 97% rename from launcher/pages/global/LanguagePage.h rename to launcher/ui/pages/global/LanguagePage.h index c269cefc7..b1dd05ad6 100644 --- a/launcher/pages/global/LanguagePage.h +++ b/launcher/ui/pages/global/LanguagePage.h @@ -16,7 +16,7 @@ #pragma once #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include #include diff --git a/launcher/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp similarity index 99% rename from launcher/pages/global/LauncherPage.cpp rename to launcher/ui/pages/global/LauncherPage.cpp index b77a9e81f..2eb73e44d 100644 --- a/launcher/pages/global/LauncherPage.cpp +++ b/launcher/ui/pages/global/LauncherPage.cpp @@ -27,7 +27,7 @@ #include #include "Application.h" #include "BuildConfig.h" -#include "themes/ITheme.h" +#include "ui/themes/ITheme.h" #include #include diff --git a/launcher/pages/global/LauncherPage.h b/launcher/ui/pages/global/LauncherPage.h similarity index 97% rename from launcher/pages/global/LauncherPage.h rename to launcher/ui/pages/global/LauncherPage.h index 62a4f84cf..4d0cf3c96 100644 --- a/launcher/pages/global/LauncherPage.h +++ b/launcher/ui/pages/global/LauncherPage.h @@ -19,9 +19,9 @@ #include #include "java/JavaChecker.h" -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include -#include "ColorCache.h" +#include "ui/ColorCache.h" #include class QTextCharFormat; diff --git a/launcher/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui similarity index 100% rename from launcher/pages/global/LauncherPage.ui rename to launcher/ui/pages/global/LauncherPage.ui diff --git a/launcher/pages/global/MinecraftPage.cpp b/launcher/ui/pages/global/MinecraftPage.cpp similarity index 100% rename from launcher/pages/global/MinecraftPage.cpp rename to launcher/ui/pages/global/MinecraftPage.cpp diff --git a/launcher/pages/global/MinecraftPage.h b/launcher/ui/pages/global/MinecraftPage.h similarity index 97% rename from launcher/pages/global/MinecraftPage.h rename to launcher/ui/pages/global/MinecraftPage.h index 96a90f6e0..42626d943 100644 --- a/launcher/pages/global/MinecraftPage.h +++ b/launcher/ui/pages/global/MinecraftPage.h @@ -19,7 +19,7 @@ #include #include "java/JavaChecker.h" -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include class SettingsObject; diff --git a/launcher/pages/global/MinecraftPage.ui b/launcher/ui/pages/global/MinecraftPage.ui similarity index 100% rename from launcher/pages/global/MinecraftPage.ui rename to launcher/ui/pages/global/MinecraftPage.ui diff --git a/launcher/pages/global/PasteEEPage.cpp b/launcher/ui/pages/global/PasteEEPage.cpp similarity index 100% rename from launcher/pages/global/PasteEEPage.cpp rename to launcher/ui/pages/global/PasteEEPage.cpp diff --git a/launcher/pages/global/PasteEEPage.h b/launcher/ui/pages/global/PasteEEPage.h similarity index 97% rename from launcher/pages/global/PasteEEPage.h rename to launcher/ui/pages/global/PasteEEPage.h index 0ea74e7c3..a1c7d434b 100644 --- a/launcher/pages/global/PasteEEPage.h +++ b/launcher/ui/pages/global/PasteEEPage.h @@ -17,7 +17,7 @@ #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include namespace Ui { diff --git a/launcher/pages/global/PasteEEPage.ui b/launcher/ui/pages/global/PasteEEPage.ui similarity index 100% rename from launcher/pages/global/PasteEEPage.ui rename to launcher/ui/pages/global/PasteEEPage.ui diff --git a/launcher/pages/global/ProxyPage.cpp b/launcher/ui/pages/global/ProxyPage.cpp similarity index 100% rename from launcher/pages/global/ProxyPage.cpp rename to launcher/ui/pages/global/ProxyPage.cpp diff --git a/launcher/pages/global/ProxyPage.h b/launcher/ui/pages/global/ProxyPage.h similarity index 97% rename from launcher/pages/global/ProxyPage.h rename to launcher/ui/pages/global/ProxyPage.h index 91f1fbaa0..6698c3498 100644 --- a/launcher/pages/global/ProxyPage.h +++ b/launcher/ui/pages/global/ProxyPage.h @@ -18,7 +18,7 @@ #include #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include namespace Ui diff --git a/launcher/pages/global/ProxyPage.ui b/launcher/ui/pages/global/ProxyPage.ui similarity index 100% rename from launcher/pages/global/ProxyPage.ui rename to launcher/ui/pages/global/ProxyPage.ui diff --git a/launcher/pages/instance/GameOptionsPage.cpp b/launcher/ui/pages/instance/GameOptionsPage.cpp similarity index 100% rename from launcher/pages/instance/GameOptionsPage.cpp rename to launcher/ui/pages/instance/GameOptionsPage.cpp diff --git a/launcher/pages/instance/GameOptionsPage.h b/launcher/ui/pages/instance/GameOptionsPage.h similarity index 97% rename from launcher/pages/instance/GameOptionsPage.h rename to launcher/ui/pages/instance/GameOptionsPage.h index 31e7b2ddb..878903ebf 100644 --- a/launcher/pages/instance/GameOptionsPage.h +++ b/launcher/ui/pages/instance/GameOptionsPage.h @@ -18,7 +18,7 @@ #include #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include namespace Ui diff --git a/launcher/pages/instance/GameOptionsPage.ui b/launcher/ui/pages/instance/GameOptionsPage.ui similarity index 100% rename from launcher/pages/instance/GameOptionsPage.ui rename to launcher/ui/pages/instance/GameOptionsPage.ui diff --git a/launcher/pages/instance/InstanceSettingsPage.cpp b/launcher/ui/pages/instance/InstanceSettingsPage.cpp similarity index 98% rename from launcher/pages/instance/InstanceSettingsPage.cpp rename to launcher/ui/pages/instance/InstanceSettingsPage.cpp index 730fcbbdc..b0e18af4d 100644 --- a/launcher/pages/instance/InstanceSettingsPage.cpp +++ b/launcher/ui/pages/instance/InstanceSettingsPage.cpp @@ -5,14 +5,17 @@ #include #include -#include "dialogs/VersionSelectDialog.h" +#include + +#include "ui/dialogs/VersionSelectDialog.h" +#include "ui/widgets/CustomCommands.h" + #include "JavaCommon.h" #include "Application.h" -#include -#include -#include -#include +#include "java/JavaInstallList.h" +#include "FileSystem.h" + InstanceSettingsPage::InstanceSettingsPage(BaseInstance *inst, QWidget *parent) : QWidget(parent), ui(new Ui::InstanceSettingsPage), m_instance(inst) diff --git a/launcher/pages/instance/InstanceSettingsPage.h b/launcher/ui/pages/instance/InstanceSettingsPage.h similarity index 98% rename from launcher/pages/instance/InstanceSettingsPage.h rename to launcher/ui/pages/instance/InstanceSettingsPage.h index 88169a671..5c8c8e660 100644 --- a/launcher/pages/instance/InstanceSettingsPage.h +++ b/launcher/ui/pages/instance/InstanceSettingsPage.h @@ -20,7 +20,7 @@ #include "java/JavaChecker.h" #include "BaseInstance.h" #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include "JavaCommon.h" #include "Application.h" diff --git a/launcher/pages/instance/InstanceSettingsPage.ui b/launcher/ui/pages/instance/InstanceSettingsPage.ui similarity index 99% rename from launcher/pages/instance/InstanceSettingsPage.ui rename to launcher/ui/pages/instance/InstanceSettingsPage.ui index 35cd73352..729f8e2a6 100644 --- a/launcher/pages/instance/InstanceSettingsPage.ui +++ b/launcher/ui/pages/instance/InstanceSettingsPage.ui @@ -511,7 +511,7 @@ CustomCommands QWidget -
widgets/CustomCommands.h
+
ui/widgets/CustomCommands.h
1
diff --git a/launcher/pages/instance/LegacyUpgradePage.cpp b/launcher/ui/pages/instance/LegacyUpgradePage.cpp similarity index 94% rename from launcher/pages/instance/LegacyUpgradePage.cpp rename to launcher/ui/pages/instance/LegacyUpgradePage.cpp index 214447560..cb78af020 100644 --- a/launcher/pages/instance/LegacyUpgradePage.cpp +++ b/launcher/ui/pages/instance/LegacyUpgradePage.cpp @@ -5,8 +5,9 @@ #include "minecraft/legacy/LegacyInstance.h" #include "minecraft/legacy/LegacyUpgradeTask.h" #include "Application.h" -#include "dialogs/CustomMessageBox.h" -#include "dialogs/ProgressDialog.h" + +#include "ui/dialogs/CustomMessageBox.h" +#include "ui/dialogs/ProgressDialog.h" LegacyUpgradePage::LegacyUpgradePage(InstancePtr inst, QWidget *parent) : QWidget(parent), ui(new Ui::LegacyUpgradePage), m_inst(inst) diff --git a/launcher/pages/instance/LegacyUpgradePage.h b/launcher/ui/pages/instance/LegacyUpgradePage.h similarity index 98% rename from launcher/pages/instance/LegacyUpgradePage.h rename to launcher/ui/pages/instance/LegacyUpgradePage.h index f4b7b57ca..7c51956be 100644 --- a/launcher/pages/instance/LegacyUpgradePage.h +++ b/launcher/ui/pages/instance/LegacyUpgradePage.h @@ -18,7 +18,7 @@ #include #include "minecraft/legacy/LegacyInstance.h" -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include #include "tasks/Task.h" diff --git a/launcher/pages/instance/LegacyUpgradePage.ui b/launcher/ui/pages/instance/LegacyUpgradePage.ui similarity index 100% rename from launcher/pages/instance/LegacyUpgradePage.ui rename to launcher/ui/pages/instance/LegacyUpgradePage.ui diff --git a/launcher/pages/instance/LogPage.cpp b/launcher/ui/pages/instance/LogPage.cpp similarity index 99% rename from launcher/pages/instance/LogPage.cpp rename to launcher/ui/pages/instance/LogPage.cpp index b9046b621..b66c6cc7b 100644 --- a/launcher/pages/instance/LogPage.cpp +++ b/launcher/ui/pages/instance/LogPage.cpp @@ -8,9 +8,11 @@ #include #include "launch/LaunchTask.h" -#include -#include "GuiUtil.h" -#include +#include "settings/Setting.h" + +#include "ui/GuiUtil.h" +#include "ui/ColorCache.h" + #include class LogFormatProxyModel : public QIdentityProxyModel diff --git a/launcher/pages/instance/LogPage.h b/launcher/ui/pages/instance/LogPage.h similarity index 98% rename from launcher/pages/instance/LogPage.h rename to launcher/ui/pages/instance/LogPage.h index 270a533af..cab25563d 100644 --- a/launcher/pages/instance/LogPage.h +++ b/launcher/ui/pages/instance/LogPage.h @@ -19,7 +19,7 @@ #include "BaseInstance.h" #include "launch/LaunchTask.h" -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include namespace Ui diff --git a/launcher/pages/instance/LogPage.ui b/launcher/ui/pages/instance/LogPage.ui similarity index 99% rename from launcher/pages/instance/LogPage.ui rename to launcher/ui/pages/instance/LogPage.ui index 4843d7c3f..ccfc15517 100644 --- a/launcher/pages/instance/LogPage.ui +++ b/launcher/ui/pages/instance/LogPage.ui @@ -163,7 +163,7 @@ LogView QPlainTextEdit -
widgets/LogView.h
+
ui/widgets/LogView.h
diff --git a/launcher/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp similarity index 99% rename from launcher/pages/instance/ModFolderPage.cpp rename to launcher/ui/pages/instance/ModFolderPage.cpp index 6d496e55d..e63b1434e 100644 --- a/launcher/pages/instance/ModFolderPage.cpp +++ b/launcher/ui/pages/instance/ModFolderPage.cpp @@ -21,17 +21,20 @@ #include #include #include +#include #include "Application.h" -#include "dialogs/CustomMessageBox.h" -#include + +#include "ui/dialogs/CustomMessageBox.h" +#include "ui/GuiUtil.h" + +#include "DesktopServices.h" + #include "minecraft/mod/ModFolderModel.h" #include "minecraft/mod/Mod.h" #include "minecraft/VersionFilterData.h" #include "minecraft/PackProfile.h" -#include -#include #include "Version.h" namespace { diff --git a/launcher/pages/instance/ModFolderPage.h b/launcher/ui/pages/instance/ModFolderPage.h similarity index 99% rename from launcher/pages/instance/ModFolderPage.h rename to launcher/ui/pages/instance/ModFolderPage.h index 7a81f63a0..8ef7559b1 100644 --- a/launcher/pages/instance/ModFolderPage.h +++ b/launcher/ui/pages/instance/ModFolderPage.h @@ -18,7 +18,8 @@ #include #include "minecraft/MinecraftInstance.h" -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" + #include class ModFolderModel; diff --git a/launcher/pages/instance/ModFolderPage.ui b/launcher/ui/pages/instance/ModFolderPage.ui similarity index 97% rename from launcher/pages/instance/ModFolderPage.ui rename to launcher/ui/pages/instance/ModFolderPage.ui index 954a01676..0fb51e84f 100644 --- a/launcher/pages/instance/ModFolderPage.ui +++ b/launcher/ui/pages/instance/ModFolderPage.ui @@ -141,18 +141,18 @@ ModListView QTreeView -
widgets/ModListView.h
+
ui/widgets/ModListView.h
MCModInfoFrame QFrame -
widgets/MCModInfoFrame.h
+
ui/widgets/MCModInfoFrame.h
1
WideBar QToolBar -
widgets/WideBar.h
+
ui/widgets/WideBar.h
diff --git a/launcher/pages/instance/NotesPage.cpp b/launcher/ui/pages/instance/NotesPage.cpp similarity index 100% rename from launcher/pages/instance/NotesPage.cpp rename to launcher/ui/pages/instance/NotesPage.cpp diff --git a/launcher/pages/instance/NotesPage.h b/launcher/ui/pages/instance/NotesPage.h similarity index 97% rename from launcher/pages/instance/NotesPage.h rename to launcher/ui/pages/instance/NotesPage.h index 23d2684aa..539401ee7 100644 --- a/launcher/pages/instance/NotesPage.h +++ b/launcher/ui/pages/instance/NotesPage.h @@ -18,7 +18,7 @@ #include #include "BaseInstance.h" -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include namespace Ui diff --git a/launcher/pages/instance/NotesPage.ui b/launcher/ui/pages/instance/NotesPage.ui similarity index 100% rename from launcher/pages/instance/NotesPage.ui rename to launcher/ui/pages/instance/NotesPage.ui diff --git a/launcher/pages/instance/OtherLogsPage.cpp b/launcher/ui/pages/instance/OtherLogsPage.cpp similarity index 99% rename from launcher/pages/instance/OtherLogsPage.cpp rename to launcher/ui/pages/instance/OtherLogsPage.cpp index 6705c059f..0131c5c1f 100644 --- a/launcher/pages/instance/OtherLogsPage.cpp +++ b/launcher/ui/pages/instance/OtherLogsPage.cpp @@ -18,7 +18,8 @@ #include -#include "GuiUtil.h" +#include "ui/GuiUtil.h" + #include "RecursiveFileSystemWatcher.h" #include #include diff --git a/launcher/pages/instance/OtherLogsPage.h b/launcher/ui/pages/instance/OtherLogsPage.h similarity index 98% rename from launcher/pages/instance/OtherLogsPage.h rename to launcher/ui/pages/instance/OtherLogsPage.h index c83236598..b2b2a91be 100644 --- a/launcher/pages/instance/OtherLogsPage.h +++ b/launcher/ui/pages/instance/OtherLogsPage.h @@ -17,7 +17,7 @@ #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include #include diff --git a/launcher/pages/instance/OtherLogsPage.ui b/launcher/ui/pages/instance/OtherLogsPage.ui similarity index 100% rename from launcher/pages/instance/OtherLogsPage.ui rename to launcher/ui/pages/instance/OtherLogsPage.ui diff --git a/launcher/pages/instance/ResourcePackPage.h b/launcher/ui/pages/instance/ResourcePackPage.h similarity index 100% rename from launcher/pages/instance/ResourcePackPage.h rename to launcher/ui/pages/instance/ResourcePackPage.h diff --git a/launcher/pages/instance/ScreenshotsPage.cpp b/launcher/ui/pages/instance/ScreenshotsPage.cpp similarity index 99% rename from launcher/pages/instance/ScreenshotsPage.cpp rename to launcher/ui/pages/instance/ScreenshotsPage.cpp index b2d440c3a..06c4379f3 100644 --- a/launcher/pages/instance/ScreenshotsPage.cpp +++ b/launcher/ui/pages/instance/ScreenshotsPage.cpp @@ -17,8 +17,9 @@ #include -#include "dialogs/ProgressDialog.h" -#include "dialogs/CustomMessageBox.h" +#include "ui/dialogs/ProgressDialog.h" +#include "ui/dialogs/CustomMessageBox.h" + #include "net/NetJob.h" #include "screenshots/ImgurUpload.h" #include "screenshots/ImgurAlbumCreation.h" diff --git a/launcher/pages/instance/ScreenshotsPage.h b/launcher/ui/pages/instance/ScreenshotsPage.h similarity index 98% rename from launcher/pages/instance/ScreenshotsPage.h rename to launcher/ui/pages/instance/ScreenshotsPage.h index 84145b0e9..d2f448373 100644 --- a/launcher/pages/instance/ScreenshotsPage.h +++ b/launcher/ui/pages/instance/ScreenshotsPage.h @@ -17,7 +17,7 @@ #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include class QFileSystemModel; diff --git a/launcher/pages/instance/ScreenshotsPage.ui b/launcher/ui/pages/instance/ScreenshotsPage.ui similarity index 98% rename from launcher/pages/instance/ScreenshotsPage.ui rename to launcher/ui/pages/instance/ScreenshotsPage.ui index f11f4cd4c..ec4610877 100644 --- a/launcher/pages/instance/ScreenshotsPage.ui +++ b/launcher/ui/pages/instance/ScreenshotsPage.ui @@ -79,7 +79,7 @@ WideBar QToolBar -
widgets/WideBar.h
+
ui/widgets/WideBar.h
diff --git a/launcher/pages/instance/ServersPage.cpp b/launcher/ui/pages/instance/ServersPage.cpp similarity index 100% rename from launcher/pages/instance/ServersPage.cpp rename to launcher/ui/pages/instance/ServersPage.cpp diff --git a/launcher/pages/instance/ServersPage.h b/launcher/ui/pages/instance/ServersPage.h similarity index 98% rename from launcher/pages/instance/ServersPage.h rename to launcher/ui/pages/instance/ServersPage.h index 1f678bce5..d91da2aef 100644 --- a/launcher/pages/instance/ServersPage.h +++ b/launcher/ui/pages/instance/ServersPage.h @@ -18,7 +18,7 @@ #include #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include namespace Ui diff --git a/launcher/pages/instance/ServersPage.ui b/launcher/ui/pages/instance/ServersPage.ui similarity index 99% rename from launcher/pages/instance/ServersPage.ui rename to launcher/ui/pages/instance/ServersPage.ui index d89b7cba6..e8f79cf2e 100644 --- a/launcher/pages/instance/ServersPage.ui +++ b/launcher/ui/pages/instance/ServersPage.ui @@ -180,7 +180,7 @@ WideBar QToolBar -
widgets/WideBar.h
+
ui/widgets/WideBar.h
diff --git a/launcher/pages/instance/ShaderPackPage.h b/launcher/ui/pages/instance/ShaderPackPage.h similarity index 100% rename from launcher/pages/instance/ShaderPackPage.h rename to launcher/ui/pages/instance/ShaderPackPage.h diff --git a/launcher/pages/instance/TexturePackPage.h b/launcher/ui/pages/instance/TexturePackPage.h similarity index 100% rename from launcher/pages/instance/TexturePackPage.h rename to launcher/ui/pages/instance/TexturePackPage.h diff --git a/launcher/pages/instance/VersionPage.cpp b/launcher/ui/pages/instance/VersionPage.cpp similarity index 98% rename from launcher/pages/instance/VersionPage.cpp rename to launcher/ui/pages/instance/VersionPage.cpp index d36f7b8df..715059ff8 100644 --- a/launcher/pages/instance/VersionPage.cpp +++ b/launcher/ui/pages/instance/VersionPage.cpp @@ -20,23 +20,22 @@ #include #include #include - -#include "VersionPage.h" -#include "ui_VersionPage.h" - -#include "dialogs/CustomMessageBox.h" -#include "dialogs/VersionSelectDialog.h" -#include "dialogs/NewComponentDialog.h" - -#include "dialogs/ProgressDialog.h" -#include - #include #include #include #include #include +#include "VersionPage.h" +#include "ui_VersionPage.h" + +#include "ui/dialogs/CustomMessageBox.h" +#include "ui/dialogs/VersionSelectDialog.h" +#include "ui/dialogs/NewComponentDialog.h" +#include "ui/dialogs/ProgressDialog.h" + +#include "ui/GuiUtil.h" + #include "minecraft/PackProfile.h" #include "minecraft/auth/AccountList.h" #include "minecraft/mod/Mod.h" @@ -45,8 +44,8 @@ #include "Version.h" #include "DesktopServices.h" -#include -#include +#include "meta/Index.h" +#include "meta/VersionList.h" class IconProxy : public QIdentityProxyModel { diff --git a/launcher/pages/instance/VersionPage.h b/launcher/ui/pages/instance/VersionPage.h similarity index 98% rename from launcher/pages/instance/VersionPage.h rename to launcher/ui/pages/instance/VersionPage.h index b5b4a6f5d..b5ce40644 100644 --- a/launcher/pages/instance/VersionPage.h +++ b/launcher/ui/pages/instance/VersionPage.h @@ -19,7 +19,7 @@ #include "minecraft/MinecraftInstance.h" #include "minecraft/PackProfile.h" -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" namespace Ui { diff --git a/launcher/pages/instance/VersionPage.ui b/launcher/ui/pages/instance/VersionPage.ui similarity index 98% rename from launcher/pages/instance/VersionPage.ui rename to launcher/ui/pages/instance/VersionPage.ui index 84d06e2e8..a4990ff3d 100644 --- a/launcher/pages/instance/VersionPage.ui +++ b/launcher/ui/pages/instance/VersionPage.ui @@ -266,18 +266,18 @@ ModListView QTreeView -
widgets/ModListView.h
+
ui/widgets/ModListView.h
MCModInfoFrame QFrame -
widgets/MCModInfoFrame.h
+
ui/widgets/MCModInfoFrame.h
1
WideBar QToolBar -
widgets/WideBar.h
+
ui/widgets/WideBar.h
diff --git a/launcher/pages/instance/WorldListPage.cpp b/launcher/ui/pages/instance/WorldListPage.cpp similarity index 98% rename from launcher/pages/instance/WorldListPage.cpp rename to launcher/ui/pages/instance/WorldListPage.cpp index 1af38bb84..d2bf63bda 100644 --- a/launcher/pages/instance/WorldListPage.cpp +++ b/launcher/ui/pages/instance/WorldListPage.cpp @@ -16,7 +16,7 @@ #include "WorldListPage.h" #include "ui_WorldListPage.h" #include "minecraft/WorldList.h" -#include + #include #include #include @@ -24,12 +24,16 @@ #include #include #include -#include +#include + +#include "tools/MCEditTool.h" +#include "FileSystem.h" + +#include "ui/GuiUtil.h" +#include "DesktopServices.h" #include "Application.h" -#include -#include -#include + class WorldListProxyModel : public QSortFilterProxyModel { diff --git a/launcher/pages/instance/WorldListPage.h b/launcher/ui/pages/instance/WorldListPage.h similarity index 98% rename from launcher/pages/instance/WorldListPage.h rename to launcher/ui/pages/instance/WorldListPage.h index 7636d6042..e07d5794d 100644 --- a/launcher/pages/instance/WorldListPage.h +++ b/launcher/ui/pages/instance/WorldListPage.h @@ -18,7 +18,7 @@ #include #include "minecraft/MinecraftInstance.h" -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include #include diff --git a/launcher/pages/instance/WorldListPage.ui b/launcher/ui/pages/instance/WorldListPage.ui similarity index 99% rename from launcher/pages/instance/WorldListPage.ui rename to launcher/ui/pages/instance/WorldListPage.ui index ed078d946..7c68bfaee 100644 --- a/launcher/pages/instance/WorldListPage.ui +++ b/launcher/ui/pages/instance/WorldListPage.ui @@ -153,7 +153,7 @@ WideBar QToolBar -
widgets/WideBar.h
+
ui/widgets/WideBar.h
diff --git a/launcher/pages/modplatform/ImportPage.cpp b/launcher/ui/pages/modplatform/ImportPage.cpp similarity index 96% rename from launcher/pages/modplatform/ImportPage.cpp rename to launcher/ui/pages/modplatform/ImportPage.cpp index 890cc3a05..c9e24ead2 100644 --- a/launcher/pages/modplatform/ImportPage.cpp +++ b/launcher/ui/pages/modplatform/ImportPage.cpp @@ -1,11 +1,13 @@ #include "ImportPage.h" #include "ui_ImportPage.h" -#include "Application.h" -#include "dialogs/NewInstanceDialog.h" #include #include -#include + +#include "ui/dialogs/NewInstanceDialog.h" + +#include "InstanceImportTask.h" + class UrlValidator : public QValidator { diff --git a/launcher/pages/modplatform/ImportPage.h b/launcher/ui/pages/modplatform/ImportPage.h similarity index 98% rename from launcher/pages/modplatform/ImportPage.h rename to launcher/ui/pages/modplatform/ImportPage.h index c39d2a74a..aba4def01 100644 --- a/launcher/pages/modplatform/ImportPage.h +++ b/launcher/ui/pages/modplatform/ImportPage.h @@ -17,7 +17,7 @@ #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include #include "tasks/Task.h" diff --git a/launcher/pages/modplatform/ImportPage.ui b/launcher/ui/pages/modplatform/ImportPage.ui similarity index 100% rename from launcher/pages/modplatform/ImportPage.ui rename to launcher/ui/pages/modplatform/ImportPage.ui diff --git a/launcher/pages/modplatform/VanillaPage.cpp b/launcher/ui/pages/modplatform/VanillaPage.cpp similarity index 98% rename from launcher/pages/modplatform/VanillaPage.cpp rename to launcher/ui/pages/modplatform/VanillaPage.cpp index 4527d1a05..5c58c1f16 100644 --- a/launcher/pages/modplatform/VanillaPage.cpp +++ b/launcher/ui/pages/modplatform/VanillaPage.cpp @@ -6,7 +6,7 @@ #include "Application.h" #include "meta/Index.h" #include "meta/VersionList.h" -#include "dialogs/NewInstanceDialog.h" +#include "ui/dialogs/NewInstanceDialog.h" #include "Filter.h" #include "InstanceCreationTask.h" diff --git a/launcher/pages/modplatform/VanillaPage.h b/launcher/ui/pages/modplatform/VanillaPage.h similarity index 98% rename from launcher/pages/modplatform/VanillaPage.h rename to launcher/ui/pages/modplatform/VanillaPage.h index 22acbcacc..fd4c2daad 100644 --- a/launcher/pages/modplatform/VanillaPage.h +++ b/launcher/ui/pages/modplatform/VanillaPage.h @@ -17,7 +17,7 @@ #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include #include "tasks/Task.h" diff --git a/launcher/pages/modplatform/VanillaPage.ui b/launcher/ui/pages/modplatform/VanillaPage.ui similarity index 98% rename from launcher/pages/modplatform/VanillaPage.ui rename to launcher/ui/pages/modplatform/VanillaPage.ui index 47effc862..870ff1616 100644 --- a/launcher/pages/modplatform/VanillaPage.ui +++ b/launcher/ui/pages/modplatform/VanillaPage.ui @@ -150,7 +150,7 @@ VersionSelectWidget QWidget -
widgets/VersionSelectWidget.h
+
ui/widgets/VersionSelectWidget.h
1
diff --git a/launcher/pages/modplatform/atlauncher/AtlFilterModel.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlFilterModel.cpp similarity index 100% rename from launcher/pages/modplatform/atlauncher/AtlFilterModel.cpp rename to launcher/ui/pages/modplatform/atlauncher/AtlFilterModel.cpp diff --git a/launcher/pages/modplatform/atlauncher/AtlFilterModel.h b/launcher/ui/pages/modplatform/atlauncher/AtlFilterModel.h similarity index 100% rename from launcher/pages/modplatform/atlauncher/AtlFilterModel.h rename to launcher/ui/pages/modplatform/atlauncher/AtlFilterModel.h diff --git a/launcher/pages/modplatform/atlauncher/AtlListModel.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp similarity index 100% rename from launcher/pages/modplatform/atlauncher/AtlListModel.cpp rename to launcher/ui/pages/modplatform/atlauncher/AtlListModel.cpp diff --git a/launcher/pages/modplatform/atlauncher/AtlListModel.h b/launcher/ui/pages/modplatform/atlauncher/AtlListModel.h similarity index 100% rename from launcher/pages/modplatform/atlauncher/AtlListModel.h rename to launcher/ui/pages/modplatform/atlauncher/AtlListModel.h diff --git a/launcher/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp similarity index 100% rename from launcher/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp rename to launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.cpp diff --git a/launcher/pages/modplatform/atlauncher/AtlOptionalModDialog.h b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h similarity index 100% rename from launcher/pages/modplatform/atlauncher/AtlOptionalModDialog.h rename to launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.h diff --git a/launcher/pages/modplatform/atlauncher/AtlOptionalModDialog.ui b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.ui similarity index 97% rename from launcher/pages/modplatform/atlauncher/AtlOptionalModDialog.ui rename to launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.ui index 5d3193a42..4c5c2ec5e 100644 --- a/launcher/pages/modplatform/atlauncher/AtlOptionalModDialog.ui +++ b/launcher/ui/pages/modplatform/atlauncher/AtlOptionalModDialog.ui @@ -57,7 +57,7 @@ ModListView QTreeView -
widgets/ModListView.h
+
ui/widgets/ModListView.h
diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp similarity index 97% rename from launcher/pages/modplatform/atlauncher/AtlPage.cpp rename to launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp index 5d2861821..5f6a1396f 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.cpp +++ b/launcher/ui/pages/modplatform/atlauncher/AtlPage.cpp @@ -1,11 +1,13 @@ #include "AtlPage.h" #include "ui_AtlPage.h" -#include "dialogs/NewInstanceDialog.h" +#include "modplatform/atlauncher/ATLPackInstallTask.h" + #include "AtlOptionalModDialog.h" -#include +#include "ui/dialogs/NewInstanceDialog.h" +#include "ui/dialogs/VersionSelectDialog.h" + #include -#include AtlPage::AtlPage(NewInstanceDialog* dialog, QWidget *parent) : QWidget(parent), ui(new Ui::AtlPage), dialog(dialog) diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.h b/launcher/ui/pages/modplatform/atlauncher/AtlPage.h similarity index 98% rename from launcher/pages/modplatform/atlauncher/AtlPage.h rename to launcher/ui/pages/modplatform/atlauncher/AtlPage.h index 7321021d7..b95b3d9e1 100644 --- a/launcher/pages/modplatform/atlauncher/AtlPage.h +++ b/launcher/ui/pages/modplatform/atlauncher/AtlPage.h @@ -22,7 +22,7 @@ #include #include "Application.h" -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include "tasks/Task.h" namespace Ui diff --git a/launcher/pages/modplatform/atlauncher/AtlPage.ui b/launcher/ui/pages/modplatform/atlauncher/AtlPage.ui similarity index 100% rename from launcher/pages/modplatform/atlauncher/AtlPage.ui rename to launcher/ui/pages/modplatform/atlauncher/AtlPage.ui diff --git a/launcher/pages/modplatform/flame/FlameModel.cpp b/launcher/ui/pages/modplatform/flame/FlameModel.cpp similarity index 100% rename from launcher/pages/modplatform/flame/FlameModel.cpp rename to launcher/ui/pages/modplatform/flame/FlameModel.cpp diff --git a/launcher/pages/modplatform/flame/FlameModel.h b/launcher/ui/pages/modplatform/flame/FlameModel.h similarity index 100% rename from launcher/pages/modplatform/flame/FlameModel.h rename to launcher/ui/pages/modplatform/flame/FlameModel.h diff --git a/launcher/pages/modplatform/flame/FlamePage.cpp b/launcher/ui/pages/modplatform/flame/FlamePage.cpp similarity index 98% rename from launcher/pages/modplatform/flame/FlamePage.cpp rename to launcher/ui/pages/modplatform/flame/FlamePage.cpp index b3e30d5aa..cb1185f7d 100644 --- a/launcher/pages/modplatform/flame/FlamePage.cpp +++ b/launcher/ui/pages/modplatform/flame/FlamePage.cpp @@ -1,13 +1,14 @@ #include "FlamePage.h" #include "ui_FlamePage.h" -#include "Application.h" -#include -#include "dialogs/NewInstanceDialog.h" -#include -#include "FlameModel.h" #include +#include "Application.h" +#include "Json.h" +#include "ui/dialogs/NewInstanceDialog.h" +#include "InstanceImportTask.h" +#include "FlameModel.h" + FlamePage::FlamePage(NewInstanceDialog* dialog, QWidget *parent) : QWidget(parent), ui(new Ui::FlamePage), dialog(dialog) { @@ -112,7 +113,7 @@ void FlamePage::onSelectionChanged(QModelIndex first, QModelIndex second) std::shared_ptr response = std::make_shared(); int addonId = current.addonId; netJob->addNetAction(Net::Download::makeByteArray(QString("https://addons-ecs.forgesvc.net/api/v2/addon/%1/files").arg(addonId), response.get())); - + QObject::connect(netJob, &NetJob::succeeded, this, [this, response] { QJsonParseError parse_error; diff --git a/launcher/pages/modplatform/flame/FlamePage.h b/launcher/ui/pages/modplatform/flame/FlamePage.h similarity index 98% rename from launcher/pages/modplatform/flame/FlamePage.h rename to launcher/ui/pages/modplatform/flame/FlamePage.h index 4e22b3ebb..5cfe21dcf 100644 --- a/launcher/pages/modplatform/flame/FlamePage.h +++ b/launcher/ui/pages/modplatform/flame/FlamePage.h @@ -17,7 +17,7 @@ #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include #include "tasks/Task.h" #include diff --git a/launcher/pages/modplatform/flame/FlamePage.ui b/launcher/ui/pages/modplatform/flame/FlamePage.ui similarity index 100% rename from launcher/pages/modplatform/flame/FlamePage.ui rename to launcher/ui/pages/modplatform/flame/FlamePage.ui diff --git a/launcher/pages/modplatform/ftb/FtbFilterModel.cpp b/launcher/ui/pages/modplatform/ftb/FtbFilterModel.cpp similarity index 100% rename from launcher/pages/modplatform/ftb/FtbFilterModel.cpp rename to launcher/ui/pages/modplatform/ftb/FtbFilterModel.cpp diff --git a/launcher/pages/modplatform/ftb/FtbFilterModel.h b/launcher/ui/pages/modplatform/ftb/FtbFilterModel.h similarity index 100% rename from launcher/pages/modplatform/ftb/FtbFilterModel.h rename to launcher/ui/pages/modplatform/ftb/FtbFilterModel.h diff --git a/launcher/pages/modplatform/ftb/FtbListModel.cpp b/launcher/ui/pages/modplatform/ftb/FtbListModel.cpp similarity index 100% rename from launcher/pages/modplatform/ftb/FtbListModel.cpp rename to launcher/ui/pages/modplatform/ftb/FtbListModel.cpp diff --git a/launcher/pages/modplatform/ftb/FtbListModel.h b/launcher/ui/pages/modplatform/ftb/FtbListModel.h similarity index 100% rename from launcher/pages/modplatform/ftb/FtbListModel.h rename to launcher/ui/pages/modplatform/ftb/FtbListModel.h diff --git a/launcher/pages/modplatform/ftb/FtbPage.cpp b/launcher/ui/pages/modplatform/ftb/FtbPage.cpp similarity index 98% rename from launcher/pages/modplatform/ftb/FtbPage.cpp rename to launcher/ui/pages/modplatform/ftb/FtbPage.cpp index 620a56d8c..a82de1d69 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.cpp +++ b/launcher/ui/pages/modplatform/ftb/FtbPage.cpp @@ -3,7 +3,7 @@ #include -#include "dialogs/NewInstanceDialog.h" +#include "ui/dialogs/NewInstanceDialog.h" #include "modplatform/modpacksch/FTBPackInstallTask.h" #include "HoeDown.h" diff --git a/launcher/pages/modplatform/ftb/FtbPage.h b/launcher/ui/pages/modplatform/ftb/FtbPage.h similarity index 98% rename from launcher/pages/modplatform/ftb/FtbPage.h rename to launcher/ui/pages/modplatform/ftb/FtbPage.h index b8331f8f1..28a189f07 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.h +++ b/launcher/ui/pages/modplatform/ftb/FtbPage.h @@ -21,7 +21,7 @@ #include #include "Application.h" -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include "tasks/Task.h" namespace Ui diff --git a/launcher/pages/modplatform/ftb/FtbPage.ui b/launcher/ui/pages/modplatform/ftb/FtbPage.ui similarity index 100% rename from launcher/pages/modplatform/ftb/FtbPage.ui rename to launcher/ui/pages/modplatform/ftb/FtbPage.ui diff --git a/launcher/pages/modplatform/legacy_ftb/ListModel.cpp b/launcher/ui/pages/modplatform/legacy_ftb/ListModel.cpp similarity index 100% rename from launcher/pages/modplatform/legacy_ftb/ListModel.cpp rename to launcher/ui/pages/modplatform/legacy_ftb/ListModel.cpp diff --git a/launcher/pages/modplatform/legacy_ftb/ListModel.h b/launcher/ui/pages/modplatform/legacy_ftb/ListModel.h similarity index 100% rename from launcher/pages/modplatform/legacy_ftb/ListModel.h rename to launcher/ui/pages/modplatform/legacy_ftb/ListModel.h diff --git a/launcher/pages/modplatform/legacy_ftb/Page.cpp b/launcher/ui/pages/modplatform/legacy_ftb/Page.cpp similarity index 99% rename from launcher/pages/modplatform/legacy_ftb/Page.cpp rename to launcher/ui/pages/modplatform/legacy_ftb/Page.cpp index ecd9fece0..891704de8 100644 --- a/launcher/pages/modplatform/legacy_ftb/Page.cpp +++ b/launcher/ui/pages/modplatform/legacy_ftb/Page.cpp @@ -4,8 +4,10 @@ #include #include "Application.h" -#include "dialogs/CustomMessageBox.h" -#include "dialogs/NewInstanceDialog.h" + +#include "ui/dialogs/CustomMessageBox.h" +#include "ui/dialogs/NewInstanceDialog.h" + #include "modplatform/legacy_ftb/PackFetchTask.h" #include "modplatform/legacy_ftb/PackInstallTask.h" #include "modplatform/legacy_ftb/PrivatePackManager.h" diff --git a/launcher/pages/modplatform/legacy_ftb/Page.h b/launcher/ui/pages/modplatform/legacy_ftb/Page.h similarity index 99% rename from launcher/pages/modplatform/legacy_ftb/Page.h rename to launcher/ui/pages/modplatform/legacy_ftb/Page.h index 4c6fb35e0..d8225e11c 100644 --- a/launcher/pages/modplatform/legacy_ftb/Page.h +++ b/launcher/ui/pages/modplatform/legacy_ftb/Page.h @@ -19,7 +19,7 @@ #include #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include #include "tasks/Task.h" #include "modplatform/legacy_ftb/PackHelpers.h" diff --git a/launcher/pages/modplatform/legacy_ftb/Page.ui b/launcher/ui/pages/modplatform/legacy_ftb/Page.ui similarity index 100% rename from launcher/pages/modplatform/legacy_ftb/Page.ui rename to launcher/ui/pages/modplatform/legacy_ftb/Page.ui diff --git a/launcher/pages/modplatform/technic/TechnicData.h b/launcher/ui/pages/modplatform/technic/TechnicData.h similarity index 100% rename from launcher/pages/modplatform/technic/TechnicData.h rename to launcher/ui/pages/modplatform/technic/TechnicData.h diff --git a/launcher/pages/modplatform/technic/TechnicModel.cpp b/launcher/ui/pages/modplatform/technic/TechnicModel.cpp similarity index 100% rename from launcher/pages/modplatform/technic/TechnicModel.cpp rename to launcher/ui/pages/modplatform/technic/TechnicModel.cpp diff --git a/launcher/pages/modplatform/technic/TechnicModel.h b/launcher/ui/pages/modplatform/technic/TechnicModel.h similarity index 100% rename from launcher/pages/modplatform/technic/TechnicModel.h rename to launcher/ui/pages/modplatform/technic/TechnicModel.h diff --git a/launcher/pages/modplatform/technic/TechnicPage.cpp b/launcher/ui/pages/modplatform/technic/TechnicPage.cpp similarity index 99% rename from launcher/pages/modplatform/technic/TechnicPage.cpp rename to launcher/ui/pages/modplatform/technic/TechnicPage.cpp index 1e4f41064..ac69675cc 100644 --- a/launcher/pages/modplatform/technic/TechnicPage.cpp +++ b/launcher/ui/pages/modplatform/technic/TechnicPage.cpp @@ -16,14 +16,17 @@ #include "TechnicPage.h" #include "ui_TechnicPage.h" -#include "Application.h" -#include "dialogs/NewInstanceDialog.h" -#include "TechnicModel.h" #include + +#include "ui/dialogs/NewInstanceDialog.h" + +#include "TechnicModel.h" #include "modplatform/technic/SingleZipPackInstallTask.h" #include "modplatform/technic/SolderPackInstallTask.h" #include "Json.h" +#include "Application.h" + TechnicPage::TechnicPage(NewInstanceDialog* dialog, QWidget *parent) : QWidget(parent), ui(new Ui::TechnicPage), dialog(dialog) { diff --git a/launcher/pages/modplatform/technic/TechnicPage.h b/launcher/ui/pages/modplatform/technic/TechnicPage.h similarity index 98% rename from launcher/pages/modplatform/technic/TechnicPage.h rename to launcher/ui/pages/modplatform/technic/TechnicPage.h index efd5d7263..21695dd09 100644 --- a/launcher/pages/modplatform/technic/TechnicPage.h +++ b/launcher/ui/pages/modplatform/technic/TechnicPage.h @@ -17,7 +17,7 @@ #include -#include "pages/BasePage.h" +#include "ui/pages/BasePage.h" #include #include "tasks/Task.h" #include "TechnicData.h" diff --git a/launcher/pages/modplatform/technic/TechnicPage.ui b/launcher/ui/pages/modplatform/technic/TechnicPage.ui similarity index 98% rename from launcher/pages/modplatform/technic/TechnicPage.ui rename to launcher/ui/pages/modplatform/technic/TechnicPage.ui index 2ca45dd2b..dde685d95 100644 --- a/launcher/pages/modplatform/technic/TechnicPage.ui +++ b/launcher/ui/pages/modplatform/technic/TechnicPage.ui @@ -81,7 +81,7 @@ MCModInfoFrame QFrame -
widgets/MCModInfoFrame.h
+
ui/widgets/MCModInfoFrame.h
1
diff --git a/launcher/setupwizard/AnalyticsWizardPage.cpp b/launcher/ui/setupwizard/AnalyticsWizardPage.cpp similarity index 100% rename from launcher/setupwizard/AnalyticsWizardPage.cpp rename to launcher/ui/setupwizard/AnalyticsWizardPage.cpp diff --git a/launcher/setupwizard/AnalyticsWizardPage.h b/launcher/ui/setupwizard/AnalyticsWizardPage.h similarity index 100% rename from launcher/setupwizard/AnalyticsWizardPage.h rename to launcher/ui/setupwizard/AnalyticsWizardPage.h diff --git a/launcher/setupwizard/BaseWizardPage.h b/launcher/ui/setupwizard/BaseWizardPage.h similarity index 100% rename from launcher/setupwizard/BaseWizardPage.h rename to launcher/ui/setupwizard/BaseWizardPage.h diff --git a/launcher/setupwizard/JavaWizardPage.cpp b/launcher/ui/setupwizard/JavaWizardPage.cpp similarity index 88% rename from launcher/setupwizard/JavaWizardPage.cpp rename to launcher/ui/setupwizard/JavaWizardPage.cpp index 8251e2ac8..63b3d480c 100644 --- a/launcher/setupwizard/JavaWizardPage.cpp +++ b/launcher/ui/setupwizard/JavaWizardPage.cpp @@ -1,5 +1,5 @@ #include "JavaWizardPage.h" -#include +#include "Application.h" #include #include @@ -8,16 +8,18 @@ #include #include #include -#include -#include - -#include -#include -#include -#include #include -#include -#include "widgets/JavaSettingsWidget.h" + +#include + +#include "FileSystem.h" +#include "java/JavaInstall.h" +#include "java/JavaUtils.h" +#include "JavaCommon.h" + +#include "ui/widgets/VersionSelectWidget.h" +#include "ui/dialogs/CustomMessageBox.h" +#include "ui/widgets/JavaSettingsWidget.h" JavaWizardPage::JavaWizardPage(QWidget *parent) diff --git a/launcher/setupwizard/JavaWizardPage.h b/launcher/ui/setupwizard/JavaWizardPage.h similarity index 100% rename from launcher/setupwizard/JavaWizardPage.h rename to launcher/ui/setupwizard/JavaWizardPage.h diff --git a/launcher/setupwizard/LanguageWizardPage.cpp b/launcher/ui/setupwizard/LanguageWizardPage.cpp similarity index 95% rename from launcher/setupwizard/LanguageWizardPage.cpp rename to launcher/ui/setupwizard/LanguageWizardPage.cpp index ccdc0c90d..072df10d2 100644 --- a/launcher/setupwizard/LanguageWizardPage.cpp +++ b/launcher/ui/setupwizard/LanguageWizardPage.cpp @@ -2,7 +2,7 @@ #include #include -#include "widgets/LanguageSelectionWidget.h" +#include "ui/widgets/LanguageSelectionWidget.h" #include #include diff --git a/launcher/setupwizard/LanguageWizardPage.h b/launcher/ui/setupwizard/LanguageWizardPage.h similarity index 100% rename from launcher/setupwizard/LanguageWizardPage.h rename to launcher/ui/setupwizard/LanguageWizardPage.h diff --git a/launcher/setupwizard/SetupWizard.cpp b/launcher/ui/setupwizard/SetupWizard.cpp similarity index 100% rename from launcher/setupwizard/SetupWizard.cpp rename to launcher/ui/setupwizard/SetupWizard.cpp diff --git a/launcher/setupwizard/SetupWizard.h b/launcher/ui/setupwizard/SetupWizard.h similarity index 100% rename from launcher/setupwizard/SetupWizard.h rename to launcher/ui/setupwizard/SetupWizard.h diff --git a/launcher/themes/BrightTheme.cpp b/launcher/ui/themes/BrightTheme.cpp similarity index 100% rename from launcher/themes/BrightTheme.cpp rename to launcher/ui/themes/BrightTheme.cpp diff --git a/launcher/themes/BrightTheme.h b/launcher/ui/themes/BrightTheme.h similarity index 100% rename from launcher/themes/BrightTheme.h rename to launcher/ui/themes/BrightTheme.h diff --git a/launcher/themes/CustomTheme.cpp b/launcher/ui/themes/CustomTheme.cpp similarity index 100% rename from launcher/themes/CustomTheme.cpp rename to launcher/ui/themes/CustomTheme.cpp diff --git a/launcher/themes/CustomTheme.h b/launcher/ui/themes/CustomTheme.h similarity index 100% rename from launcher/themes/CustomTheme.h rename to launcher/ui/themes/CustomTheme.h diff --git a/launcher/themes/DarkTheme.cpp b/launcher/ui/themes/DarkTheme.cpp similarity index 100% rename from launcher/themes/DarkTheme.cpp rename to launcher/ui/themes/DarkTheme.cpp diff --git a/launcher/themes/DarkTheme.h b/launcher/ui/themes/DarkTheme.h similarity index 100% rename from launcher/themes/DarkTheme.h rename to launcher/ui/themes/DarkTheme.h diff --git a/launcher/themes/FusionTheme.cpp b/launcher/ui/themes/FusionTheme.cpp similarity index 100% rename from launcher/themes/FusionTheme.cpp rename to launcher/ui/themes/FusionTheme.cpp diff --git a/launcher/themes/FusionTheme.h b/launcher/ui/themes/FusionTheme.h similarity index 100% rename from launcher/themes/FusionTheme.h rename to launcher/ui/themes/FusionTheme.h diff --git a/launcher/themes/ITheme.cpp b/launcher/ui/themes/ITheme.cpp similarity index 100% rename from launcher/themes/ITheme.cpp rename to launcher/ui/themes/ITheme.cpp diff --git a/launcher/themes/ITheme.h b/launcher/ui/themes/ITheme.h similarity index 100% rename from launcher/themes/ITheme.h rename to launcher/ui/themes/ITheme.h diff --git a/launcher/themes/SystemTheme.cpp b/launcher/ui/themes/SystemTheme.cpp similarity index 100% rename from launcher/themes/SystemTheme.cpp rename to launcher/ui/themes/SystemTheme.cpp diff --git a/launcher/themes/SystemTheme.h b/launcher/ui/themes/SystemTheme.h similarity index 100% rename from launcher/themes/SystemTheme.h rename to launcher/ui/themes/SystemTheme.h diff --git a/launcher/widgets/Common.cpp b/launcher/ui/widgets/Common.cpp similarity index 100% rename from launcher/widgets/Common.cpp rename to launcher/ui/widgets/Common.cpp diff --git a/launcher/widgets/Common.h b/launcher/ui/widgets/Common.h similarity index 100% rename from launcher/widgets/Common.h rename to launcher/ui/widgets/Common.h diff --git a/launcher/widgets/CustomCommands.cpp b/launcher/ui/widgets/CustomCommands.cpp similarity index 100% rename from launcher/widgets/CustomCommands.cpp rename to launcher/ui/widgets/CustomCommands.cpp diff --git a/launcher/widgets/CustomCommands.h b/launcher/ui/widgets/CustomCommands.h similarity index 100% rename from launcher/widgets/CustomCommands.h rename to launcher/ui/widgets/CustomCommands.h diff --git a/launcher/widgets/CustomCommands.ui b/launcher/ui/widgets/CustomCommands.ui similarity index 100% rename from launcher/widgets/CustomCommands.ui rename to launcher/ui/widgets/CustomCommands.ui diff --git a/launcher/widgets/DropLabel.cpp b/launcher/ui/widgets/DropLabel.cpp similarity index 100% rename from launcher/widgets/DropLabel.cpp rename to launcher/ui/widgets/DropLabel.cpp diff --git a/launcher/widgets/DropLabel.h b/launcher/ui/widgets/DropLabel.h similarity index 100% rename from launcher/widgets/DropLabel.h rename to launcher/ui/widgets/DropLabel.h diff --git a/launcher/widgets/FocusLineEdit.cpp b/launcher/ui/widgets/FocusLineEdit.cpp similarity index 100% rename from launcher/widgets/FocusLineEdit.cpp rename to launcher/ui/widgets/FocusLineEdit.cpp diff --git a/launcher/widgets/FocusLineEdit.h b/launcher/ui/widgets/FocusLineEdit.h similarity index 100% rename from launcher/widgets/FocusLineEdit.h rename to launcher/ui/widgets/FocusLineEdit.h diff --git a/launcher/widgets/IconLabel.cpp b/launcher/ui/widgets/IconLabel.cpp similarity index 100% rename from launcher/widgets/IconLabel.cpp rename to launcher/ui/widgets/IconLabel.cpp diff --git a/launcher/widgets/IconLabel.h b/launcher/ui/widgets/IconLabel.h similarity index 100% rename from launcher/widgets/IconLabel.h rename to launcher/ui/widgets/IconLabel.h diff --git a/launcher/widgets/InstanceCardWidget.ui b/launcher/ui/widgets/InstanceCardWidget.ui similarity index 100% rename from launcher/widgets/InstanceCardWidget.ui rename to launcher/ui/widgets/InstanceCardWidget.ui diff --git a/launcher/widgets/JavaSettingsWidget.cpp b/launcher/ui/widgets/JavaSettingsWidget.cpp similarity index 98% rename from launcher/widgets/JavaSettingsWidget.cpp rename to launcher/ui/widgets/JavaSettingsWidget.cpp index cfcba4285..b9d7620cf 100644 --- a/launcher/widgets/JavaSettingsWidget.cpp +++ b/launcher/ui/widgets/JavaSettingsWidget.cpp @@ -1,10 +1,4 @@ #include "JavaSettingsWidget.h" -#include - -#include -#include -#include -#include #include #include @@ -13,10 +7,19 @@ #include #include #include -#include -#include #include -#include + +#include + +#include "java/JavaInstall.h" +#include "java/JavaUtils.h" +#include "FileSystem.h" + +#include "ui/dialogs/CustomMessageBox.h" +#include "ui/widgets/VersionSelectWidget.h" + +#include "Application.h" +#include "BuildConfig.h" JavaSettingsWidget::JavaSettingsWidget(QWidget* parent) : QWidget(parent) { diff --git a/launcher/widgets/JavaSettingsWidget.h b/launcher/ui/widgets/JavaSettingsWidget.h similarity index 100% rename from launcher/widgets/JavaSettingsWidget.h rename to launcher/ui/widgets/JavaSettingsWidget.h diff --git a/launcher/widgets/LabeledToolButton.cpp b/launcher/ui/widgets/LabeledToolButton.cpp similarity index 100% rename from launcher/widgets/LabeledToolButton.cpp rename to launcher/ui/widgets/LabeledToolButton.cpp diff --git a/launcher/widgets/LabeledToolButton.h b/launcher/ui/widgets/LabeledToolButton.h similarity index 100% rename from launcher/widgets/LabeledToolButton.h rename to launcher/ui/widgets/LabeledToolButton.h diff --git a/launcher/widgets/LanguageSelectionWidget.cpp b/launcher/ui/widgets/LanguageSelectionWidget.cpp similarity index 100% rename from launcher/widgets/LanguageSelectionWidget.cpp rename to launcher/ui/widgets/LanguageSelectionWidget.cpp diff --git a/launcher/widgets/LanguageSelectionWidget.h b/launcher/ui/widgets/LanguageSelectionWidget.h similarity index 100% rename from launcher/widgets/LanguageSelectionWidget.h rename to launcher/ui/widgets/LanguageSelectionWidget.h diff --git a/launcher/widgets/LineSeparator.cpp b/launcher/ui/widgets/LineSeparator.cpp similarity index 100% rename from launcher/widgets/LineSeparator.cpp rename to launcher/ui/widgets/LineSeparator.cpp diff --git a/launcher/widgets/LineSeparator.h b/launcher/ui/widgets/LineSeparator.h similarity index 100% rename from launcher/widgets/LineSeparator.h rename to launcher/ui/widgets/LineSeparator.h diff --git a/launcher/widgets/LogView.cpp b/launcher/ui/widgets/LogView.cpp similarity index 100% rename from launcher/widgets/LogView.cpp rename to launcher/ui/widgets/LogView.cpp diff --git a/launcher/widgets/LogView.h b/launcher/ui/widgets/LogView.h similarity index 100% rename from launcher/widgets/LogView.h rename to launcher/ui/widgets/LogView.h diff --git a/launcher/widgets/MCModInfoFrame.cpp b/launcher/ui/widgets/MCModInfoFrame.cpp similarity index 98% rename from launcher/widgets/MCModInfoFrame.cpp rename to launcher/ui/widgets/MCModInfoFrame.cpp index 5b1f6230c..8c4bd690f 100644 --- a/launcher/widgets/MCModInfoFrame.cpp +++ b/launcher/ui/widgets/MCModInfoFrame.cpp @@ -18,7 +18,8 @@ #include "MCModInfoFrame.h" #include "ui_MCModInfoFrame.h" -#include "dialogs/CustomMessageBox.h" + +#include "ui/dialogs/CustomMessageBox.h" void MCModInfoFrame::updateWithMod(Mod &m) { diff --git a/launcher/widgets/MCModInfoFrame.h b/launcher/ui/widgets/MCModInfoFrame.h similarity index 100% rename from launcher/widgets/MCModInfoFrame.h rename to launcher/ui/widgets/MCModInfoFrame.h diff --git a/launcher/widgets/MCModInfoFrame.ui b/launcher/ui/widgets/MCModInfoFrame.ui similarity index 100% rename from launcher/widgets/MCModInfoFrame.ui rename to launcher/ui/widgets/MCModInfoFrame.ui diff --git a/launcher/widgets/ModListView.cpp b/launcher/ui/widgets/ModListView.cpp similarity index 100% rename from launcher/widgets/ModListView.cpp rename to launcher/ui/widgets/ModListView.cpp diff --git a/launcher/widgets/ModListView.h b/launcher/ui/widgets/ModListView.h similarity index 100% rename from launcher/widgets/ModListView.h rename to launcher/ui/widgets/ModListView.h diff --git a/launcher/widgets/PageContainer.cpp b/launcher/ui/widgets/PageContainer.cpp similarity index 98% rename from launcher/widgets/PageContainer.cpp rename to launcher/ui/widgets/PageContainer.cpp index 0bae2b27f..74a6dff38 100644 --- a/launcher/widgets/PageContainer.cpp +++ b/launcher/ui/widgets/PageContainer.cpp @@ -14,6 +14,7 @@ */ #include "PageContainer.h" +#include "PageContainer_p.h" #include #include @@ -26,12 +27,12 @@ #include #include -#include "Application.h" #include "settings/SettingsObject.h" -#include "widgets/IconLabel.h" -#include "PageContainer_p.h" -#include -#include + +#include "ui/widgets/IconLabel.h" + +#include "DesktopServices.h" +#include "Application.h" class PageEntryFilterModel : public QSortFilterProxyModel { diff --git a/launcher/widgets/PageContainer.h b/launcher/ui/widgets/PageContainer.h similarity index 96% rename from launcher/widgets/PageContainer.h rename to launcher/ui/widgets/PageContainer.h index 976d34e97..8d2172db5 100644 --- a/launcher/widgets/PageContainer.h +++ b/launcher/ui/widgets/PageContainer.h @@ -18,8 +18,8 @@ #include #include -#include "pages/BasePageProvider.h" -#include "pages/BasePageContainer.h" +#include "ui/pages/BasePageProvider.h" +#include "ui/pages/BasePageContainer.h" class QLayout; class IconLabel; diff --git a/launcher/widgets/PageContainer_p.h b/launcher/ui/widgets/PageContainer_p.h similarity index 100% rename from launcher/widgets/PageContainer_p.h rename to launcher/ui/widgets/PageContainer_p.h diff --git a/launcher/widgets/ProgressWidget.cpp b/launcher/ui/widgets/ProgressWidget.cpp similarity index 100% rename from launcher/widgets/ProgressWidget.cpp rename to launcher/ui/widgets/ProgressWidget.cpp diff --git a/launcher/widgets/ProgressWidget.h b/launcher/ui/widgets/ProgressWidget.h similarity index 100% rename from launcher/widgets/ProgressWidget.h rename to launcher/ui/widgets/ProgressWidget.h diff --git a/launcher/widgets/VersionListView.cpp b/launcher/ui/widgets/VersionListView.cpp similarity index 100% rename from launcher/widgets/VersionListView.cpp rename to launcher/ui/widgets/VersionListView.cpp diff --git a/launcher/widgets/VersionListView.h b/launcher/ui/widgets/VersionListView.h similarity index 100% rename from launcher/widgets/VersionListView.h rename to launcher/ui/widgets/VersionListView.h diff --git a/launcher/widgets/VersionSelectWidget.cpp b/launcher/ui/widgets/VersionSelectWidget.cpp similarity index 98% rename from launcher/widgets/VersionSelectWidget.cpp rename to launcher/ui/widgets/VersionSelectWidget.cpp index 9925a6b48..1209f1183 100644 --- a/launcher/widgets/VersionSelectWidget.cpp +++ b/launcher/ui/widgets/VersionSelectWidget.cpp @@ -1,10 +1,13 @@ #include "VersionSelectWidget.h" + #include #include -#include "VersionListView.h" #include -#include -#include + +#include "VersionListView.h" +#include "VersionProxyModel.h" + +#include "ui/dialogs/CustomMessageBox.h" VersionSelectWidget::VersionSelectWidget(QWidget* parent) : QWidget(parent) diff --git a/launcher/widgets/VersionSelectWidget.h b/launcher/ui/widgets/VersionSelectWidget.h similarity index 100% rename from launcher/widgets/VersionSelectWidget.h rename to launcher/ui/widgets/VersionSelectWidget.h diff --git a/launcher/widgets/WideBar.cpp b/launcher/ui/widgets/WideBar.cpp similarity index 100% rename from launcher/widgets/WideBar.cpp rename to launcher/ui/widgets/WideBar.cpp diff --git a/launcher/widgets/WideBar.h b/launcher/ui/widgets/WideBar.h similarity index 100% rename from launcher/widgets/WideBar.h rename to launcher/ui/widgets/WideBar.h