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