Krita Source Code Documentation
Loading...
Searching...
No Matches
KisCurveRangeModel Class Reference

#include <KisCurveRangeModel.h>

+ Inheritance diagram for KisCurveRangeModel:

Public Member Functions

lager::cursor< QString > curve () override
 
 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::reader< QString > xMaxLabel () override
 
lager::reader< qreal > xMaxValue () override
 
lager::reader< QString > xMinLabel () override
 
lager::reader< qreal > xMinValue () override
 
lager::reader< QString > xValueSuffix () override
 
lager::reader< QString > yMaxLabel () override
 
lager::reader< qreal > yMaxValue () override
 
lager::reader< QString > yMinLabel () override
 
lager::reader< qreal > yMinValue () override
 
lager::reader< QString > yValueSuffix () override
 
 ~KisCurveRangeModel ()
 
- Public Member Functions inherited from KisCurveRangeModelInterface
virtual ~KisCurveRangeModelInterface ()
 

Static Public Member Functions

static qreal calcXMaxValueWithFactory (const QString &activeSensorId, const int length)
 
static qreal calcXMinValueWithFactory (const QString &sensorId)
 
static KisCurveRangeModelFactory factory (const QString &yMinLabel, const QString &yMaxLabel, int curveMinValue, int curveMaxValue, const QString &curveValueSuffix)
 

Private Attributes

lager::reader< QString > m_activeSensorId
 
lager::reader< int > m_activeSensorLength
 
lager::cursor< QString > m_curve
 
lager::constant< QString > m_yMaxLabel
 
lager::constant< qreal > m_yMaxValue
 
lager::constant< QString > m_yMinLabel
 
lager::constant< qreal > m_yMinValue
 
lager::constant< QString > m_yValueSuffix
 

Detailed Description

Definition at line 13 of file KisCurveRangeModel.h.

Constructor & Destructor Documentation

◆ KisCurveRangeModel()

KisCurveRangeModel::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 )

Definition at line 47 of file KisCurveRangeModel.cpp.

55 : m_curve(std::move(curve))
56 , m_activeSensorId(std::move(activeSensorId))
57 , m_activeSensorLength(std::move(activeSensorLength))
63{
64}
lager::reader< QString > yMinLabel() override
lager::constant< QString > m_yMinLabel
lager::reader< qreal > yMaxValue() override
lager::cursor< QString > m_curve
lager::constant< QString > m_yValueSuffix
lager::cursor< QString > curve() override
lager::reader< QString > m_activeSensorId
lager::constant< QString > m_yMaxLabel
lager::reader< qreal > yMinValue() override
lager::constant< qreal > m_yMaxValue
lager::constant< qreal > m_yMinValue
lager::reader< QString > yValueSuffix() override
lager::reader< QString > yMaxLabel() override
lager::reader< int > m_activeSensorLength

◆ ~KisCurveRangeModel()

KisCurveRangeModel::~KisCurveRangeModel ( )

Definition at line 104 of file KisCurveRangeModel.cpp.

105{
106}

Member Function Documentation

◆ calcXMaxValueWithFactory()

qreal KisCurveRangeModel::calcXMaxValueWithFactory ( const QString & activeSensorId,
const int length )
static

Definition at line 94 of file KisCurveRangeModel.cpp.

95{
98
100
101 return factory->maximumValue(length);
102}
qreal length(const QPointF &vec)
Definition Ellipse.cc:82
static KisCurveRangeModelFactory factory(const QString &yMinLabel, const QString &yMaxLabel, int curveMinValue, int curveMaxValue, const QString &curveValueSuffix)
static KisDynamicSensorFactoryRegistry * instance()
T get(const QString &id) const
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
Definition kis_assert.h:129

References factory(), KoGenericRegistry< T >::get(), KisDynamicSensorFactoryRegistry::instance(), KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE, and length().

◆ calcXMinValueWithFactory()

qreal KisCurveRangeModel::calcXMinValueWithFactory ( const QString & sensorId)
static

◆ curve()

lager::cursor< QString > KisCurveRangeModel::curve ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 108 of file KisCurveRangeModel.cpp.

109{
110 return m_curve;
111}

References m_curve.

◆ factory()

KisCurveRangeModelFactory KisCurveRangeModel::factory ( const QString & yMinLabel,
const QString & yMaxLabel,
int curveMinValue,
int curveMaxValue,
const QString & curveValueSuffix )
static

Definition at line 66 of file KisCurveRangeModel.cpp.

71{
72 return [yMinLabel, yMaxLabel,
73 curveMinValue, curveMaxValue,
74 curveValueSuffix](lager::cursor<QString> curve,
75 lager::cursor<QRectF> curveRange,
76 lager::reader<QString> activeSensorId,
77 lager::reader<int> activeSensorLength) {
78
79 Q_UNUSED(curveRange);
80 return new KisCurveRangeModel(curve, activeSensorId, activeSensorLength, yMinLabel, yMaxLabel, curveMinValue, curveMaxValue, curveValueSuffix);
81 };
82}
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)

References curve(), KisCurveRangeModel(), yMaxLabel(), and yMinLabel().

◆ xMaxLabel()

lager::reader< QString > KisCurveRangeModel::xMaxLabel ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 118 of file KisCurveRangeModel.cpp.

119{
120 return lager::with(m_activeSensorId, m_activeSensorLength).map(&calcMaxLabelWithFactory);
121}

References m_activeSensorId, and m_activeSensorLength.

◆ xMaxValue()

lager::reader< qreal > KisCurveRangeModel::xMaxValue ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 153 of file KisCurveRangeModel.cpp.

154{
156}
static qreal calcXMaxValueWithFactory(const QString &activeSensorId, const int length)

References calcXMaxValueWithFactory(), m_activeSensorId, and m_activeSensorLength.

◆ xMinLabel()

lager::reader< QString > KisCurveRangeModel::xMinLabel ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 113 of file KisCurveRangeModel.cpp.

114{
115 return m_activeSensorId.map(&calcMinLabelWithFactory);
116}

References m_activeSensorId.

◆ xMinValue()

lager::reader< qreal > KisCurveRangeModel::xMinValue ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 148 of file KisCurveRangeModel.cpp.

149{
151}
static qreal calcXMinValueWithFactory(const QString &sensorId)

References calcXMinValueWithFactory(), and m_activeSensorId.

◆ xValueSuffix()

lager::reader< QString > KisCurveRangeModel::xValueSuffix ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 158 of file KisCurveRangeModel.cpp.

159{
160 return m_activeSensorId.map(&calcValueSuffixWithFactory);
161}

References m_activeSensorId.

◆ yMaxLabel()

lager::reader< QString > KisCurveRangeModel::yMaxLabel ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 128 of file KisCurveRangeModel.cpp.

129{
130 return m_yMaxLabel;
131}

References m_yMaxLabel.

◆ yMaxValue()

lager::reader< qreal > KisCurveRangeModel::yMaxValue ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 138 of file KisCurveRangeModel.cpp.

139{
140 return m_yMaxValue;
141}

References m_yMaxValue.

◆ yMinLabel()

lager::reader< QString > KisCurveRangeModel::yMinLabel ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 123 of file KisCurveRangeModel.cpp.

124{
125 return m_yMinLabel;
126}

References m_yMinLabel.

◆ yMinValue()

lager::reader< qreal > KisCurveRangeModel::yMinValue ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 133 of file KisCurveRangeModel.cpp.

134{
135 return m_yMinValue;
136}

References m_yMinValue.

◆ yValueSuffix()

lager::reader< QString > KisCurveRangeModel::yValueSuffix ( )
overridevirtual

Implements KisCurveRangeModelInterface.

Definition at line 143 of file KisCurveRangeModel.cpp.

144{
145 return m_yValueSuffix;
146}

References m_yValueSuffix.

Member Data Documentation

◆ m_activeSensorId

lager::reader<QString> KisCurveRangeModel::m_activeSensorId
private

Definition at line 46 of file KisCurveRangeModel.h.

◆ m_activeSensorLength

lager::reader<int> KisCurveRangeModel::m_activeSensorLength
private

Definition at line 47 of file KisCurveRangeModel.h.

◆ m_curve

lager::cursor<QString> KisCurveRangeModel::m_curve
private

Definition at line 45 of file KisCurveRangeModel.h.

◆ m_yMaxLabel

lager::constant<QString> KisCurveRangeModel::m_yMaxLabel
private

Definition at line 49 of file KisCurveRangeModel.h.

◆ m_yMaxValue

lager::constant<qreal> KisCurveRangeModel::m_yMaxValue
private

Definition at line 51 of file KisCurveRangeModel.h.

◆ m_yMinLabel

lager::constant<QString> KisCurveRangeModel::m_yMinLabel
private

Definition at line 48 of file KisCurveRangeModel.h.

◆ m_yMinValue

lager::constant<qreal> KisCurveRangeModel::m_yMinValue
private

Definition at line 50 of file KisCurveRangeModel.h.

◆ m_yValueSuffix

lager::constant<QString> KisCurveRangeModel::m_yValueSuffix
private

Definition at line 52 of file KisCurveRangeModel.h.


The documentation for this class was generated from the following files: