00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __shellscript_h__
00020 #define __shellscript_h__
00021
00022 #include <scriptinterface.h>
00023 #include <tqvariant.h>
00024 #include <tqobject.h>
00025 #include <kprocess.h>
00026
00027 class ShellScript : public KScriptInterface
00028 {
00029 Q_OBJECT
00030 public:
00031 ShellScript(KScriptClientInterface *parent, const char *name, const TQStringList &args);
00032 virtual ~ShellScript();
00033 TQString script() const;
00034 void setScript( const TQString &scriptFile );
00035 void setScript( const TQString &scriptLibFile, const TQString &method );
00036 void run(TQObject *context = 0, const TQVariant &arg = 0);
00037 void kill();
00038 private slots:
00039 void Exit(TDEProcess *proc);
00040 void stdErr(TDEProcess *proc, char *buffer, int buflen);
00041 void stdOut(TDEProcess *proc, char *buffer, int buflen);
00042 private:
00043 TDEProcess *m_script;
00044 KScriptClientInterface *ScriptClientInterface;
00045 TQString m_scriptName;
00046 };
00047
00048 #endif