Open Source Snapmatic picture and Savegame viewer/editor for GTA V https://gta5view.syping.de/

UserInterface.h 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*****************************************************************************
  2. * gta5view Grand Theft Auto V Profile Viewer
  3. * Copyright (C) 2016-2017 Syping
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *****************************************************************************/
  18. #ifndef USERINTERFACE_H
  19. #define USERINTERFACE_H
  20. #include "SnapmaticPicture.h"
  21. #include "ProfileInterface.h"
  22. #include "ProfileDatabase.h"
  23. #include "DatabaseThread.h"
  24. #include "CrewDatabase.h"
  25. #include "SavegameData.h"
  26. #include <QMainWindow>
  27. #include <QMouseEvent>
  28. #include <QCloseEvent>
  29. #include <QString>
  30. #include <QMap>
  31. namespace Ui {
  32. class UserInterface;
  33. }
  34. class UserInterface : public QMainWindow
  35. {
  36. Q_OBJECT
  37. public:
  38. explicit UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, DatabaseThread *threadDB, QWidget *parent = 0);
  39. void setupDirEnv();
  40. ~UserInterface();
  41. private slots:
  42. void closeProfile();
  43. void profileLoaded();
  44. void changeFolder_clicked();
  45. void profileButton_clicked();
  46. void on_cmdReload_clicked();
  47. void on_actionExit_triggered();
  48. void on_actionSelect_profile_triggered();
  49. void on_actionAbout_gta5sync_triggered();
  50. void on_actionSelect_all_triggered();
  51. void on_actionDeselect_all_triggered();
  52. void on_actionExport_selected_triggered();
  53. void on_actionDelete_selected_triggered();
  54. void on_actionOptions_triggered();
  55. void on_action_Import_triggered();
  56. void on_actionOpen_File_triggered();
  57. void on_actionSelect_GTA_Folder_triggered();
  58. void on_action_Enable_In_game_triggered();
  59. void on_action_Disable_In_game_triggered();
  60. void on_actionQualify_as_Avatar_triggered();
  61. void on_actionChange_Players_triggered();
  62. void on_actionSet_Crew_triggered();
  63. void on_actionSet_Title_triggered();
  64. void settingsApplied(int contentMode, bool languageChanged);
  65. protected:
  66. void closeEvent(QCloseEvent *ev);
  67. private:
  68. ProfileDatabase *profileDB;
  69. CrewDatabase *crewDB;
  70. DatabaseThread *threadDB;
  71. Ui::UserInterface *ui;
  72. ProfileInterface *profileUI;
  73. QList<QPushButton*> profileBtns;
  74. QString profileName;
  75. bool profileOpen;
  76. int contentMode;
  77. QString language;
  78. QString defaultWindowTitle;
  79. QString GTAV_Folder;
  80. QString GTAV_ProfilesFolder;
  81. QStringList GTAV_Profiles;
  82. void setupProfileUi();
  83. void openProfile(const QString &profileName);
  84. void closeProfile_p();
  85. void openSelectProfile();
  86. void retranslateUi();
  87. // Open File
  88. bool openFile(QString selectedFile, bool warn = true);
  89. void openSavegameFile(SavegameData *savegame);
  90. void openSnapmaticFile(SnapmaticPicture *picture);
  91. };
  92. #endif // USERINTERFACE_H