pixelsampler: added pixel sampler panel

When visible, this panel will show the current reference and display transformed
color under the cursor of any viewer.
This commit is contained in:
itsmattkc
2020-04-01 16:57:10 +11:00
parent 76f260cb3a
commit 6ea6dd810e
25 changed files with 390 additions and 48 deletions
+44
View File
@@ -0,0 +1,44 @@
#ifndef PIXELSAMPLERWIDGET_H
#define PIXELSAMPLERWIDGET_H
#include <QLabel>
#include <QGroupBox>
#include <QWidget>
#include "render/color.h"
class PixelSamplerWidget : public QGroupBox
{
Q_OBJECT
public:
PixelSamplerWidget(QWidget* parent = nullptr);
public slots:
void SetValues(const Color& color);
private:
void UpdateLabelInternal();
Color color_;
QLabel* label_;
};
class ManagedPixelSamplerWidget : public QWidget
{
Q_OBJECT
public:
ManagedPixelSamplerWidget(QWidget* parent = nullptr);
public slots:
void SetValues(const Color& reference, const Color& display);
private:
PixelSamplerWidget* reference_view_;
PixelSamplerWidget* display_view_;
};
#endif // PIXELSAMPLERWIDGET_H