• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • krita API Reference
  • KDE Home
  • Contact Us
 

plugins/paintops/libpaintop

Classes | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KisCurveOption Class Reference

#include <kis_curve_option.h>

Inheritance diagram for KisCurveOption:
Inheritance graph
[legend]

Classes

struct  ValueComponents
 

Signals

void unCheckUseCurve ()
 

Public Member Functions

 KisCurveOption (const QString &name, KisPaintOpOption::PaintopCategory category, bool checked, qreal value=1.0, qreal min=0.0, qreal max=1.0)
 
virtual ~KisCurveOption ()
 
QList< KisDynamicSensorSP > activeSensors () const
 
KisPaintOpOption::PaintopCategory category () const
 
qreal computeRotationLikeValue (const KisPaintInformation &info, qreal baseValue, bool absoluteAxesFlipped, qreal scalingPartCoeff, bool disableScalingPart) const
 
qreal computeSizeLikeValue (const KisPaintInformation &info) const
 
ValueComponents computeValueComponents (const KisPaintInformation &info) const
 
KisCubicCurve defaultCurve ()
 
KisCubicCurve emptyCurve ()
 
KisCubicCurve getCommonCurve () const
 
int getCurveMode () const
 
virtual KisDynamicSensorSP id2Sensor (const KoID &id, const QString &parentOptionName)
 
virtual DynamicSensorType id2Type (const KoID &id)
 
virtual int intMaxValue () const
 
virtual int intMinValue () const
 
bool isCheckable ()
 
bool isChecked () const
 
bool isCurveUsed () const
 
bool isRandom () const
 
bool isSameCurveUsed () const
 
virtual void lodLimitations (KisPaintopLodLimitations *l) const
 
qreal maxValue () const
 
qreal minValue () const
 
const QString & name () const
 
virtual void readOptionSetting (KisPropertiesConfigurationSP setting)
 
void replaceSensor (KisDynamicSensorSP sensor)
 
void resetAllSensors ()
 
KisDynamicSensorSP sensor (DynamicSensorType sensorType, bool active) const
 
QList< KisDynamicSensorSP > sensors ()
 
virtual QList< KoID > sensorsIds ()
 
virtual QList< DynamicSensorType > sensorsTypes ()
 
void setChecked (bool checked)
 
void setCommonCurve (KisCubicCurve curve)
 
void setCurve (DynamicSensorType sensorType, bool useSameCurve, const KisCubicCurve &curve)
 
void setCurveMode (int mode)
 
void setCurveUsed (bool useCurve)
 
void setSeparateCurveValue (bool separateCurveValue)
 
void setUseSameCurve (bool useSameCurve)
 
void setValue (qreal value)
 
virtual KisDynamicSensorSP type2Sensor (DynamicSensorType sensorType, const QString &parentOptionName)
 
qreal value () const
 
virtual QString valueSuffix () const
 
virtual void writeOptionSetting (KisPropertiesConfigurationSP setting) const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Protected Member Functions

virtual void readNamedOptionSetting (const QString &prefix, const KisPropertiesConfigurationSP setting)
 
void setValueRange (qreal min, qreal max)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Protected Attributes

KisPaintOpOption::PaintopCategory m_category
 
bool m_checkable
 
bool m_checked
 
KisCubicCurve m_commonCurve
 
int m_curveMode
 
qreal m_maxValue
 
qreal m_minValue
 
QString m_name
 
QMap< DynamicSensorType, KisDynamicSensorSP > m_sensorMap
 
bool m_separateCurveValue
 
bool m_useCurve
 
bool m_useSameCurve
 
qreal m_value
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

KisCurveOption is the base class for paintop options that are defined through one or more curves.

Note: it is NOT a KisPaintOpOption, even though the API is pretty similar!

KisCurveOption classes have a generic GUI widget, KisCurveOptionWidget. So, in contrast to KisPaintOpOption classes, KisCurveOption instances can and will be created in the constructor of KisPaintOp paintops. This class can manage to read and write its settings directly.

Definition at line 34 of file kis_curve_option.h.

Constructor & Destructor Documentation

◆ KisCurveOption()

KisCurveOption::KisCurveOption ( const QString &  name,
KisPaintOpOption::PaintopCategory  category,
bool  checked,
qreal  value = 1.0,
qreal  min = 0.0,
qreal  max = 1.0 
)

Definition at line 50 of file kis_curve_option.cpp.

◆ ~KisCurveOption()

KisCurveOption::~KisCurveOption ( )
virtual

Definition at line 75 of file kis_curve_option.cpp.

Member Function Documentation

◆ activeSensors()

QList< KisDynamicSensorSP > KisCurveOption::activeSensors ( ) const

Definition at line 500 of file kis_curve_option.cpp.

◆ category()

KisPaintOpOption::PaintopCategory KisCurveOption::category ( ) const

Definition at line 84 of file kis_curve_option.cpp.

◆ computeRotationLikeValue()

qreal KisCurveOption::computeRotationLikeValue ( const KisPaintInformation &  info,
qreal  baseValue,
bool  absoluteAxesFlipped,
qreal  scalingPartCoeff,
bool  disableScalingPart 
) const

Definition at line 467 of file kis_curve_option.cpp.

◆ computeSizeLikeValue()

qreal KisCurveOption::computeSizeLikeValue ( const KisPaintInformation &  info) const

Definition at line 461 of file kis_curve_option.cpp.

◆ computeValueComponents()

KisCurveOption::ValueComponents KisCurveOption::computeValueComponents ( const KisPaintInformation &  info) const

Uses the curves set on the sensors to compute a single double value that can control the parameters of a brush.

This value is derives from the values stored in ValuesComponents object.

Definition at line 395 of file kis_curve_option.cpp.

◆ defaultCurve()

KisCubicCurve KisCurveOption::defaultCurve ( )

defaultCurve returns a curve that is set when the KisCurveOption is not initialized yet the purpose of distinguishing between this one and emptyCurve() is to allow easier finding out that something is wrong in the code setting common curves

Returns
a non-standard curve with two hills

Definition at line 473 of file kis_curve_option.cpp.

◆ emptyCurve()

KisCubicCurve KisCurveOption::emptyCurve ( )

emptyCurve returns the simplest usable curve

Returns
curve from (0, 0) to (1, 1)

Definition at line 486 of file kis_curve_option.cpp.

◆ getCommonCurve()

KisCubicCurve KisCurveOption::getCommonCurve ( ) const

Returns the curve that is being used instead of sensor ones in case "Use the same curve" is checked.

Definition at line 304 of file kis_curve_option.cpp.

◆ getCurveMode()

int KisCurveOption::getCurveMode ( ) const

Definition at line 299 of file kis_curve_option.cpp.

◆ id2Sensor()

KisDynamicSensorSP KisCurveOption::id2Sensor ( const KoID &  id,
const QString &  parentOptionName 
)
virtual

Definition at line 589 of file kis_curve_option.cpp.

◆ id2Type()

DynamicSensorType KisCurveOption::id2Type ( const KoID &  id)
virtual

Definition at line 536 of file kis_curve_option.cpp.

◆ intMaxValue()

int KisCurveOption::intMaxValue ( ) const
virtual

Reimplemented in KisPressureHSVOption, and KisPressureRotationOption.

Definition at line 158 of file kis_curve_option.cpp.

◆ intMinValue()

int KisCurveOption::intMinValue ( ) const
virtual

Reimplemented in KisPressureHSVOption, and KisPressureRotationOption.

Definition at line 153 of file kis_curve_option.cpp.

◆ isCheckable()

bool KisCurveOption::isCheckable ( )

Definition at line 314 of file kis_curve_option.cpp.

◆ isChecked()

bool KisCurveOption::isChecked ( ) const

Definition at line 319 of file kis_curve_option.cpp.

◆ isCurveUsed()

bool KisCurveOption::isCurveUsed ( ) const

Definition at line 289 of file kis_curve_option.cpp.

◆ isRandom()

bool KisCurveOption::isRandom ( ) const

Definition at line 283 of file kis_curve_option.cpp.

◆ isSameCurveUsed()

bool KisCurveOption::isSameCurveUsed ( ) const

Definition at line 294 of file kis_curve_option.cpp.

◆ lodLimitations()

void KisCurveOption::lodLimitations ( KisPaintopLodLimitations *  l) const
virtual

Reimplemented in KisPressureSizeOption.

Definition at line 148 of file kis_curve_option.cpp.

◆ maxValue()

qreal KisCurveOption::maxValue ( ) const

Definition at line 94 of file kis_curve_option.cpp.

◆ minValue()

qreal KisCurveOption::minValue ( ) const

Definition at line 89 of file kis_curve_option.cpp.

◆ name()

const QString & KisCurveOption::name ( ) const

Definition at line 79 of file kis_curve_option.cpp.

◆ readNamedOptionSetting()

void KisCurveOption::readNamedOptionSetting ( const QString &  prefix,
const KisPropertiesConfigurationSP  setting 
)
protectedvirtual

Read the option using the prefix in argument.

Definition at line 168 of file kis_curve_option.cpp.

◆ readOptionSetting()

void KisCurveOption::readOptionSetting ( KisPropertiesConfigurationSP  setting)
virtual

Reimplemented in KisPressureMirrorOption, KisPressureSharpnessOption, KisPressureSpacingOption, KisPressureOpacityOption, KisPressureScatterOption, KisFlowOpacityOption, and KisPressureRotationOption.

Definition at line 143 of file kis_curve_option.cpp.

◆ replaceSensor()

void KisCurveOption::replaceSensor ( KisDynamicSensorSP  sensor)

Definition at line 261 of file kis_curve_option.cpp.

◆ resetAllSensors()

void KisCurveOption::resetAllSensors ( )

Definition at line 104 of file kis_curve_option.cpp.

◆ sensor()

KisDynamicSensorSP KisCurveOption::sensor ( DynamicSensorType  sensorType,
bool  active 
) const

Definition at line 267 of file kis_curve_option.cpp.

◆ sensors()

QList< KisDynamicSensorSP > KisCurveOption::sensors ( )

Definition at line 494 of file kis_curve_option.cpp.

◆ sensorsIds()

QList< KoID > KisCurveOption::sensorsIds ( )
virtual

Definition at line 512 of file kis_curve_option.cpp.

◆ sensorsTypes()

QList< DynamicSensorType > KisCurveOption::sensorsTypes ( )
virtual

Definition at line 683 of file kis_curve_option.cpp.

◆ setChecked()

void KisCurveOption::setChecked ( bool  checked)

Definition at line 324 of file kis_curve_option.cpp.

◆ setCommonCurve()

void KisCurveOption::setCommonCurve ( KisCubicCurve  curve)

Sets the curve that is being used instead of sensor ones in case "Share curve across all settings" is checked.

Definition at line 344 of file kis_curve_option.cpp.

◆ setCurve()

void KisCurveOption::setCurve ( DynamicSensorType  sensorType,
bool  useSameCurve,
const KisCubicCurve &  curve 
)

Definition at line 349 of file kis_curve_option.cpp.

◆ setCurveMode()

void KisCurveOption::setCurveMode ( int  mode)

Definition at line 334 of file kis_curve_option.cpp.

◆ setCurveUsed()

void KisCurveOption::setCurveUsed ( bool  useCurve)

Definition at line 329 of file kis_curve_option.cpp.

◆ setSeparateCurveValue()

void KisCurveOption::setSeparateCurveValue ( bool  separateCurveValue)

Definition at line 309 of file kis_curve_option.cpp.

◆ setUseSameCurve()

void KisCurveOption::setUseSameCurve ( bool  useSameCurve)

Sets the bool indicating whether "Share curve across all settings" is checked.

Definition at line 339 of file kis_curve_option.cpp.

◆ setValue()

void KisCurveOption::setValue ( qreal  value)

Definition at line 390 of file kis_curve_option.cpp.

◆ setValueRange()

void KisCurveOption::setValueRange ( qreal  min,
qreal  max 
)
protected

Definition at line 384 of file kis_curve_option.cpp.

◆ type2Sensor()

KisDynamicSensorSP KisCurveOption::type2Sensor ( DynamicSensorType  sensorType,
const QString &  parentOptionName 
)
virtual

Definition at line 643 of file kis_curve_option.cpp.

◆ unCheckUseCurve

void KisCurveOption::unCheckUseCurve ( )
signal

◆ value()

qreal KisCurveOption::value ( ) const

Definition at line 99 of file kis_curve_option.cpp.

◆ valueSuffix()

QString KisCurveOption::valueSuffix ( ) const
virtual

Reimplemented in KisPressureHSVOption, and KisPressureRotationOption.

Definition at line 163 of file kis_curve_option.cpp.

◆ writeOptionSetting()

void KisCurveOption::writeOptionSetting ( KisPropertiesConfigurationSP  setting) const
virtual

Reimplemented in KisPressureMirrorOption, KisPressureSpacingOption, KisPressureSharpnessOption, KisPressureOpacityOption, KisPressureScatterOption, and KisFlowOpacityOption.

Definition at line 113 of file kis_curve_option.cpp.

Member Data Documentation

◆ m_category

KisPaintOpOption::PaintopCategory KisCurveOption::m_category
protected

Definition at line 174 of file kis_curve_option.h.

◆ m_checkable

bool KisCurveOption::m_checkable
protected

Definition at line 176 of file kis_curve_option.h.

◆ m_checked

bool KisCurveOption::m_checked
protected

Definition at line 177 of file kis_curve_option.h.

◆ m_commonCurve

KisCubicCurve KisCurveOption::m_commonCurve
protected

Curve that is being used instead of sensors' internal ones in case "Use the same curve" is checked.

Definition at line 186 of file kis_curve_option.h.

◆ m_curveMode

int KisCurveOption::m_curveMode
protected

Definition at line 188 of file kis_curve_option.h.

◆ m_maxValue

qreal KisCurveOption::m_maxValue
protected

Definition at line 194 of file kis_curve_option.h.

◆ m_minValue

qreal KisCurveOption::m_minValue
protected

Definition at line 193 of file kis_curve_option.h.

◆ m_name

QString KisCurveOption::m_name
protected

Definition at line 173 of file kis_curve_option.h.

◆ m_sensorMap

QMap<DynamicSensorType, KisDynamicSensorSP> KisCurveOption::m_sensorMap
protected

Definition at line 190 of file kis_curve_option.h.

◆ m_separateCurveValue

bool KisCurveOption::m_separateCurveValue
protected

Definition at line 180 of file kis_curve_option.h.

◆ m_useCurve

bool KisCurveOption::m_useCurve
protected

Definition at line 178 of file kis_curve_option.h.

◆ m_useSameCurve

bool KisCurveOption::m_useSameCurve
protected

Definition at line 179 of file kis_curve_option.h.

◆ m_value

qreal KisCurveOption::m_value
protected

Definition at line 192 of file kis_curve_option.h.


The documentation for this class was generated from the following files:
  • kis_curve_option.h
  • kis_curve_option.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:48:38 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

plugins/paintops/libpaintop

Skip menu "plugins/paintops/libpaintop"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

krita API Reference

Skip menu "krita API Reference"
  • libs
  •   KritaBasicFlakes
  •   brush
  •   KritaUndo2
  •   KritaFlake
  •   image
  •   KritaPlugin
  •   Krita
  •   KritaPigment
  •   KritaResources
  •   KritaStore
  •   ui
  •   KritaWidgets
  •   KritaWidgetUtils
  • plugins
  •   Assitants
  •   Extensions
  •   Filters
  •   Generators
  •   Formats
  •           src
  •   PaintOps
  •     libpaintop

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal