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

#include <kis_multi_integer_filter_widget.h>

+ Inheritance diagram for KisDelayedActionIntegerInput:

Signals

void valueChangedDelayed (int value)
 
- Signals inherited from KisSliderSpinBox
void draggingFinished ()
 
- Signals inherited from KisIntParseSpinBox
void errorWhileParsing (const QString &expr) const
 signal emitted when the last parsed expression is not valid.
 
void noMoreParsingError () const
 signal emitted when the last parsed expression is valid and the expression before was not valid.
 

Public Member Functions

void cancelDelayedSignal ()
 
 KisDelayedActionIntegerInput (QWidget *parent, const QString &name)
 
- Public Member Functions inherited from KisSliderSpinBox
int fastSliderStep () const
 Get the value to which multiples the sinbox value snaps when the control key is pressed.
 
bool isDragging () const
 Get if the user is currently dragging the slider with the pointer.
 
 KisSliderSpinBox (QWidget *parent=nullptr)
 
QSize minimumSizeHint () const override
 
void setBlockUpdateSignalOnDrag (bool newBlockUpdateSignalOnDrag)
 Set if the spinbox should not Q_EMIT signals when dragging the slider.
 
void setExponentRatio (qreal newExponentRatio)
 Set the exponent used by a power function to modify the values as a function of the horizontal position.
 
void setFastSliderStep (int newFastSliderStep)
 Set the value to which multiples the sinbox value snaps when the control key is pressed.
 
void setMaximum (int newMaximum, bool computeNewFastSliderStep=true)
 Set the maximum value of the range.
 
void setMinimum (int newMinimum, bool computeNewFastSliderStep=true)
 Set the minimum value of the range.
 
void setPageStep (int newPageStep)
 Does nothing currently.
 
void setRange (int newMinimum, int newMaximum, bool computeNewFastSliderStep=true)
 Set the minimum and the maximum values of the range, computing a new "fast slider step" based on the range if required.
 
void setSoftMaximum (int newSoftMaximum)
 Set the maximum value of the soft range.
 
void setSoftMinimum (int newSoftMinimum)
 Set the minimum value of the soft range.
 
void setSoftRange (int newSoftMinimum, int newSoftMaximum)
 Set the minimum and the maximum values of the soft range.
 
void setValue (int newValue)
 
QSize sizeHint () const override
 Set the value.
 
int softMaximum () const
 Get the maximum value of the "soft range".
 
int softMinimum () const
 Get the minimum value of the "soft range".
 
 ~KisSliderSpinBox () override
 
- Public Member Functions inherited from KisIntParseSpinBox
bool isLastValid () const
 Get if the last expression entered is a valid one.
 
 KisIntParseSpinBox (QWidget *parent=0)
 
void setValue (int value, bool overwriteExpression=false)
 Set the value of the spinbox.
 
void stepBy (int steps) override
 This is a reimplementation of QSpinBox::stepBy that uses setValue.
 
virtual QString veryCleanText () const
 This virtual function is similar to cleanText(). But child classes may reimplement it to further process ("clean up") the expression.
 
 ~KisIntParseSpinBox () override
 

Private Slots

void slotTimeToUpdate ()
 
void slotValueChanged ()
 

Private Attributes

QTimer * m_timer
 

Additional Inherited Members

- Protected Member Functions inherited from KisSliderSpinBox
virtual void setInternalValue (int value, bool blockUpdateSignal)
 
void setPrivateValue (int value)
 
- Protected Member Functions inherited from KisIntParseSpinBox
QString textFromValue (int value) const override
 
QValidator::State validate (QString &input, int &pos) const override
 
int valueFromText (const QString &text) const override
 

Detailed Description

Definition at line 21 of file kis_multi_integer_filter_widget.h.

Constructor & Destructor Documentation

◆ KisDelayedActionIntegerInput()

KisDelayedActionIntegerInput::KisDelayedActionIntegerInput ( QWidget * parent,
const QString & name )

Definition at line 20 of file kis_multi_integer_filter_widget.cc.

21 : KisSliderSpinBox(parent)
22{
23 setObjectName(name);
24 m_timer = new QTimer(this);
25 m_timer->setObjectName(name);
26 m_timer->setSingleShot(true);
27 connect(m_timer, SIGNAL(timeout()), SLOT(slotValueChanged()));
28 connect(this, SIGNAL(valueChanged(int)), SLOT(slotTimeToUpdate()));
29}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisSliderSpinBox(QWidget *parent=nullptr)

References connect(), m_timer, slotTimeToUpdate(), and slotValueChanged().

Member Function Documentation

◆ cancelDelayedSignal()

void KisDelayedActionIntegerInput::cancelDelayedSignal ( )

Definition at line 41 of file kis_multi_integer_filter_widget.cc.

42{
43 m_timer->stop();
44}

References m_timer.

◆ slotTimeToUpdate

void KisDelayedActionIntegerInput::slotTimeToUpdate ( )
privateslot

Definition at line 31 of file kis_multi_integer_filter_widget.cc.

32{
33 m_timer->start(50);
34}

References m_timer.

◆ slotValueChanged

void KisDelayedActionIntegerInput::slotValueChanged ( )
privateslot

Definition at line 36 of file kis_multi_integer_filter_widget.cc.

37{
38 Q_EMIT valueChangedDelayed(value());
39}
float value(const T *src, size_t ch)
void valueChangedDelayed(int value)

References value(), and valueChangedDelayed().

◆ valueChangedDelayed

void KisDelayedActionIntegerInput::valueChangedDelayed ( int value)
signal

Member Data Documentation

◆ m_timer

QTimer* KisDelayedActionIntegerInput::m_timer
private

Definition at line 37 of file kis_multi_integer_filter_widget.h.


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