]> Shamusworld >> Repos - architektonas/blob - src/base/rs_dialogfactory.h
733f7cca778bcefc8823caed002494197e1172d7
[architektonas] / src / base / rs_dialogfactory.h
1 #ifndef RS_DIALOGFACTORY_H
2 #define RS_DIALOGFACTORY_H
3
4 #include "rs_dialogfactoryadapter.h"
5
6 #define RS_DIALOGFACTORY RS_DialogFactory::instance()->getFactoryObject()
7
8 class RS_DialogFactoryInterface;
9
10 /**
11  * Interface for objects that can create and show dialogs.
12  */
13 class RS_DialogFactory
14 {
15         private:
16                 RS_DialogFactory();
17
18         public:
19                 virtual ~RS_DialogFactory() {}
20
21                 static RS_DialogFactory * instance();
22
23                 void setFactoryObject(RS_DialogFactoryInterface * fo);
24                 RS_DialogFactoryInterface * getFactoryObject();
25
26                 void commandMessage(const QString & m);
27
28         private:
29                 RS_DialogFactoryInterface * factoryObject;
30                 RS_DialogFactoryAdapter factoryAdapter;
31                 static RS_DialogFactory * uniqueInstance;
32 };
33
34 #endif