Scribus
Open source desktop publishing at your fingertips
|
#include <observable.h>
Public Member Functions | |
Observable (UpdateManager *um=NULL) | |
virtual void | update () |
Public Member Functions inherited from MassObservable< OBSERVED * > | |
MassObservable (UpdateManager *um=NULL) | |
void | setUpdateManager (UpdateManager *um) |
virtual void | update (OBSERVED *what) |
virtual void | updateLayout (OBSERVED *what) |
void | connectObserver (Observer< OBSERVED * > *o) |
bool | connectObserver (QObject *o, const char *slot) |
void | disconnectObserver (Observer< OBSERVED * > *o) |
bool | disconnectObserver (QObject *o, const char *slot=0) |
Additional Inherited Members | |
Protected Member Functions inherited from MassObservable< OBSERVED * > | |
virtual void | updateNow (UpdateMemento *what) |
Protected Attributes inherited from MassObservable< OBSERVED * > | |
QSet< Observer< OBSERVED * > * > | m_observers |
Private_Signal * | changedSignal |
UpdateManager * | m_um |
An Observable is basically just the source of a changed() signal. Observers can register via the Qt signal/slot mechanism or via the above interface.
When you call update(), all observers will receive the "changed" signal with a pointer to the Observable (this).
Observable is implemented as a MassObservable which.
The class parameter OBSERVED should be the implementing class.