mainwindow_moc.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 Team";
  18. const QString appName = "VCMI 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. private:
  30. Ui::MainWindow * ui;
  31. void load();
  32. enum TabRows
  33. {
  34. MODS = 0,
  35. SETTINGS = 1,
  36. SETUP = 2,
  37. ABOUT = 3,
  38. };
  39. void changeEvent(QEvent *event) override;
  40. public:
  41. explicit MainWindow(QWidget * parent = nullptr);
  42. ~MainWindow() override;
  43. const CModList & getModList() const;
  44. CModListView * getModView();
  45. void updateTranslation();
  46. void computeSidePanelSizes();
  47. void detectPreferredLanguage();
  48. void enterSetup();
  49. void exitSetup();
  50. void switchToModsTab();
  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. };