2017-07-13 10:26:03 +02:00
|
|
|
/*
|
|
|
|
* mainwindow_moc.h, part of VCMI engine
|
|
|
|
*
|
|
|
|
* Authors: listed in file AUTHORS in main folder
|
|
|
|
*
|
|
|
|
* License: GNU General Public License v2.0 or later
|
|
|
|
* Full text of license available in license.txt file, in main folder
|
|
|
|
*
|
|
|
|
*/
|
2013-08-22 17:22:49 +03:00
|
|
|
#pragma once
|
|
|
|
#include <QMainWindow>
|
2016-08-30 20:54:37 +02:00
|
|
|
#include <QStringList>
|
2023-01-07 18:26:02 +02:00
|
|
|
#include <QTranslator>
|
2013-08-22 17:22:49 +03:00
|
|
|
|
2018-04-13 07:34:58 +02:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class MainWindow;
|
2024-05-07 15:37:02 +02:00
|
|
|
const QString teamName = "vcmi";
|
|
|
|
const QString appName = "launcher";
|
2013-08-22 17:22:49 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
class QTableWidgetItem;
|
2022-11-17 01:15:26 +02:00
|
|
|
class CModList;
|
2023-03-11 00:57:55 +02:00
|
|
|
class CModListView;
|
2013-08-22 17:22:49 +03:00
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2018-04-13 07:34:58 +02:00
|
|
|
|
2022-12-25 23:42:06 +02:00
|
|
|
#ifdef ENABLE_QT_TRANSLATIONS
|
2022-12-25 13:19:16 +02:00
|
|
|
QTranslator translator;
|
2022-12-25 23:42:06 +02:00
|
|
|
#endif
|
2018-04-13 07:34:58 +02:00
|
|
|
Ui::MainWindow * ui;
|
2024-04-20 18:51:03 +02:00
|
|
|
|
2013-08-22 17:22:49 +03:00
|
|
|
void load();
|
2024-04-20 18:51:03 +02:00
|
|
|
|
2022-11-27 03:35:05 +02:00
|
|
|
enum TabRows
|
|
|
|
{
|
2023-01-26 18:24:34 +02:00
|
|
|
MODS = 0,
|
|
|
|
SETTINGS = 1,
|
2024-01-11 22:33:58 +02:00
|
|
|
SETUP = 2,
|
|
|
|
ABOUT = 3,
|
2022-11-27 03:35:05 +02:00
|
|
|
};
|
2018-04-13 07:34:58 +02:00
|
|
|
|
2013-08-22 17:22:49 +03:00
|
|
|
public:
|
2023-03-08 00:23:37 +02:00
|
|
|
explicit MainWindow(QWidget * parent = nullptr);
|
|
|
|
~MainWindow() override;
|
2022-11-17 01:15:26 +02:00
|
|
|
|
|
|
|
const CModList & getModList() const;
|
2023-03-11 00:57:55 +02:00
|
|
|
CModListView * getModView();
|
2022-11-17 01:15:26 +02:00
|
|
|
|
2022-12-25 13:19:16 +02:00
|
|
|
void updateTranslation();
|
2022-12-29 16:38:43 +02:00
|
|
|
void computeSidePanelSizes();
|
2022-11-07 11:44:58 +02:00
|
|
|
|
2023-06-27 21:33:42 +02:00
|
|
|
void detectPreferredLanguage();
|
2023-03-12 18:33:29 +02:00
|
|
|
void enterSetup();
|
|
|
|
void exitSetup();
|
2023-03-14 13:37:22 +02:00
|
|
|
void switchToModsTab();
|
2023-03-12 18:33:29 +02:00
|
|
|
|
2024-04-20 18:51:03 +02:00
|
|
|
protected:
|
|
|
|
void changeEvent(QEvent * event) override;
|
|
|
|
|
2022-10-26 23:39:57 +02:00
|
|
|
public slots:
|
2016-10-02 00:27:45 +02:00
|
|
|
void on_startGameButton_clicked();
|
2022-11-27 03:35:05 +02:00
|
|
|
|
|
|
|
private slots:
|
2022-12-19 19:12:44 +02:00
|
|
|
void on_modslistButton_clicked();
|
|
|
|
void on_settingsButton_clicked();
|
2022-12-25 23:08:39 +02:00
|
|
|
void on_startEditorButton_clicked();
|
2023-06-30 14:24:43 +02:00
|
|
|
void on_aboutButton_clicked();
|
2013-08-22 17:22:49 +03:00
|
|
|
};
|