gradientchoosedialog.h 722 B

123456789101112131415161718192021222324252627282930
  1. #ifndef GRADIENTCHOOSEDIALOG_H
  2. #define GRADIENTCHOOSEDIALOG_H
  3. #include <QDialog>
  4. #include "ui_gradientchooser.h"
  5. #include "Gradient.h"
  6. #include <memory>
  7. #include <map>
  8. class GradientChooseDialog : public QDialog
  9. {
  10. Q_OBJECT
  11. private:
  12. Ui::GradientChooser gcd;
  13. std::unique_ptr<Gradient> chosenGradient = nullptr;
  14. static std::map<std::string, std::string> presets;
  15. public:
  16. GradientChooseDialog();
  17. private slots:
  18. void on_buttonBox_accepted();
  19. void on_buttonBox_clicked(QAbstractButton *button);
  20. void on_presets_currentIndexChanged(const QString &arg1);
  21. public:
  22. inline std::unique_ptr<Gradient> getGradient(void) { return std::move(chosenGradient); }
  23. };
  24. #endif // GRADIENTCHOOSEDIALOG_H