1 | /*************************************************************************** |
2 | commandengine.h - kfr commands feature class |
3 | ------------------- |
4 | begin : fri aug 13 15:29:46 CEST 2004 |
5 | |
6 | copyright : (C) 2004 Emiliano Gulmini |
7 | email : emi_barbarossa@yahoo.it |
8 | ***************************************************************************/ |
9 | |
10 | /*************************************************************************** |
11 | * * |
12 | * This program is free software; you can redistribute it and/or modify * |
13 | * it under the terms of the GNU General Public License as published by * |
14 | * the Free Software Foundation; either version 2 of the License, or * |
15 | * (at your option) any later version. * |
16 | * * |
17 | ***************************************************************************/ |
18 | |
19 | #ifndef COMMANDENGINE_H |
20 | #define COMMANDENGINE_H |
21 | |
22 | // QT |
23 | class QString; |
24 | #include <qobject.h> |
25 | |
26 | //KDE |
27 | class K3Process; |
28 | |
29 | class CommandEngine : public QObject |
30 | { |
31 | Q_OBJECT |
32 | private: |
33 | QString m_processOutput; |
34 | public: |
35 | CommandEngine() {} |
36 | |
37 | public: |
38 | |
39 | /** |
40 | These functions implement the KFR commands |
41 | */ |
42 | QString datetime(const QString& opt, const QString& arg); |
43 | QString user(const QString& opt, const QString& arg); |
44 | QString loadfile(const QString& opt, const QString& arg); |
45 | QString empty(const QString& opt, const QString& arg); |
46 | QString mathexp(const QString& opt, const QString& arg); |
47 | QString random(const QString& opt, const QString& arg); |
48 | QString stringmanip(const QString& opt, const QString& arg); |
49 | QString variableValue(const QString &variable); |
50 | |
51 | private slots: |
52 | void slotGetScriptOutput(K3Process*,char*,int); |
53 | void slotGetScriptError(K3Process*,char*,int); |
54 | void slotProcessExited(K3Process*); |
55 | }; |
56 | |
57 | #endif // COMMANDENGINE_H |
58 | |