Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <QWidget>
- #include <QVector>
- #include <QtGui>
- #include <QtCore>
- class Gradient : public QWidget
- {
- struct StopColor
- {
- double stop;
- QString color;
- };
- public:
- QVector<StopColor> m_gradient;
- int m_handle_w;
- int m_handle_h;
- int m_drag_position;
- // Constructor
- public:
- Gradient(QVector<StopColor> gradient);
- // Public Functions
- public:
- void _sort_gradient();
- void _constrain_gradient();
- void setGradient(QVector<StopColor> gradient);
- signals:
- void gradientChanged();
- protected:
- void paintEvent(QPaintEvent *e);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement