ColorScaleEditor.h
46 lines
| 1.2 KiB
| text/x-c
|
CLexer
|
r1042 | #ifndef SCIQLOP_COLORSCALEEDITOR_H | ||
#define SCIQLOP_COLORSCALEEDITOR_H | ||||
|
r1044 | #include <QButtonGroup> | ||
|
r1042 | #include <QDialog> | ||
namespace Ui { | ||||
class ColorScaleEditor; | ||||
} // Ui | ||||
|
r1051 | class SqpColorScale; | ||
|
r1047 | class QCPColorScale; | ||
|
r1042 | /** | ||
* @brief The ColorScaleEditor class represents the widget to set properties of color scale's graphs | ||||
*/ | ||||
class ColorScaleEditor : public QDialog { | ||||
Q_OBJECT | ||||
public: | ||||
|
r1051 | explicit ColorScaleEditor(SqpColorScale &scale, QWidget *parent = 0); | ||
|
r1042 | virtual ~ColorScaleEditor() noexcept; | ||
private: | ||||
Ui::ColorScaleEditor *ui; | ||||
|
r1044 | QButtonGroup *m_ThresholdGroup; | ||
|
r1051 | /// Scale in editing | ||
/// @remarks reference must remain valid throughout the existence of the ColorScaleEditor | ||||
/// instance | ||||
SqpColorScale &m_Scale; | ||||
/// Scale shown as preview | ||||
QCPColorScale *m_PreviewScale; | ||||
|
r1044 | |||
private slots: | ||||
|
r1045 | /// Slot called when max threshold value changes | ||
void onMaxChanged(); | ||||
/// Slot called when min threshold value changes | ||||
void onMinChanged(); | ||||
|
r1044 | /// Slot called when the threshold mode (auto or manual) changes | ||
void onThresholdChanged(bool checked); | ||||
|
r1048 | |||
/// Slot called when a property of the color scale changed | ||||
void updatePreview(); | ||||
|
r1042 | }; | ||
#endif // SCIQLOP_COLORSCALEEDITOR_H | ||||