CTL
0.6.1
Computed Tomography Library
|
Helper class that can emit signals during calculations of a certain reconstructor. More...
#include <abstractreconstructor.h>
Signals | |
void | progress (qreal portionCompleted) |
void | information (QString info) |
Public Member Functions | |
void | connectToMessageHandler (bool includeProgress) |
Connects this instance's signals to the CTL's MessageHandler. More... | |
Private Attributes | |
QMetaObject::Connection | _progressConnection |
Helper class that can emit signals during calculations of a certain reconstructor.
This class uses Qt's signal/slot principle to allow communication of a reconstructor class with other program parts. To do so, connect the signals of this object with the desired receiver objects.
The notifier can conveniently be connected to the MessageHandler of the CTL using connectToMessageHandler() or directly from a reconstructor instance through AbstractReconstructor::connectNotifierToMessageHandler().
The ReconstructorNotifier offers the following Q_SIGNALS:
void CTL::ReconstructorNotifier::connectToMessageHandler | ( | bool | includeProgress | ) |
Connects this instance's signals to the CTL's MessageHandler.
This connects the information signal of this instance to the MessageHandler::messageFromSignal slot, such that it processes incoming information signals as regular messages. If includeProgress = true
, this also establishes a connection between this instance's progress() signal and the message handler. Each progress
signal results in a message of format "Reconstruction progress %1 %.", where %1 is replaced with the progress reported by the signal (times 100 to express percentage).
The method ensures that no multiple connections are established, even if it is called multiple times.
To (fully) disconnect this instance from the message handler, use:
|
signal |
Signal that can be emitted to communicate a status information.
|
signal |
Signal that is emitted to communicate the (relative) progress of the reconstruction procedure. A value of progress = 1.0 means reconstruction has finished.