mainwindow_moc.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. LOBBY = 2,
  37. SETUP = 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 enterSetup();
  48. void exitSetup();
  49. void switchToModsTab();
  50. public slots:
  51. void on_startGameButton_clicked();
  52. private slots:
  53. void on_modslistButton_clicked();
  54. void on_settingsButton_clicked();
  55. void on_lobbyButton_clicked();
  56. void on_startEditorButton_clicked();
  57. };