sensor.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef SENSOR_H
00011 #define SENSOR_H
00012 #include <qstring.h>
00013 #include <qobject.h>
00014 #include <qobjectlist.h>
00015 #include <qstringlist.h>
00016 #include <qmap.h>
00017 #include <qtimer.h>
00018
00019 #include "sensorparams.h"
00020
00021 class Sensor : public QObject
00022 {
00023 Q_OBJECT
00024
00025 public:
00026 Sensor( int msec = 1000 );
00027 void start();
00028 virtual ~Sensor();
00029 void addMeter( SensorParams *s );
00030 SensorParams* hasMeter( Meter *meter );
00031 void deleteMeter( Meter *meter );
00032 int isEmpty() { return objList->isEmpty(); };
00033 virtual void setMaxValue( SensorParams *s );
00034
00035 private:
00036 int msec;
00037 QTimer timer;
00038
00039 protected:
00040 QObjectList *objList;
00041
00042 public slots:
00043 virtual void update()=0;
00044
00045 };
00046
00047 #endif // SENSOR_H
|