diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-28 21:46:31 -0300 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-02-28 21:46:31 -0300 |
commit | d3d3526bab2ab051656a1b80b4e0f1337037b5de (patch) | |
tree | 1df83705676cfac7cc8f755d8025d05b1b1e43cd /colormap.h | |
parent | 5bd1fec462466d605f974fa27c3b00826a1bab57 (diff) |
Added colormap orientation & improved UI.
* Colormap: orientation now enables vertical & horizontal colormap
display
* Two colormap components, one for each type of point (regular,
control)
* Improved controls grouping and cohesion
Diffstat (limited to 'colormap.h')
-rw-r--r-- | colormap.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -14,14 +14,25 @@ class Colormap : public QQuickItem { Q_OBJECT + Q_ENUMS(Orientation) + Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged) public: static const int SAMPLES = 128; + enum Orientation { + Horizontal, + Vertical + }; + Colormap(QQuickItem *parent = 0); ~Colormap(); + void setOrientation(Orientation orientation); + Orientation orientation() const { return m_orientation; } + signals: void colorScaleChanged(const ColorScale &scale) const; + void orientationChanged(Orientation orientation) const; public slots: void setColorScale(const ColorScale &scale); @@ -33,7 +44,8 @@ private: QSGNode *newSceneGraph(); QSGDynamicTexture *m_texture; - bool m_shouldUpdateTexture; + bool m_shouldUpdateTexture, m_shouldUpdateOrientation; + Orientation m_orientation; std::vector<float> m_cmap; }; |