Plasma Engine  2.0
Loading...
Searching...
No Matches
ColorDialog.moc.h
1#pragma once
2
3#include <Foundation/Math/Color.h>
4#include <GuiFoundation/GuiFoundationDLL.h>
5#include <GuiFoundation/UIServices/ColorDlgWidgets.moc.h>
6#include <GuiFoundation/ui_ColorDialog.h>
7#include <QDialog>
8
9class QLineEdit;
11class QPushButton;
12class QSlider;
13
14
15class PL_GUIFOUNDATION_DLL plQtColorDialog : public QDialog, Ui_ColorDialog
16{
17 Q_OBJECT
18public:
19 plQtColorDialog(const plColor& initial, QWidget* pParent);
21
22 void ShowAlpha(bool bEnable);
23 void ShowHDR(bool bEnable);
24
25 static QByteArray GetLastDialogGeometry() { return s_LastDialogGeometry; }
26
27Q_SIGNALS:
28 void CurrentColorChanged(const plColor& color);
29 void ColorSelected(const plColor& color);
30
31private Q_SLOTS:
32 void ChangedRGB();
33 void ChangedAlpha();
34 void ChangedExposure();
35 void ChangedHSV();
36 void ChangedArea(double x, double y);
37 void ChangedRange(double x);
38 void ChangedHEX();
39
40private:
41 bool m_bAlpha;
42 bool m_bHDR;
43
44 float m_fHue;
45 float m_fSaturation;
46 float m_fValue;
47
48 plUInt16 m_uiHue;
49 plUInt8 m_uiSaturation;
50
51 plUInt8 m_uiGammaRed;
52 plUInt8 m_uiGammaGreen;
53 plUInt8 m_uiGammaBlue;
54
55 plUInt8 m_uiAlpha;
56 float m_fExposureValue;
57
58 plColor m_CurrentColor;
59
60 static QByteArray s_LastDialogGeometry;
61
62private:
63 void ApplyColor();
64
65 void RecomputeHDR();
66
67 void ExtractColorRGB();
68 void ExtractColorHSV();
69
70 void ComputeRgbAndHsv(const plColor& color);
71 void RecomputeRGB();
72 void RecomputeHSV();
73};
74
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
Definition ColorDialog.moc.h:16
Definition DoubleSpinBox.moc.h:8