Rev 1524 | Rev 1752 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1718 | craig | 1 | #ifndef SCRIPTERCORE_H |
2 | #define SCRIPTERCORE_H |
||
1467 | cbradney | 3 | |
4 | #include "cmdvar.h" |
||
5 | |||
1718 | craig | 6 | #include "qmap.h" |
7 | #include "qguardedptr.h" |
||
1467 | cbradney | 8 | |
1718 | craig | 9 | #include "menumanager.h" |
10 | #include "pconsole.h" |
||
11 | #include "conswin.h" |
||
12 | |||
13 | class ScrAction; |
||
14 | class MenuManager; |
||
15 | |||
1467 | cbradney | 16 | class ScripterCore : public QObject |
17 | { |
||
1718 | craig | 18 | Q_OBJECT |
1467 | cbradney | 19 | |
20 | public: |
||
1718 | craig | 21 | ScripterCore(QWidget* parent); |
22 | ~ScripterCore(); |
||
23 | |||
1467 | cbradney | 24 | public slots: |
1718 | craig | 25 | void slotTest(); |
26 | void StdScript(QString filebasename); |
||
27 | void RecentScript(QString fn); |
||
28 | void slotRunScriptFile(QString fileName); |
||
29 | QString slotRunScript(QString Script); |
||
30 | void slotInteractiveScript(bool); |
||
31 | void slotExecute(); |
||
32 | void aboutScript(); |
||
33 | |||
34 | protected: |
||
35 | // Private helper functions |
||
36 | void FinishScriptRun(); |
||
37 | void ReadPlugPrefs(); |
||
38 | void SavePlugPrefs(); |
||
39 | void rebuildRecentScriptsMenu(); |
||
40 | void buildScribusScriptsMenu(); |
||
41 | void buildRecentScriptsMenu(); |
||
42 | void rebuildScribusScriptsMenu(); |
||
43 | |||
44 | // Internal members |
||
45 | PConsole pcon; |
||
46 | int cons; |
||
47 | int about; |
||
48 | QStringList SavedRecentScripts; |
||
49 | QStringList RecentScripts; |
||
50 | MenuManager *menuMgr; |
||
51 | QMap<QString, QGuardedPtr<ScrAction> > scrScripterActions; |
||
52 | QMap<QString, QGuardedPtr<ScrAction> > scrRecentScriptActions; |
||
1467 | cbradney | 53 | }; |
54 | |||
55 | #endif |