superkaramba
programsensor.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef PROGRAMSENSOR_H
00011 #define PROGRAMSENSOR_H
00012 #include "sensor.h"
00013 #include <kprocess.h>
00014 #include <kprocio.h>
00015 #include <tqstring.h>
00016 #include <tqstringlist.h>
00017 #include <tqvaluevector.h>
00018 #include <tqtextcodec.h>
00019 class ProgramSensor : public Sensor
00020 {
00021 Q_OBJECT
00022 public:
00023 ProgramSensor(const TQString &programName, int msec=1000, TQString encoding="" );
00024 ~ProgramSensor();
00025 void update();
00026
00027 private:
00028 TQTextCodec *codec;
00029 KShellProcess ksp;
00030 TQString programName;
00031 TQString sensorResult;
00032
00033 public slots:
00034 void receivedStdout(KProcess *proc, char *buffer, int buflen);
00035 void processExited(KProcess *proc);
00036 };
00037
00038 #endif // PROGRAMSENSOR_H