summaryrefslogtreecommitdiffstats
path: root/superkaramba/src/sensorsensor.h
blob: 83a89ab56ca888ac5e277dbee3f9c763bbb7333f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

#ifndef SENSORSENSOR_H
#define SENSORSENSOR_H

#include <tqstring.h>
#include <textcodec.h>
#include <tqmap.h>
#include <tqstringlist.h>
#include <tqregexp.h>
#include <kprocess.h>
#include <kprocio.h>


#include "sensor.h"

/**
 *
 * Hans Karlsson
 **/
class SensorSensor : public Sensor
{
    Q_OBJECT
  TQ_OBJECT
public:
    SensorSensor(int interval, char tempUnit);

    ~SensorSensor();

    void update();


private:
    KShellProcess ksp;
    TQString extraParams;

    TQMap<TQString,TQString> sensorMap;
#ifdef __FreeBSD__
    TQMap<TQString,TQString> sensorMapBSD;
#endif
    TQString sensorResult;

private slots:
    void receivedStdout(KProcess *, char *buffer, int);
    void processExited(KProcess *);



};

#endif