aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/MainWindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/MainWindow.h')
-rw-r--r--launcher/ui/MainWindow.h40
1 files changed, 15 insertions, 25 deletions
diff --git a/launcher/ui/MainWindow.h b/launcher/ui/MainWindow.h
index f96f641d..3a42c34e 100644
--- a/launcher/ui/MainWindow.h
+++ b/launcher/ui/MainWindow.h
@@ -48,7 +48,6 @@
#include "BaseInstance.h"
#include "minecraft/auth/MinecraftAccount.h"
#include "net/NetJob.h"
-#include "updater/GoUpdate.h"
class LaunchController;
class NewsChecker;
@@ -61,13 +60,16 @@ class BaseProfilerFactory;
class InstanceView;
class KonamiCode;
class InstanceTask;
+class LabeledToolButton;
+namespace Ui
+{
+class MainWindow;
+}
class MainWindow : public QMainWindow
{
Q_OBJECT
- class Ui;
-
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
@@ -80,7 +82,7 @@ public:
void updatesAllowedChanged(bool allowed);
- void droppedURLs(QList<QUrl> urls);
+ void processURLs(QList<QUrl> urls);
signals:
void isClosing();
@@ -90,6 +92,8 @@ protected:
private slots:
void onCatToggled(bool);
+ void onCatChanged(int);
+
void on_actionAbout_triggered();
void on_actionAddInstance_triggered();
@@ -105,10 +109,6 @@ private slots:
void on_actionChangeInstGroup_triggered();
void on_actionChangeInstIcon_triggered();
- void on_changeIconButton_clicked(bool)
- {
- on_actionChangeInstIcon_triggered();
- }
void on_actionViewInstanceFolder_triggered();
@@ -154,10 +154,6 @@ private slots:
void on_actionExportInstance_triggered();
void on_actionRenameInstance_triggered();
- void on_renameButton_clicked(bool)
- {
- on_actionRenameInstance_triggered();
- }
void on_actionEditInstance_triggered();
@@ -190,10 +186,6 @@ private slots:
void startTask(Task *task);
- void updateAvailable(GoUpdate::Status status);
-
- void updateNotAvailable();
-
void defaultAccountChanged();
void changeActiveAccount();
@@ -202,10 +194,6 @@ private slots:
void updateNewsLabel();
- /*!
- * Runs the DownloadTask and installs updates.
- */
- void downloadUpdates(GoUpdate::Status status);
void konamiTriggered();
@@ -228,24 +216,27 @@ private:
void updateInstanceToolIcon(QString new_icon);
void setSelectedInstanceById(const QString &id);
void updateStatusCenter();
+ void setInstanceActionsEnabled(bool enabled);
void runModalTask(Task *task);
void instanceFromInstanceTask(InstanceTask *task);
void finalizeInstance(InstancePtr inst);
private:
- std::unique_ptr<Ui> ui;
-
+ Ui::MainWindow *ui;
// these are managed by Qt's memory management model!
InstanceView *view = nullptr;
InstanceProxyModel *proxymodel = nullptr;
QToolButton *newsLabel = nullptr;
QLabel *m_statusLeft = nullptr;
QLabel *m_statusCenter = nullptr;
- QMenu *accountMenu = nullptr;
- QToolButton *accountMenuButton = nullptr;
+ LabeledToolButton *changeIconButton = nullptr;
+ LabeledToolButton *renameButton = nullptr;
+ QToolButton *helpMenuButton = nullptr;
KonamiCode * secretEventFilter = nullptr;
+ std::shared_ptr<Setting> instanceToolbarSetting = nullptr;
+
unique_qobject_ptr<NewsChecker> m_newsChecker;
InstancePtr m_selectedInstance;
@@ -254,4 +245,3 @@ private:
// managed by the application object
Task *m_versionLoadTask = nullptr;
};
-