15 #ifndef niftkQtSignalCollector_h
16 #define niftkQtSignalCollector_h
20 #include <mitkCommon.h>
21 #include <itkObject.h>
22 #include <itkObjectFactory.h>
54 virtual void OnQtSignalReceived();
59 const QObject* m_Object;
75 typedef
std::pair<const QObject*, QByteArray>
Signal;
80 void Connect(const QObject*
object, const
char* signal = 0);
97 Signals
GetSignals(const QObject*
object, const
char* signal = 0) const;
100 virtual
void Clear();
108 virtual ~QtSignalCollector();
111 virtual
void PrintSelf(
std::ostream & os,
itk::Indent indent) const override;
std::vector< Signal > Signals
Definition: niftkQtSignalCollector.h:76
virtual void Clear()
Clears all the signals collected by now.
Definition: niftkQtSignalCollector.cxx:151
Abstract class to be implemented by Qt signal listeners.
Definition: niftkQtSignalCollector.h:32
void AddListener(QtSignalListener *listener)
Adds a listener that will get notified of the Qt signals that this object is connected to...
Definition: niftkQtSignalCollector.cxx:79
Definition: niftkMeshSmoother.cxx:19
Definition: niftkITKAffineResampleImage.cxx:74
virtual void OnQtSignalReceived(const QObject *object, const char *signal) override
Adds the object-signal pair to the list of collected signals.
Definition: niftkQtSignalCollector.cxx:127
const Signals & GetSignals() const
Gets the signals collected by this object.
Definition: niftkQtSignalCollector.cxx:144
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const override
Prints the collected signals to the given stream or to the standard output if no stream is given...
Definition: niftkQtSignalCollector.cxx:158
Class for collecting Qt signals and sending notifications of them to registered listeners.
Definition: niftkQtSignalCollector.h:67
std::pair< const QObject *, QByteArray > Signal
Definition: niftkQtSignalCollector.h:75
void RemoveListener(QtSignalListener *listener)
Removes a listener. The listener will not get notified about the Qt signals observed by the current o...
Definition: niftkQtSignalCollector.cxx:90
virtual ~QtSignalNotifier()
Definition: niftkQtSignalCollector.cxx:35
QtSignalNotifier(QtSignalListener *signalListener, const QObject *object, const char *signal)
Definition: niftkQtSignalCollector.cxx:24
Helper class that implements a call back mechanism for Qt signals.
Definition: niftkQtSignalCollector.h:42
mitkClassMacroItkParent(QtSignalCollector, QObject) static Pointer New()
Definition: niftkExceptionObject.h:21
virtual void OnQtSignalReceived(const QObject *object, const char *signal)=0
void Connect(const QObject *object, const char *signal=0)
Connects this object to the signals of the given object. The current object will collect the given si...
Definition: niftkQtSignalCollector.cxx:71