firstlaunch_moc.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * firstlaunch_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 "../StdInc.h"
  12. namespace Ui
  13. {
  14. class FirstLaunchView;
  15. }
  16. class CModListView;
  17. class FirstLaunchView : public QWidget
  18. {
  19. Q_OBJECT
  20. // vcmibuilder script is not available on these platforms
  21. #if defined(VCMI_WINDOWS) || defined(VCMI_MOBILE) || defined(VCMI_APPLE)
  22. static constexpr bool hasVCMIBuilderScript = false;
  23. #else
  24. static constexpr bool hasVCMIBuilderScript = true;
  25. #endif
  26. void changeEvent(QEvent *event);
  27. CModListView * getModView();
  28. void setSetupProgress(int progress);
  29. void enterSetup();
  30. void activateTabLanguage();
  31. void activateTabHeroesData();
  32. void activateTabModPreset();
  33. void exitSetup();
  34. // Tab Language
  35. void languageSelected(const QString & languageCode);
  36. // Tab Heroes III Data
  37. void heroesDataUpdate();
  38. bool heroesDataDetect();
  39. void heroesDataMissing();
  40. void heroesDataDetected();
  41. void heroesLanguageUpdate();
  42. void forceHeroesLanguage(const QString & language);
  43. void copyHeroesData();
  44. // Tab Mod Preset
  45. void modPresetUpdate();
  46. QString findTranslationModName();
  47. bool checkCanInstallTranslation();
  48. bool checkCanInstallWog();
  49. bool checkCanInstallHota();
  50. bool checkCanInstallExtras();
  51. bool checkCanInstallMod(const QString & modID);
  52. void installMod(const QString & modID);
  53. public:
  54. explicit FirstLaunchView(QWidget * parent = nullptr);
  55. public slots:
  56. private slots:
  57. void on_buttonTabLanguage_clicked();
  58. void on_buttonTabHeroesData_clicked();
  59. void on_buttonTabModPreset_clicked();
  60. void on_listWidgetLanguage_currentRowChanged(int currentRow);
  61. void on_pushButtonLanguageNext_clicked();
  62. void on_pushButtonDataNext_clicked();
  63. void on_pushButtonDataBack_clicked();
  64. void on_pushButtonDataSearch_clicked();
  65. void on_pushButtonDataCopy_clicked();
  66. void on_pushButtonDataHelp_clicked();
  67. void on_comboBoxLanguage_currentIndexChanged(int index);
  68. void on_pushButtonPresetBack_clicked();
  69. void on_pushButtonPresetNext_clicked();
  70. void on_pushButtonDiscord_clicked();
  71. void on_pushButtonSlack_clicked();
  72. void on_pushButtonGithub_clicked();
  73. private:
  74. Ui::FirstLaunchView * ui;
  75. };