##// END OF EJS Templates
Separate the initialization of the properties of the graph of the update of the units of the graph....
Separate the initialization of the properties of the graph of the update of the units of the graph. The initialization of the properties is carried out when adding a variable in the graph, the update of the units is carried out when loading the data of this variable

File last commit:

r1053:18abbd5ba9c1
r1337:3acf26407503
Show More
ColorScaleEditor.h
54 lines | 1.4 KiB | text/x-c | CLexer
Alexandre Leroux
Inits color scale widget
r1042 #ifndef SCIQLOP_COLORSCALEEDITOR_H
#define SCIQLOP_COLORSCALEEDITOR_H
Alexandre Leroux
Inits threshold mode buttons (auto or manual)...
r1044 #include <QButtonGroup>
Alexandre Leroux
Inits color scale widget
r1042 #include <QDialog>
namespace Ui {
class ColorScaleEditor;
} // Ui
Alexandre Leroux
Adds the color scale in edting in color scale editor
r1051 class SqpColorScale;
Alexandre Leroux
Inits color scale preview
r1047 class QCPColorScale;
Alexandre Leroux
Inits color scale widget
r1042 /**
* @brief The ColorScaleEditor class represents the widget to set properties of color scale's graphs
*/
class ColorScaleEditor : public QDialog {
Q_OBJECT
public:
Alexandre Leroux
Adds the color scale in edting in color scale editor
r1051 explicit ColorScaleEditor(SqpColorScale &scale, QWidget *parent = 0);
Alexandre Leroux
Inits color scale widget
r1042 virtual ~ColorScaleEditor() noexcept;
private:
Alexandre Leroux
Implements color scale loading when the editor is open
r1052 /// Fills the editor fields from color scale data
void loadScale();
Alexandre Leroux
Implements color scale save when the editor is closed
r1053 /// Updates the color scale from editor fields
void saveScale();
Alexandre Leroux
Inits color scale widget
r1042 Ui::ColorScaleEditor *ui;
Alexandre Leroux
Inits threshold mode buttons (auto or manual)...
r1044 QButtonGroup *m_ThresholdGroup;
Alexandre Leroux
Adds the color scale in edting in color scale editor
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;
Alexandre Leroux
Inits threshold mode buttons (auto or manual)...
r1044
private slots:
Alexandre Leroux
Implements color scale save when the editor is closed
r1053 /// @sa QDialog::accept()
void accept() override;
Alexandre Leroux
Inits min/max spinboxes...
r1045 /// Slot called when max threshold value changes
void onMaxChanged();
/// Slot called when min threshold value changes
void onMinChanged();
Alexandre Leroux
Inits threshold mode buttons (auto or manual)...
r1044 /// Slot called when the threshold mode (auto or manual) changes
void onThresholdChanged(bool checked);
Alexandre Leroux
Implements preview update...
r1048
/// Slot called when a property of the color scale changed
void updatePreview();
Alexandre Leroux
Inits color scale widget
r1042 };
#endif // SCIQLOP_COLORSCALEEDITOR_H