]> Shamusworld >> Repos - architektonas/blob - src/base/rs_scriptlist.h
Changed RS_Graphic to Drawing; this is less confusing as a drawing is
[architektonas] / src / base / rs_scriptlist.h
1 #ifndef RS_SCRIPTLIST_H
2 #define RS_SCRIPTLIST_H
3
4 #include <QtCore>
5 #include "rs_script.h"
6
7 #define RS_SCRIPTLIST RS_ScriptList::instance()
8
9 /**
10  * The global list of scripts. This is implemented as a singleton.
11  * Use RS_ScriptList::instance() to get a pointer to the object.
12  *
13  * OBSOLETE
14  *
15  * @author Andrew Mustun
16  */
17 class RS_ScriptList
18 {
19         protected:
20                 RS_ScriptList();
21
22         public:
23                 virtual ~RS_ScriptList();
24
25                 static RS_ScriptList * instance();
26                 void init();
27                 void clearScripts();
28                 int countScripts();
29                 virtual void removeScript(RS_Script * script);
30                 RS_Script * requestScript(const QString & name);
31                 RS_Script * firstScript();
32                 RS_Script * nextScript();
33                 static bool test();
34
35         protected:
36                 static RS_ScriptList * uniqueInstance;
37
38         private:
39                 //! all scripts available
40 //              Q3PtrList<RS_Script> scripts;
41                 QList<RS_Script *> scripts;
42                 QListIterator<RS_Script *> scriptIterator;
43 };
44
45 #endif