|
Krita Source Code Documentation
|
#include <slider_and_spin_box_sync.h>
Inheritance diagram for SliderAndSpinBoxSync:Public Slots | |
| void | slotParentValueChanged () |
Public Member Functions | |
| SliderAndSpinBoxSync (KisDoubleSliderSpinBox *slider, QSpinBox *spinBox, IntFunction parentValueOp) | |
| ~SliderAndSpinBoxSync () override | |
Private Types | |
| using | IntFunction = std::function<int()> |
Private Slots | |
| void | sliderChanged (qreal value) |
| void | spinBoxChanged (int value) |
Private Attributes | |
| bool | m_blockUpdates |
| IntFunction | m_parentValueOp |
| KisDoubleSliderSpinBox * | m_slider |
| QSpinBox * | m_spinBox |
Syncs a slider measured in percentage with a spin box measuring real value getting value from parentValueOp.
E.g.
parentValueOp() — total system memory in MiB slider — percentage of the memory we can use spinBox — amount o fmemory we can use in MiB slotParentValueChanged() — should be called every time total memory changes
Definition at line 28 of file slider_and_spin_box_sync.h.
|
private |
Definition at line 31 of file slider_and_spin_box_sync.h.
| SliderAndSpinBoxSync::SliderAndSpinBoxSync | ( | KisDoubleSliderSpinBox * | slider, |
| QSpinBox * | spinBox, | ||
| IntFunction | parentValueOp ) |
Definition at line 16 of file slider_and_spin_box_sync.cpp.
References connect(), m_slider, m_spinBox, sliderChanged(), and spinBoxChanged().
|
override |
Definition at line 28 of file slider_and_spin_box_sync.cpp.
|
privateslot |
Definition at line 43 of file slider_and_spin_box_sync.cpp.
References m_blockUpdates, m_parentValueOp, m_spinBox, and value().
|
slot |
Definition at line 33 of file slider_and_spin_box_sync.cpp.
References m_parentValueOp, m_slider, m_spinBox, and sliderChanged().
|
privateslot |
Definition at line 52 of file slider_and_spin_box_sync.cpp.
References m_blockUpdates, m_parentValueOp, m_slider, KisDoubleSliderSpinBox::setValue(), and value().
|
private |
Definition at line 52 of file slider_and_spin_box_sync.h.
|
private |
Definition at line 50 of file slider_and_spin_box_sync.h.
|
private |
Definition at line 48 of file slider_and_spin_box_sync.h.
|
private |
Definition at line 49 of file slider_and_spin_box_sync.h.