Scribus
Open source desktop publishing at your fingertips
Observable< OBSERVED > Class Template Reference

#include <observable.h>

Inheritance diagram for Observable< OBSERVED >:
Collaboration diagram for Observable< OBSERVED >:

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_SignalchangedSignal
 
UpdateManagerm_um
 

Detailed Description

template<class OBSERVED>
class Observable< OBSERVED >

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.


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