aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/modplatform/legacy_ftb/Page.h
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages/modplatform/legacy_ftb/Page.h')
-rw-r--r--launcher/ui/pages/modplatform/legacy_ftb/Page.h64
1 files changed, 25 insertions, 39 deletions
diff --git a/launcher/ui/pages/modplatform/legacy_ftb/Page.h b/launcher/ui/pages/modplatform/legacy_ftb/Page.h
index 1de8b40a..a12b0745 100644
--- a/launcher/ui/pages/modplatform/legacy_ftb/Page.h
+++ b/launcher/ui/pages/modplatform/legacy_ftb/Page.h
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-only
/*
- * PolyMC - Minecraft Launcher
+ * Prism Launcher - Minecraft Launcher
* Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org>
*
* This program is free software: you can redistribute it and/or modify
@@ -35,23 +35,22 @@
#pragma once
-#include <QWidget>
-#include <QTreeView>
#include <QTextBrowser>
+#include <QTreeView>
+#include <QWidget>
-#include "ui/pages/BasePage.h"
#include <Application.h>
-#include "tasks/Task.h"
-#include "modplatform/legacy_ftb/PackHelpers.h"
-#include "modplatform/legacy_ftb/PackFetchTask.h"
#include "QObjectPtr.h"
+#include "modplatform/legacy_ftb/PackFetchTask.h"
+#include "modplatform/legacy_ftb/PackHelpers.h"
+#include "tasks/Task.h"
+#include "ui/pages/BasePage.h"
class NewInstanceDialog;
namespace LegacyFTB {
-namespace Ui
-{
+namespace Ui {
class Page;
}
@@ -61,38 +60,25 @@ class PrivatePackListModel;
class PrivatePackFilterModel;
class PrivatePackManager;
-class Page : public QWidget, public BasePage
-{
+class Page : public QWidget, public BasePage {
Q_OBJECT
-public:
- explicit Page(NewInstanceDialog * dialog, QWidget *parent = 0);
+ public:
+ explicit Page(NewInstanceDialog* dialog, QWidget* parent = 0);
virtual ~Page();
- QString displayName() const override
- {
- return "FTB Legacy";
- }
- QIcon icon() const override
- {
- return APPLICATION->getThemedIcon("ftb_logo");
- }
- QString id() const override
- {
- return "legacy_ftb";
- }
- QString helpPage() const override
- {
- return "FTB-platform";
- }
+ QString displayName() const override { return "FTB Legacy"; }
+ QIcon icon() const override { return APPLICATION->getThemedIcon("ftb_logo"); }
+ QString id() const override { return "legacy_ftb"; }
+ QString helpPage() const override { return "FTB-platform"; }
bool shouldDisplay() const override;
void openedImpl() override;
void retranslate() override;
-private:
+ private:
void suggestCurrent();
- void onPackSelectionChanged(Modpack *pack = nullptr);
+ void onPackSelectionChanged(Modpack* pack = nullptr);
-private slots:
+ private slots:
void ftbPackDataDownloadSuccessfully(ModpackList publicPacks, ModpackList thirdPartyPacks);
void ftbPackDataDownloadFailed(QString reason);
void ftbPackDataDownloadAborted();
@@ -112,7 +98,7 @@ private slots:
void onAddPackClicked();
void onRemovePackClicked();
-private:
+ private:
FilterModel* currentModel = nullptr;
QTreeView* currentList = nullptr;
QTextBrowser* currentModpackInfo = nullptr;
@@ -124,18 +110,18 @@ private:
ListModel* publicListModel = nullptr;
FilterModel* publicFilterModel = nullptr;
- ListModel *thirdPartyModel = nullptr;
- FilterModel *thirdPartyFilterModel = nullptr;
+ ListModel* thirdPartyModel = nullptr;
+ FilterModel* thirdPartyFilterModel = nullptr;
- ListModel *privateListModel = nullptr;
- FilterModel *privateFilterModel = nullptr;
+ ListModel* privateListModel = nullptr;
+ FilterModel* privateFilterModel = nullptr;
unique_qobject_ptr<PackFetchTask> ftbFetchTask;
std::unique_ptr<PrivatePackManager> ftbPrivatePacks;
NewInstanceDialog* dialog = nullptr;
- Ui::Page *ui = nullptr;
+ Ui::Page* ui = nullptr;
};
-}
+} // namespace LegacyFTB