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

SnapmaticEditor.h 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 SNAPMATICEDITOR_H
  19. #define SNAPMATICEDITOR_H
  20. #include <QDialog>
  21. #include "CrewDatabase.h"
  22. #include "ProfileDatabase.h"
  23. #include "SnapmaticPicture.h"
  24. namespace Ui {
  25. class SnapmaticEditor;
  26. }
  27. class SnapmaticEditor : public QDialog
  28. {
  29. Q_OBJECT
  30. public:
  31. explicit SnapmaticEditor(CrewDatabase *crewDB, ProfileDatabase *profileDB, QWidget *parent = 0);
  32. void setSnapmaticPicture(SnapmaticPicture *picture);
  33. void setSnapmaticPlayers(const QStringList &players);
  34. void setSnapmaticTitle(const QString &title);
  35. void setSnapmaticCrew(const QString &crew = "");
  36. QString returnCrewName(int crewID);
  37. ~SnapmaticEditor();
  38. private slots:
  39. void on_rbSelfie_toggled(bool checked);
  40. void on_rbMugshot_toggled(bool checked);
  41. void on_rbEditor_toggled(bool checked);
  42. void on_rbCustom_toggled(bool checked);
  43. void on_cmdCancel_clicked();
  44. void on_cmdApply_clicked();
  45. void on_cbQualify_toggled(bool checked);
  46. void on_labPlayers_linkActivated(const QString &link);
  47. void on_labTitle_linkActivated(const QString &link);
  48. void on_labCrew_linkActivated(const QString &link);
  49. void playerListUpdated(QStringList playerList);
  50. private:
  51. CrewDatabase *crewDB;
  52. ProfileDatabase *profileDB;
  53. Ui::SnapmaticEditor *ui;
  54. SnapmaticProperties snapmaticProperties;
  55. SnapmaticPicture *smpic;
  56. QStringList playersList;
  57. QString snapmaticTitle;
  58. int crewID;
  59. bool isSelfie;
  60. bool isMugshot;
  61. bool isEditor;
  62. void selfie_toggled(bool checked);
  63. void mugshot_toggled(bool checked);
  64. void editor_toggled(bool checked);
  65. void qualifyAvatar();
  66. void insertPlayerNames(QStringList *players);
  67. QStringList insertPlayerNames(const QStringList &players);
  68. };
  69. #endif // SNAPMATICEDITOR_H