Image Component Library (ICL)
Public Member Functions | List of all members
icl::qt::ThreadedUpdatableWidget Class Reference

Compability class. More...

#include <ThreadedUpdatableWidget.h>

Inheritance diagram for icl::qt::ThreadedUpdatableWidget:
icl::qt::AbstractPlotWidget icl::qt::ColorLabel icl::qt::CompabilityLabel icl::qt::LowLevelPlotWidget icl::qt::PlotWidget icl::qt::HistogrammWidget

Public Member Functions

 ThreadedUpdatableWidget (QWidget *parent=0)
 Base constructor. More...
void updateFromOtherThread ()
 call this function to update a widget's UI from an external thread More...
virtual bool event (QEvent *event)
 automatically called by Qt's event processing mechanism More...

Detailed Description

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

Constructor & Destructor Documentation

◆ ThreadedUpdatableWidget()

icl::qt::ThreadedUpdatableWidget::ThreadedUpdatableWidget ( QWidget *  parent = 0)

Base constructor.

Member Function Documentation

◆ event()

virtual bool icl::qt::ThreadedUpdatableWidget::event ( QEvent *  event)

automatically called by Qt's event processing mechanism

◆ updateFromOtherThread()

void icl::qt::ThreadedUpdatableWidget::updateFromOtherThread ( )

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

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