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

sensor.cpp

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 #include "sensor.h"
00011 Sensor::Sensor(int iMsec)
00012 {
00013     objList = new QObjectList();
00014     objList->setAutoDelete( true );
00015     msec = iMsec;
00016 }
00017 
00018 void Sensor::start()
00019 {
00020     if (!timer.isActive())
00021     {
00022         connect (&timer,SIGNAL(timeout()),this,SLOT(update()));
00023         timer.start( (msec == 0)?1000:msec);
00024     }
00025 }
00026 
00027 Sensor::~Sensor()
00028 {
00029 objList->clear();
00030 delete objList;
00031 }
00032 
00033 void Sensor::addMeter( SensorParams *sp )
00034 {
00035 objList->append(sp);
00036 
00037 }
00038 
00039 void Sensor::setMaxValue( SensorParams* )
00040 {
00041 }

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