GradientMenu.h 1017 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef GRADIENTMENU_H
  2. #define GRADIENTMENU_H
  3. #include <QWidget>
  4. #include <QVector>
  5. #include <QPair>
  6. #include <QFile>
  7. #include "Gradient.h"
  8. namespace Ui {
  9. class GradientMenu;
  10. }
  11. class GradientMenu : public QWidget
  12. {
  13. Q_OBJECT
  14. Ui::GradientMenu *ui;
  15. alm::Gradient before;
  16. static const QString presetNames[];
  17. public:
  18. explicit GradientMenu(QWidget *parent = nullptr);
  19. ~GradientMenu(void);
  20. const alm::Gradient& getGradient(void);
  21. const alm::Gradient& getGradientBefore(void) const;
  22. void setGradient(alm::Gradient grad);
  23. void loadGradient(QFile& file);
  24. signals:
  25. void gradientChanged(void);
  26. private slots:
  27. void onGradientChanged(void);
  28. void on_removeBtn_clicked();
  29. void on_presetCmb_currentIndexChanged(int index);
  30. void on_saveBtn_clicked();
  31. void on_loadBtn_clicked();
  32. void on_maxValSpb_valueChanged(double maxVal);
  33. void on_zoomOutBtn_clicked();
  34. void on_zoomInBtn_clicked();
  35. void on_zoomResetBtn_clicked();
  36. };
  37. #endif // GRADIENTMENU_H