Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

programsensor.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Hans Karlsson                                   *
00003  *   karlsson.h@home.se                                                      *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 #ifndef PROGRAMSENSOR_H
00011 #define PROGRAMSENSOR_H
00012 #include "sensor.h"
00013 #include <kprocess.h>
00014 #include <kprocio.h>
00015 #include <qstring.h>
00016 #include <qstringlist.h>
00017 #include <qvaluevector.h>
00018 #include <qtextcodec.h>
00019 class ProgramSensor :  public Sensor
00020 {
00021     Q_OBJECT
00022 public:
00023     ProgramSensor(QString programName, int msec=1000, QString encoding="" );
00024     ~ProgramSensor();
00025     void update();
00026 
00027 private:
00028     QTextCodec *codec;
00029     KProcess *ksp;
00030     QString programName;
00031     QString 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

Generated on Mon May 16 13:59:20 2005 for karamba by  doxygen 1.3.9.1