mainwindow_moc.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. const CModList & getModList() const;
  42. CModListView * getModView();
  43. void updateTranslation();
  44. void computeSidePanelSizes();
  45. void detectPreferredLanguage();
  46. void enterSetup();
  47. void exitSetup();
  48. void switchToModsTab();
  49. protected:
  50. void changeEvent(QEvent * event) override;
  51. public slots:
  52. void on_startGameButton_clicked();
  53. private slots:
  54. void on_modslistButton_clicked();
  55. void on_settingsButton_clicked();
  56. void on_startEditorButton_clicked();
  57. void on_aboutButton_clicked();
  58. };