![]() |
Image Component Library (ICL)
|
Compability class. More...
#include <ThreadedUpdatableSlider.h>
Classes | |
| struct | CB |
| internally callback type More... | |
Public Member Functions | |
| ThreadedUpdatableSlider (QWidget *parent=0) | |
| Base constructor. More... | |
| ThreadedUpdatableSlider (Qt::Orientation o, QWidget *parent=0) | |
| void | setValueFromOtherThread (int value) |
| call this function to update a widget's UI from an external thread More... | |
| void | setStepping (int stepping) |
| the given stepping is automatically clipped to [1,...] More... | |
| virtual bool | event (QEvent *event) |
| automatically called by Qt's event processing mechanism More... | |
| void | registerCallback (const utils::Function< void > &cb, const std::string &events="value") |
| registers a void-callback function to the given event names More... | |
| void | removeCallbacks () |
| removes all callbacks associated to this slider component More... | |
Protected Slots | |
| void | collectValueChanged (int) |
| for collecting slider singnals More... | |
| void | collectSliderPressed () |
| for collecting slider singnals More... | |
| void | collectSliderMoved (int) |
| for collecting slider singnals More... | |
| void | collectSliderReleased () |
| for collecting slider singnals More... | |
Private Attributes | |
| std::vector< CB > | callbacks |
| internal list of callbacks More... | |
| int | m_stepping |
Friends | |
| struct | EventFilter |
Compability class.
This class provides a compability function for asyncronous updating of a QWidget. As QWidget::update() has shown to be not as threadsafe as expected, the new updateFromOtherThread function fixes this problem.
updateFromOtherThread used QApplication::postEvent, to post a UserType QEvent to this object, which is caught in the overloaded event() function
| icl::qt::ThreadedUpdatableSlider::ThreadedUpdatableSlider | ( | QWidget * | parent = 0 | ) |
Base constructor.
| icl::qt::ThreadedUpdatableSlider::ThreadedUpdatableSlider | ( | Qt::Orientation | o, |
| QWidget * | parent = 0 |
||
| ) |
|
protectedslot |
for collecting slider singnals
|
protectedslot |
for collecting slider singnals
|
protectedslot |
for collecting slider singnals
|
protectedslot |
for collecting slider singnals
|
virtual |
automatically called by Qt's event processing mechanism
| void icl::qt::ThreadedUpdatableSlider::registerCallback | ( | const utils::Function< void > & | cb, |
| const std::string & | events = "value" |
||
| ) |
registers a void-callback function to the given event names
allowed event names are
| void icl::qt::ThreadedUpdatableSlider::removeCallbacks | ( | ) |
removes all callbacks associated to this slider component
|
inline |
the given stepping is automatically clipped to [1,...]
|
inline |
call this function to update a widget's UI from an external thread
new, if this is called from the GUI thread, setValue is called directly without using Qt's signal mechanism
|
friend |
|
private |
internal list of callbacks
|
private |
1.8.15