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

This class is a spinbox in which you can click and drag to set the value. A slider like bar is displayed inside. More...

#include <kis_slider_spin_box.h>

+ Inheritance diagram for KisDoubleSliderSpinBox:

Signals

void draggingFinished ()
 
- Signals inherited from KisDoubleParseSpinBox
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

qreal fastSliderStep () const
 
bool isDragging () const
 
 KisDoubleSliderSpinBox (QWidget *parent=nullptr)
 
QSize minimumSizeHint () const override
 
void setBlockUpdateSignalOnDrag (bool newBlockUpdateSignalOnDrag)
 
void setExponentRatio (qreal newExponentRatio)
 
void setFastSliderStep (qreal newFastSliderStep)
 
void setMaximum (qreal newMaximum, bool computeNewFastSliderStep=true)
 
void setMinimum (qreal newMinimum, bool computeNewFastSliderStep=true)
 
void setRange (qreal newMinimum, qreal newMaximum, int newNumberOfDecimals=0, bool computeNewFastSliderStep=true)
 Set the minimum and the maximum values of the range.
 
void setSoftMaximum (qreal newSoftMaximum)
 
void setSoftMinimum (qreal newSoftMinimum)
 
void setSoftRange (qreal newSoftMinimum, qreal newSoftMaximum)
 
void setValue (qreal newValue)
 
QSize sizeHint () const override
 
qreal softMaximum () const
 
qreal softMinimum () const
 
 ~KisDoubleSliderSpinBox () override
 
- Public Member Functions inherited from KisDoubleParseSpinBox
bool isLastValid () const
 Get if the last expression entered is a valid one.
 
 KisDoubleParseSpinBox (QWidget *parent=0)
 
void setValue (double value, bool overwriteExpression=false)
 Set the value of the spinbox.
 
void stepBy (int steps) override
 This is a reimplementation of QDoubleSpinBox::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.
 
 ~KisDoubleParseSpinBox () override
 

Protected Member Functions

virtual void setInternalValue (qreal newValue, bool newBlockUpdateSignal)
 
void setPrivateValue (qreal newValue)
 
- Protected Member Functions inherited from KisDoubleParseSpinBox
QString textFromValue (double value) const override
 
QValidator::State validate (QString &input, int &pos) const override
 
double valueFromText (const QString &text) const override
 

Private Attributes

QScopedPointer< KisSliderSpinBoxPrivate< KisDoubleSliderSpinBox, KisDoubleParseSpinBox > > d
 

Friends

template<typename SpinBoxTypeTP , typename BaseSpinBoxTypeTP >
class KisSliderSpinBoxPrivate
 

Detailed Description

This class is a spinbox in which you can click and drag to set the value. A slider like bar is displayed inside.

See also
KisSliderSpinBox

Definition at line 211 of file kis_slider_spin_box.h.

Constructor & Destructor Documentation

◆ KisDoubleSliderSpinBox()

KisDoubleSliderSpinBox::KisDoubleSliderSpinBox ( QWidget * parent = nullptr)

Definition at line 117 of file kis_slider_spin_box.cpp.

118 : KisDoubleParseSpinBox(parent)
120{}
KisDoubleParseSpinBox(QWidget *parent=0)
QScopedPointer< KisSliderSpinBoxPrivate< KisDoubleSliderSpinBox, KisDoubleParseSpinBox > > d

◆ ~KisDoubleSliderSpinBox()

KisDoubleSliderSpinBox::~KisDoubleSliderSpinBox ( )
override

Definition at line 122 of file kis_slider_spin_box.cpp.

123{}

Member Function Documentation

◆ draggingFinished

void KisDoubleSliderSpinBox::draggingFinished ( )
signal

◆ fastSliderStep()

double KisDoubleSliderSpinBox::fastSliderStep ( ) const

Definition at line 125 of file kis_slider_spin_box.cpp.

126{
127 return d->fastSliderStep();
128}

References d.

◆ isDragging()

bool KisDoubleSliderSpinBox::isDragging ( ) const

Definition at line 140 of file kis_slider_spin_box.cpp.

141{
142 return d->isDragging();
143}

References d.

◆ minimumSizeHint()

QSize KisDoubleSliderSpinBox::minimumSizeHint ( ) const
override

Definition at line 150 of file kis_slider_spin_box.cpp.

151{
152 return d->minimumSizeHint();
153}

References d.

◆ setBlockUpdateSignalOnDrag()

void KisDoubleSliderSpinBox::setBlockUpdateSignalOnDrag ( bool newBlockUpdateSignalOnDrag)

Definition at line 181 of file kis_slider_spin_box.cpp.

182{
183 d->setBlockUpdateSignalOnDrag(newBlockUpdateSignalOnDrag);
184}

References d.

◆ setExponentRatio()

void KisDoubleSliderSpinBox::setExponentRatio ( qreal newExponentRatio)

Definition at line 175 of file kis_slider_spin_box.cpp.

176{
177 Q_ASSERT(newExponentRatio > 0.0);
178 d->setExponentRatio(newExponentRatio);
179}

References d.

◆ setFastSliderStep()

void KisDoubleSliderSpinBox::setFastSliderStep ( qreal newFastSliderStep)

Definition at line 186 of file kis_slider_spin_box.cpp.

187{
188 d->setFastSliderStep(newFastSliderStep);
189}

References d.

◆ setInternalValue()

void KisDoubleSliderSpinBox::setInternalValue ( qreal newValue,
bool newBlockUpdateSignal )
protectedvirtual

Reimplemented in KisSelectionPropertySliderBase.

Definition at line 206 of file kis_slider_spin_box.cpp.

207{
208 d->setValue(newValue, newBlockUpdateSignal);
209}

References d.

◆ setMaximum()

void KisDoubleSliderSpinBox::setMaximum ( qreal newMaximum,
bool computeNewFastSliderStep = true )

Definition at line 170 of file kis_slider_spin_box.cpp.

171{
172 setRange(minimum(), newMaximum, decimals(), computeNewFastSliderStep);
173}
void setRange(qreal newMinimum, qreal newMaximum, int newNumberOfDecimals=0, bool computeNewFastSliderStep=true)
Set the minimum and the maximum values of the range.

References setRange().

◆ setMinimum()

void KisDoubleSliderSpinBox::setMinimum ( qreal newMinimum,
bool computeNewFastSliderStep = true )

Definition at line 165 of file kis_slider_spin_box.cpp.

166{
167 setRange(newMinimum, maximum(), decimals(), computeNewFastSliderStep);
168}

References setRange().

◆ setPrivateValue()

void KisDoubleSliderSpinBox::setPrivateValue ( qreal newValue)
protected

Definition at line 211 of file kis_slider_spin_box.cpp.

212{
213 setValue(newValue);
214}
void setValue(qreal newValue)

References setValue().

◆ setRange()

void KisDoubleSliderSpinBox::setRange ( qreal newMinimum,
qreal newMaximum,
int newNumberOfDecimals = 0,
bool computeNewFastSliderStep = true )

Set the minimum and the maximum values of the range.

The soft range will be adapted to fit inside the range The number of decimals used can be changed with the newNumberOfDecimals parameter

Parameters
newMinimumthe new minimum value
newMaximumthe new maximum value
newNumberOfDecimalsthe new number of decimals
computeNewFastSliderSteptrue if a new "fast slider step" must be computed based on the range
See also
setMinimum(qreal)
setMaximum(qreal)

Definition at line 160 of file kis_slider_spin_box.cpp.

161{
162 d->setRange(newMinimum, newMaximum, newNumberOfDecimals, computeNewFastSliderStep);
163}

References d.

◆ setSoftMaximum()

void KisDoubleSliderSpinBox::setSoftMaximum ( qreal newSoftMaximum)

Definition at line 201 of file kis_slider_spin_box.cpp.

202{
203 setSoftRange(d->softMinimum(), newSoftMaximum);
204}
void setSoftRange(qreal newSoftMinimum, qreal newSoftMaximum)

References d, and setSoftRange().

◆ setSoftMinimum()

void KisDoubleSliderSpinBox::setSoftMinimum ( qreal newSoftMinimum)

Definition at line 196 of file kis_slider_spin_box.cpp.

197{
198 setSoftRange(newSoftMinimum, d->softMaximum());
199}

References d, and setSoftRange().

◆ setSoftRange()

void KisDoubleSliderSpinBox::setSoftRange ( qreal newSoftMinimum,
qreal newSoftMaximum )

Definition at line 191 of file kis_slider_spin_box.cpp.

192{
193 d->setSoftRange(newSoftMinimum, newSoftMaximum);
194}

References d.

◆ setValue()

void KisDoubleSliderSpinBox::setValue ( qreal newValue)

Definition at line 155 of file kis_slider_spin_box.cpp.

156{
157 d->setValue(newValue);
158}

References d.

◆ sizeHint()

QSize KisDoubleSliderSpinBox::sizeHint ( ) const
override

Definition at line 145 of file kis_slider_spin_box.cpp.

146{
147 return d->sizeHint();
148}

References d.

◆ softMaximum()

double KisDoubleSliderSpinBox::softMaximum ( ) const

Definition at line 135 of file kis_slider_spin_box.cpp.

136{
137 return d->softMaximum();
138}

References d.

◆ softMinimum()

double KisDoubleSliderSpinBox::softMinimum ( ) const

Definition at line 130 of file kis_slider_spin_box.cpp.

131{
132 return d->softMinimum();
133}

References d.

Friends And Related Symbol Documentation

◆ KisSliderSpinBoxPrivate

template<typename SpinBoxTypeTP , typename BaseSpinBoxTypeTP >
friend class KisSliderSpinBoxPrivate
friend

Definition at line 258 of file kis_slider_spin_box.h.

Member Data Documentation

◆ d

QScopedPointer<KisSliderSpinBoxPrivate<KisDoubleSliderSpinBox, KisDoubleParseSpinBox> > KisDoubleSliderSpinBox::d
private

Definition at line 259 of file kis_slider_spin_box.h.


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