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

#include <KisCubicCurveQMLWrapper.h>

+ Inheritance diagram for KisCubicCurveQml:

Public Slots

int addPoint (const QPointF &point)
 
void removePoint (int idx)
 
void setName (const QString &name)
 
void setPoint (int idx, const QPointF &point)
 
void setPoints (const QList< QPointF > points)
 

Signals

void nameChanged (const QString &)
 
void pointsChanged (const QList< QPointF > &)
 

Public Member Functions

Q_INVOKABLE QList< qreal > floatTransfer (int size) const
 
Q_INVOKABLE void fromString (const QString &)
 
Q_INVOKABLE qreal interpolateLinear (qreal normalizedValue, const QList< qreal > &transfer) const
 
Q_INVOKABLE bool isConstant (qreal c) const
 
Q_INVOKABLE bool isIdentity () const
 
 KisCubicCurveQml (QObject *parent=nullptr)
 
const QString & name () const
 
const QList< QPointF > points () const
 
Q_INVOKABLE QString toString () const
 
Q_INVOKABLE qreal value (qreal x) const
 

Properties

QString name
 
QList< QPointF > points
 

Private Attributes

KisCubicCurve m_curve
 

Detailed Description

Definition at line 14 of file KisCubicCurveQMLWrapper.h.

Constructor & Destructor Documentation

◆ KisCubicCurveQml()

KisCubicCurveQml::KisCubicCurveQml ( QObject * parent = nullptr)

Definition at line 8 of file KisCubicCurveQMLWrapper.cpp.

9 : QObject(parent)
10{}

Member Function Documentation

◆ addPoint

int KisCubicCurveQml::addPoint ( const QPointF & point)
slot

Definition at line 70 of file KisCubicCurveQMLWrapper.cpp.

71{
72 const int idx = m_curve.addPoint(point);
74 return idx;
75}
void pointsChanged(const QList< QPointF > &)
QList< KisCubicCurvePoint > points
int addPoint(const KisCubicCurvePoint &point)

References KisCubicCurve::addPoint(), m_curve, KisCubicCurve::points, and pointsChanged().

◆ floatTransfer()

QList< qreal > KisCubicCurveQml::floatTransfer ( int size) const

Definition at line 42 of file KisCubicCurveQMLWrapper.cpp.

43{
44 return m_curve.floatTransfer(size).toList();
45}
const QVector< qreal > floatTransfer(int size=256) const

References KisCubicCurve::floatTransfer(), and m_curve.

◆ fromString()

void KisCubicCurveQml::fromString ( const QString & str)

Definition at line 52 of file KisCubicCurveQMLWrapper.cpp.

53{
55}
Q_DECL_DEPRECATED void fromString(const QString &)

References KisCubicCurve::fromString(), and m_curve.

◆ interpolateLinear()

qreal KisCubicCurveQml::interpolateLinear ( qreal normalizedValue,
const QList< qreal > & transfer ) const

Definition at line 37 of file KisCubicCurveQMLWrapper.cpp.

38{
39 return m_curve.interpolateLinear(normalizedValue, transfer.toVector());
40}
static qreal interpolateLinear(qreal normalizedValue, const QVector< qreal > &transfer)

References KisCubicCurve::interpolateLinear(), and m_curve.

◆ isConstant()

bool KisCubicCurveQml::isConstant ( qreal c) const

Definition at line 32 of file KisCubicCurveQMLWrapper.cpp.

33{
34 return m_curve.isConstant(c);
35}
bool isConstant(qreal c) const

References KisCubicCurve::isConstant(), and m_curve.

◆ isIdentity()

bool KisCubicCurveQml::isIdentity ( ) const

Definition at line 27 of file KisCubicCurveQMLWrapper.cpp.

28{
29 return m_curve.isIdentity();
30}
bool isIdentity() const

References KisCubicCurve::isIdentity(), and m_curve.

◆ name()

const QString & KisCubicCurveQml::name ( ) const

Definition at line 17 of file KisCubicCurveQMLWrapper.cpp.

18{
19 return m_curve.name();
20}

References m_curve, and KisCubicCurve::name.

◆ nameChanged

void KisCubicCurveQml::nameChanged ( const QString & )
signal

◆ points()

const QList< QPointF > KisCubicCurveQml::points ( ) const

Definition at line 12 of file KisCubicCurveQMLWrapper.cpp.

13{
14 return m_curve.points();
15}

References m_curve, and KisCubicCurve::points.

◆ pointsChanged

void KisCubicCurveQml::pointsChanged ( const QList< QPointF > & )
signal

◆ removePoint

void KisCubicCurveQml::removePoint ( int idx)
slot

◆ setName

void KisCubicCurveQml::setName ( const QString & name)
slot

Definition at line 83 of file KisCubicCurveQMLWrapper.cpp.

84{
86 emit nameChanged(name);
87}
void nameChanged(const QString &)
void setName(const QString &name)

References m_curve, name, nameChanged(), and KisCubicCurve::setName().

◆ setPoint

void KisCubicCurveQml::setPoint ( int idx,
const QPointF & point )
slot

Definition at line 64 of file KisCubicCurveQMLWrapper.cpp.

65{
66 m_curve.setPoint(idx, point);
68}
void setPoint(int idx, const KisCubicCurvePoint &point)

References m_curve, KisCubicCurve::points, pointsChanged(), and KisCubicCurve::setPoint().

◆ setPoints

void KisCubicCurveQml::setPoints ( const QList< QPointF > points)
slot

Definition at line 58 of file KisCubicCurveQMLWrapper.cpp.

59{
62}
void setPoints(const QList< QPointF > &points)

References m_curve, KisCubicCurve::points, points, pointsChanged(), and KisCubicCurve::setPoints().

◆ toString()

QString KisCubicCurveQml::toString ( ) const

Definition at line 47 of file KisCubicCurveQMLWrapper.cpp.

48{
49 return m_curve.toString();
50}
QString toString() const

References m_curve, and KisCubicCurve::toString().

◆ value()

qreal KisCubicCurveQml::value ( qreal x) const

Definition at line 22 of file KisCubicCurveQMLWrapper.cpp.

23{
24 return m_curve.value(x);
25}
qreal value(qreal x)

References m_curve, and KisCubicCurve::value().

Member Data Documentation

◆ m_curve

KisCubicCurve KisCubicCurveQml::m_curve
private

Definition at line 48 of file KisCubicCurveQMLWrapper.h.

Property Documentation

◆ name

QString KisCubicCurveQml::name
readwrite

Definition at line 20 of file KisCubicCurveQMLWrapper.h.

◆ points

QList<QPointF> KisCubicCurveQml::points
readwrite

Definition at line 19 of file KisCubicCurveQMLWrapper.h.


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