1
0

gradientchoosedialog.h 589 B

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