GradientMenu.h 692 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef GRADIENTMENU_H
  2. #define GRADIENTMENU_H
  3. #include <QWidget>
  4. #include <QVector>
  5. #include <QPair>
  6. #include "Gradient.h"
  7. namespace Ui {
  8. class GradientMenu;
  9. }
  10. class GradientMenu : public QWidget
  11. {
  12. Q_OBJECT
  13. Ui::GradientMenu *ui;
  14. Gradient before;
  15. static const QString presetNames[];
  16. public:
  17. explicit GradientMenu(QWidget *parent = nullptr);
  18. ~GradientMenu(void);
  19. const Gradient& getGradient(void);
  20. const Gradient& getGradientBefore(void) const;
  21. void setGradient(Gradient grad);
  22. signals:
  23. void gradientChanged(void);
  24. private slots:
  25. void on_removeBtn_clicked();
  26. void on_presetCmb_currentIndexChanged(int index);
  27. };
  28. #endif // GRADIENTMENU_H