]> Shamusworld >> Repos - architektonas/blob - src/base/rs_python.h
cea41f9dd38e80c7a3d4f1e81bd76a8cd02218e9
[architektonas] / src / base / rs_python.h
1 #ifndef RS_PYTHON_H
2 #define RS_PYTHON_H
3
4 #ifdef RS_OPT_PYTHON
5
6 #include "Python.h"
7
8 #include "drawing.h"
9
10 #define RS_PYTHON RS_Python::instance()
11
12 /**
13  * Python scripting support.
14  *
15  * OBSOLETE
16  *
17  * @author Andrew Mustun
18  */
19 class RS_Python {
20 private:
21     RS_Python();
22
23 public:
24     static RS_Python* instance();
25
26     void setGraphic(Drawing* g) {
27         graphic = g;
28     }
29
30     Drawing* getGraphic() {
31         return graphic;
32     }
33
34     int launch(const QString& script);
35
36 private:
37     static RS_Python* uniqueInstance;
38     Drawing* graphic;
39 };
40
41 #endif
42
43 #endif