diff options
Diffstat (limited to 'application/MainWindow.h')
-rw-r--r-- | application/MainWindow.h | 210 |
1 files changed, 105 insertions, 105 deletions
diff --git a/application/MainWindow.h b/application/MainWindow.h index 8f756412..3095ba41 100644 --- a/application/MainWindow.h +++ b/application/MainWindow.h @@ -42,174 +42,174 @@ class InstanceTask; class MainWindow : public QMainWindow { - Q_OBJECT + Q_OBJECT - class Ui; + class Ui; public: - explicit MainWindow(QWidget *parent = 0); - ~MainWindow(); + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); - bool eventFilter(QObject *obj, QEvent *ev) override; - void closeEvent(QCloseEvent *event) override; - void changeEvent(QEvent * event) override; + bool eventFilter(QObject *obj, QEvent *ev) override; + void closeEvent(QCloseEvent *event) override; + void changeEvent(QEvent * event) override; - void checkInstancePathForProblems(); + void checkInstancePathForProblems(); - void updatesAllowedChanged(bool allowed); + void updatesAllowedChanged(bool allowed); signals: - void isClosing(); + void isClosing(); private slots: - void onCatToggled(bool); + void onCatToggled(bool); - void on_actionAbout_triggered(); + void on_actionAbout_triggered(); - void on_actionAddInstance_triggered(); + void on_actionAddInstance_triggered(); - void on_actionREDDIT_triggered(); + void on_actionREDDIT_triggered(); - void on_actionDISCORD_triggered(); + void on_actionDISCORD_triggered(); - void on_actionCopyInstance_triggered(); + void on_actionCopyInstance_triggered(); - void on_actionChangeInstGroup_triggered(); + void on_actionChangeInstGroup_triggered(); - void on_actionChangeInstIcon_triggered(); - void on_changeIconButton_clicked(bool) - { - on_actionChangeInstIcon_triggered(); - } + void on_actionChangeInstIcon_triggered(); + void on_changeIconButton_clicked(bool) + { + on_actionChangeInstIcon_triggered(); + } - void on_actionViewInstanceFolder_triggered(); + void on_actionViewInstanceFolder_triggered(); - void on_actionConfig_Folder_triggered(); + void on_actionConfig_Folder_triggered(); - void on_actionViewSelectedInstFolder_triggered(); + void on_actionViewSelectedInstFolder_triggered(); - void refreshInstances(); + void refreshInstances(); - void on_actionViewCentralModsFolder_triggered(); + void on_actionViewCentralModsFolder_triggered(); - void checkForUpdates(); + void checkForUpdates(); - void on_actionSettings_triggered(); + void on_actionSettings_triggered(); - void on_actionInstanceSettings_triggered(); + void on_actionInstanceSettings_triggered(); - void on_actionManageAccounts_triggered(); + void on_actionManageAccounts_triggered(); - void on_actionReportBug_triggered(); + void on_actionReportBug_triggered(); - void on_actionPatreon_triggered(); + void on_actionPatreon_triggered(); - void on_actionMoreNews_triggered(); + void on_actionMoreNews_triggered(); - void newsButtonClicked(); + void newsButtonClicked(); - void on_mainToolBar_visibilityChanged(bool); + void on_mainToolBar_visibilityChanged(bool); - void on_actionLaunchInstance_triggered(); + void on_actionLaunchInstance_triggered(); - void on_actionLaunchInstanceOffline_triggered(); + void on_actionLaunchInstanceOffline_triggered(); - void on_actionDeleteInstance_triggered(); + void on_actionDeleteInstance_triggered(); - void deleteGroup(); + void deleteGroup(); - void on_actionExportInstance_triggered(); + void on_actionExportInstance_triggered(); - void on_actionRenameInstance_triggered(); - void on_renameButton_clicked(bool) - { - on_actionRenameInstance_triggered(); - } + void on_actionRenameInstance_triggered(); + void on_renameButton_clicked(bool) + { + on_actionRenameInstance_triggered(); + } - void on_actionEditInstance_triggered(); + void on_actionEditInstance_triggered(); - void on_actionEditInstNotes_triggered(); + void on_actionEditInstNotes_triggered(); - void on_actionWorlds_triggered(); + void on_actionWorlds_triggered(); - void on_actionScreenshots_triggered(); + void on_actionScreenshots_triggered(); - void taskEnd(); + void taskEnd(); - /** - * called when an icon is changed in the icon model. - */ - void iconUpdated(QString); + /** + * called when an icon is changed in the icon model. + */ + void iconUpdated(QString); - void showInstanceContextMenu(const QPoint &); + void showInstanceContextMenu(const QPoint &); - void updateToolsMenu(); + void updateToolsMenu(); - void skinJobFinished(); + void skinJobFinished(); - void instanceActivated(QModelIndex); + void instanceActivated(QModelIndex); - void instanceChanged(const QModelIndex ¤t, const QModelIndex &previous); + void instanceChanged(const QModelIndex ¤t, const QModelIndex &previous); - void instanceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); + void instanceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight); - void selectionBad(); + void selectionBad(); - void startTask(Task *task); + void startTask(Task *task); - void updateAvailable(GoUpdate::Status status); + void updateAvailable(GoUpdate::Status status); - void updateNotAvailable(); + void updateNotAvailable(); - void notificationsChanged(); + void notificationsChanged(); - void activeAccountChanged(); + void activeAccountChanged(); - void changeActiveAccount(); + void changeActiveAccount(); - void repopulateAccountsMenu(); + void repopulateAccountsMenu(); - void updateNewsLabel(); + void updateNewsLabel(); - /*! - * Runs the DownloadTask and installs updates. - */ - void downloadUpdates(GoUpdate::Status status); + /*! + * Runs the DownloadTask and installs updates. + */ + void downloadUpdates(GoUpdate::Status status); - void droppedURLs(QList<QUrl> urls); + void droppedURLs(QList<QUrl> urls); - void konamiTriggered(); + void konamiTriggered(); private: - void addInstance(QString url = QString()); - void activateInstance(InstancePtr instance); - void setCatBackground(bool enabled); - void updateInstanceToolIcon(QString new_icon); - void setSelectedInstanceById(const QString &id); + void addInstance(QString url = QString()); + void activateInstance(InstancePtr instance); + void setCatBackground(bool enabled); + void updateInstanceToolIcon(QString new_icon); + void setSelectedInstanceById(const QString &id); - void runModalTask(Task *task); - void instanceFromInstanceTask(InstanceTask *task); - void finalizeInstance(InstancePtr inst); + void runModalTask(Task *task); + void instanceFromInstanceTask(InstanceTask *task); + void finalizeInstance(InstancePtr inst); private: - std::unique_ptr<Ui> ui; - - // these are managed by Qt's memory management model! - GroupView *view = nullptr; - InstanceProxyModel *proxymodel = nullptr; - QToolButton *newsLabel = nullptr; - QLabel *m_statusLeft = nullptr; - ServerStatus *m_statusRight = nullptr; - QMenu *accountMenu = nullptr; - QToolButton *accountMenuButton = nullptr; - KonamiCode * secretEventFilter = nullptr; - - unique_qobject_ptr<NetJob> skin_download_job; - unique_qobject_ptr<NewsChecker> m_newsChecker; - unique_qobject_ptr<NotificationChecker> m_notificationChecker; - - InstancePtr m_selectedInstance; - QString m_currentInstIcon; - - // managed by the application object - Task *m_versionLoadTask = nullptr; + std::unique_ptr<Ui> ui; + + // these are managed by Qt's memory management model! + GroupView *view = nullptr; + InstanceProxyModel *proxymodel = nullptr; + QToolButton *newsLabel = nullptr; + QLabel *m_statusLeft = nullptr; + ServerStatus *m_statusRight = nullptr; + QMenu *accountMenu = nullptr; + QToolButton *accountMenuButton = nullptr; + KonamiCode * secretEventFilter = nullptr; + + unique_qobject_ptr<NetJob> skin_download_job; + unique_qobject_ptr<NewsChecker> m_newsChecker; + unique_qobject_ptr<NotificationChecker> m_notificationChecker; + + InstancePtr m_selectedInstance; + QString m_currentInstIcon; + + // managed by the application object + Task *m_versionLoadTask = nullptr; }; |