2
0

firstlaunch_moc.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. bool heroesDataUpdate();
  38. bool heroesDataDetect();
  39. void heroesDataMissing();
  40. void heroesDataDetected();
  41. void heroesLanguageUpdate();
  42. void forceHeroesLanguage(const QString & language);
  43. QString getHeroesInstallDir();
  44. void copyHeroesData(const QString & path = {});
  45. // Tab Mod Preset
  46. void modPresetUpdate();
  47. QString findTranslationModName();
  48. bool checkCanInstallTranslation();
  49. bool checkCanInstallWog();
  50. bool checkCanInstallHota();
  51. bool checkCanInstallExtras();
  52. bool checkCanInstallMod(const QString & modID);
  53. void installMod(const QString & modID);
  54. public:
  55. explicit FirstLaunchView(QWidget * parent = nullptr);
  56. public slots:
  57. private slots:
  58. void on_buttonTabLanguage_clicked();
  59. void on_buttonTabHeroesData_clicked();
  60. void on_buttonTabModPreset_clicked();
  61. void on_listWidgetLanguage_currentRowChanged(int currentRow);
  62. void on_pushButtonLanguageNext_clicked();
  63. void on_pushButtonDataNext_clicked();
  64. void on_pushButtonDataBack_clicked();
  65. void on_pushButtonDataSearch_clicked();
  66. void on_pushButtonDataCopy_clicked();
  67. void on_pushButtonDataHelp_clicked();
  68. void on_comboBoxLanguage_currentIndexChanged(int index);
  69. void on_pushButtonPresetBack_clicked();
  70. void on_pushButtonPresetNext_clicked();
  71. void on_pushButtonDiscord_clicked();
  72. void on_pushButtonSlack_clicked();
  73. void on_pushButtonGithub_clicked();
  74. private:
  75. Ui::FirstLaunchView * ui;
  76. };