mainwindow_moc.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * mainwindow_moc.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include <QMainWindow>
  12. #include <QStringList>
  13. #include <QTranslator>
  14. namespace Ui
  15. {
  16. class MainWindow;
  17. const QString teamName = "vcmi";
  18. const QString appName = "launcher";
  19. }
  20. class QTableWidgetItem;
  21. class CModList;
  22. class CModListView;
  23. class MainWindow : public QMainWindow
  24. {
  25. Q_OBJECT
  26. #ifdef ENABLE_QT_TRANSLATIONS
  27. QTranslator translator;
  28. #endif
  29. Ui::MainWindow * ui;
  30. void load();
  31. enum TabRows
  32. {
  33. MODS = 0,
  34. SETTINGS = 1,
  35. SETUP = 2,
  36. ABOUT = 3,
  37. };
  38. public:
  39. explicit MainWindow(QWidget * parent = nullptr);
  40. ~MainWindow() override;
  41. CModListView * getModView();
  42. void updateTranslation();
  43. void computeSidePanelSizes();
  44. void detectPreferredLanguage();
  45. void enterSetup();
  46. void exitSetup();
  47. void switchToModsTab();
  48. protected:
  49. void changeEvent(QEvent * event) override;
  50. public slots:
  51. void on_startGameButton_clicked();
  52. private slots:
  53. void on_modslistButton_clicked();
  54. void on_settingsButton_clicked();
  55. void on_startEditorButton_clicked();
  56. void on_aboutButton_clicked();
  57. };