##// 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:

r1060:1474b0522998
r1308:41b7c6aab8be
Show More
SqpColorScale.h
32 lines | 1.0 KiB | text/x-c | CLexer
Alexandre Leroux
Creates color scale for Sciqlop...
r1049 #ifndef SCIQLOP_SQPCOLORSCALE_H
#define SCIQLOP_SQPCOLORSCALE_H
#include <Visualization/qcustomplot.h>
Alexandre Leroux
Creates method that computes thresholds of a SqpColorScale
r1059 #include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(LOG_SqpColorScale)
Alexandre Leroux
Creates color scale for Sciqlop...
r1049 /**
* @brief The SqpColorScale struct represents the color scale for some graphs (such as
* spectrograms).
*
* Its implementation is based on the QCustomPlot color scale (@sa QCPColorScale) to which are added
* other useful properties for viewing in SciQlop
*/
struct SqpColorScale {
Alexandre Leroux
Creates method that computes thresholds of a SqpColorScale
r1059 static std::pair<double, double> computeThresholds(const SqpColorScale &scale);
Alexandre Leroux
Creates color scale for Sciqlop...
r1049 explicit SqpColorScale(QCustomPlot &plot);
Alexandre Leroux
Updates sqp color scale thresholds (1)...
r1060 void updateDataRange() noexcept;
Alexandre Leroux
Creates color scale for Sciqlop...
r1049 /// QCustomPlot object representing the color scale.
/// @remarks The SqpColorScale instance has not the property on this pointer. The pointer must
/// remain valid throughout the existence of the SqpColorScale instance
QCPColorScale *m_Scale{nullptr};
bool m_AutomaticThreshold{false};
QCPColorGradient::GradientPreset m_GradientPreset{QCPColorGradient::gpJet};
};
#endif // SCIQLOP_SQPCOLORSCALE_H