CTL  0.6.1
Computed Tomography Library
Signals | Public Member Functions | Private Attributes | List of all members
CTL::ReconstructorNotifier Class Reference

Helper class that can emit signals during calculations of a certain reconstructor. More...

#include <abstractreconstructor.h>

Inheritance diagram for CTL::ReconstructorNotifier:
Inheritance graph
[legend]
Collaboration diagram for CTL::ReconstructorNotifier:
Collaboration graph
[legend]

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
 

Detailed Description

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:

Member Function Documentation

◆ connectToMessageHandler()

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:

this->disconnect(&MessageHandler::instance());

◆ information

void CTL::ReconstructorNotifier::information ( QString  info)
signal

Signal that can be emitted to communicate a status information.

◆ progress

void CTL::ReconstructorNotifier::progress ( qreal  progress)
signal

Signal that is emitted to communicate the (relative) progress of the reconstruction procedure. A value of progress = 1.0 means reconstruction has finished.


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