KSeExpr
4.0.4.0
|
Number slider for either float or int data. More...
#include <ExprControl.h>
Public Member Functions | |
NumberControl (int id, NumberEditable *editable) | |
![]() | |
ExprControl (int id, Editable *editable, bool showColorLink) | |
~ExprControl () override=default | |
virtual QColor | getColor () |
Interface for getting the color (used for linked color picking) More... | |
virtual void | setColor (QColor) |
Interface for setting the color (used for linked color picking) More... | |
void | linkDisconnect (int newId) |
Private Slots | |
void | sliderChanged (int val) |
void | editChanged (int id, const QString &text) |
Private Member Functions | |
void | setValue (double value) |
Update the model with the value and notify the collection. More... | |
void | updateControl () |
Update values in slider and textbox given what the model contains. More... | |
Private Attributes | |
NumberEditable * | _numberEditable {nullptr} |
Pointer to the number control model. More... | |
ExprSlider * | _slider {nullptr} |
Slider for the number. More... | |
ExprLineEdit * | _edit {nullptr} |
Text box for the number. More... | |
Additional Inherited Members | |
![]() | |
void | linkStateChange (int state) |
![]() | |
void | controlChanged (int id) |
void | linkColorEdited (int id, QColor color) |
void | linkColorLink (int id) |
![]() | |
void | resizeEvent (QResizeEvent *event) override |
![]() | |
int | _id |
std::atomic< bool > | _updating {} |
QHBoxLayout * | hbox {nullptr} |
QCheckBox * | _colorLinkCB {nullptr} |
QLabel * | _label {nullptr} |
Editable * | _editable {nullptr} |
Number slider for either float or int data.
Definition at line 170 of file ExprControl.h.
NumberControl::NumberControl | ( | int | id, |
NumberEditable * | editable | ||
) |
Definition at line 225 of file ExprControl.cpp.
References _edit, _numberEditable, _slider, editChanged(), ExprControl::hbox, NumberEditable::isInt, KSeExpr::max(), NumberEditable::max, NumberEditable::min, sliderChanged(), and updateControl().
|
privateslot |
Definition at line 262 of file ExprControl.cpp.
References ExprControl::_updating, and setValue().
Referenced by NumberControl().
|
private |
Update the model with the value and notify the collection.
Definition at line 283 of file ExprControl.cpp.
References ExprControl::_id, _numberEditable, ExprControl::controlChanged(), updateControl(), and NumberEditable::v.
Referenced by editChanged(), and sliderChanged().
|
privateslot |
Definition at line 255 of file ExprControl.cpp.
References _numberEditable, ExprControl::_updating, NumberEditable::isInt, and setValue().
Referenced by NumberControl().
|
private |
Update values in slider and textbox given what the model contains.
Definition at line 273 of file ExprControl.cpp.
References _edit, _numberEditable, _slider, ExprControl::_updating, NumberEditable::isInt, ExprLineEdit::setText(), and NumberEditable::v.
Referenced by NumberControl(), and setValue().
|
private |
Text box for the number.
Definition at line 179 of file ExprControl.h.
Referenced by NumberControl(), and updateControl().
|
private |
Pointer to the number control model.
Definition at line 175 of file ExprControl.h.
Referenced by NumberControl(), setValue(), sliderChanged(), and updateControl().
|
private |
Slider for the number.
Definition at line 177 of file ExprControl.h.
Referenced by NumberControl(), and updateControl().