14QString calcMinLabelWithFactory(
const QString &sensorId)
24QString calcMaxLabelWithFactory(
const QString &activeSensorId,
const int length)
34QString calcValueSuffixWithFactory(
const QString &activeSensorId)
48 lager::reader<QString> activeSensorId,
49 lager::reader<int> activeSensorLength,
50 const QString &yMinLabel,
51 const QString &yMaxLabel,
54 const QString &yValueSuffix)
55 : m_curve(
std::move(curve))
56 , m_activeSensorId(
std::move(activeSensorId))
57 , m_activeSensorLength(
std::move(activeSensorLength))
58 , m_yMinLabel(yMinLabel)
59 , m_yMaxLabel(yMaxLabel)
60 , m_yMinValue(yMinValue)
61 , m_yMaxValue(yMaxValue)
62 , m_yValueSuffix(yValueSuffix)
67 const QString &yMaxLabel,
70 const QString &curveValueSuffix)
73 curveMinValue, curveMaxValue,
74 curveValueSuffix](lager::cursor<QString>
curve,
75 lager::cursor<QRectF> curveRange,
76 lager::reader<QString> activeSensorId,
77 lager::reader<int> activeSensorLength) {
91 return qreal(
factory->minimumValue());
qreal length(const QPointF &vec)
std::tuple< QString, int > LabelsState
std::function< KisCurveRangeModelInterface *(lager::cursor< QString >, lager::cursor< QRectF >, lager::reader< QString >, lager::reader< int >)> KisCurveRangeModelFactory
lager::reader< QString > xValueSuffix() override
static KisCurveRangeModelFactory factory(const QString &yMinLabel, const QString &yMaxLabel, int curveMinValue, int curveMaxValue, const QString &curveValueSuffix)
lager::reader< QString > yMinLabel() override
lager::constant< QString > m_yMinLabel
lager::reader< qreal > yMaxValue() override
lager::reader< qreal > xMinValue() override
lager::cursor< QString > m_curve
KisCurveRangeModel(lager::cursor< QString > curve, lager::reader< QString > activeSensorId, lager::reader< int > activeSensorLength, const QString &yMinLabel, const QString &yMaxLabel, int yMinValue, int yMaxValue, const QString &yValueSuffix)
lager::constant< QString > m_yValueSuffix
lager::reader< QString > xMinLabel() override
lager::cursor< QString > curve() override
lager::reader< qreal > xMaxValue() override
lager::reader< QString > m_activeSensorId
static qreal calcXMaxValueWithFactory(const QString &activeSensorId, const int length)
lager::constant< QString > m_yMaxLabel
lager::reader< qreal > yMinValue() override
static qreal calcXMinValueWithFactory(const QString &sensorId)
lager::constant< qreal > m_yMaxValue
lager::constant< qreal > m_yMinValue
lager::reader< QString > yValueSuffix() override
lager::reader< QString > yMaxLabel() override
lager::reader< QString > xMaxLabel() override
lager::reader< int > m_activeSensorLength
static KisDynamicSensorFactoryRegistry * instance()
virtual QString valueSuffix()=0
virtual QString minimumLabel()=0
virtual QString maximumLabel(int length)=0
T get(const QString &id) const
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)