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

ImportDialog.h 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*****************************************************************************
  2. * gta5view Grand Theft Auto V Profile Viewer
  3. * Copyright (C) 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 IMPORTDIALOG_H
  19. #define IMPORTDIALOG_H
  20. #include <QDialog>
  21. #include <QMenu>
  22. namespace Ui {
  23. class ImportDialog;
  24. }
  25. class ImportDialog : public QDialog
  26. {
  27. Q_OBJECT
  28. public:
  29. explicit ImportDialog(QString profileName, QWidget *parent = 0);
  30. ~ImportDialog();
  31. QImage image();
  32. QString getImageTitle();
  33. void setImage(QImage *image);
  34. void lockSettings(bool lock);
  35. void enableOverwriteMode();
  36. bool isImportAgreed();
  37. bool areSettingsLocked();
  38. private slots:
  39. void processImage();
  40. void cropPicture();
  41. void importNewPicture();
  42. void loadImportSettings();
  43. void saveImportSettings();
  44. void on_cbIgnore_toggled(bool checked);
  45. void on_cbAvatar_toggled(bool checked);
  46. void on_cmdCancel_clicked();
  47. void on_cmdOK_clicked();
  48. void on_labPicture_labelPainted();
  49. void on_cmdColourChange_clicked();
  50. void on_cmdBackgroundChange_clicked();
  51. void on_cmdBackgroundWipe_clicked();
  52. void on_cbStretch_toggled(bool checked);
  53. void on_cbForceAvatarColour_toggled(bool checked);
  54. void on_cbWatermark_toggled(bool checked);
  55. private:
  56. QString profileName;
  57. Ui::ImportDialog *ui;
  58. QImage avatarAreaImage;
  59. QString backgroundPath;
  60. QString imageTitle;
  61. QImage backImage;
  62. QImage workImage;
  63. QImage newImage;
  64. QColor selectedColour;
  65. QMenu *optionsMenu;
  66. bool insideAvatarZone;
  67. bool watermarkPicture;
  68. bool watermarkAvatar;
  69. bool watermarkBlock;
  70. bool settingsLocked;
  71. bool importAgreed;
  72. int snapmaticResolutionLW;
  73. int snapmaticResolutionLH;
  74. void processWatermark(QPainter *snapmaticPainter);
  75. void processSettings(QString settingsProfile, bool setDefault = false);
  76. void saveSettings(QString settingsProfile);
  77. };
  78. #endif // IMPORTDIALOG_H