From 0f34fd437efb936ef29ac91186321aa7251fbfb1 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Tue, 23 May 2023 11:22:33 +0200 Subject: Massive changes in initial port away from Qt. --- colormap.h | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'colormap.h') diff --git a/colormap.h b/colormap.h index 1039cfd..76577f5 100644 --- a/colormap.h +++ b/colormap.h @@ -1,21 +1,16 @@ #ifndef COLORMAP_H #define COLORMAP_H +#include #include -#include -#include - #include +#include #include "colorscale.h" 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; @@ -24,26 +19,24 @@ public: Vertical }; - Colormap(QQuickItem *parent = 0); + Colormap(); ~Colormap(); + void update(); void setOrientation(Orientation orientation); Orientation orientation() const { return m_orientation; } -signals: - void colorScaleChanged(const ColorScale *scale) const; - void orientationChanged(Orientation orientation) const; + nod::signal)> colorScaleChanged; + nod::signal orientationChanged; -public slots: - void setColorScale(const ColorScale *scale); + void setColorScale(std::shared_ptr scale); -protected: - QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *); + // QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *); private: - QSGNode *newSceneGraph(); + // QSGNode *newSceneGraph(); - QSGDynamicTexture *m_texture; + // QSGDynamicTexture *m_texture; bool m_shouldUpdateTexture, m_shouldUpdateOrientation; Orientation m_orientation; std::vector m_cmap; -- cgit v1.2.3