blob: 179d478d4c1ae843143eff77cb8b8589a2e6ce9f (
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
51
52
53
54
55
56
57
58
59
60
61
|
/***************************************************************************
lmsensorsalarms.h - description
-------------------
begin : Wed Nov 14 2001
copyright : (C) 2001 by Miguel Novas
email : michaell@teleline.es
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef LMSENSORSALARMS_H
#define LMSENSORSALARMS_H
#include <ntqobject.h>
#include <ntqstring.h>
#include "lmsensors.h"
/**
*@author Miguel Novas
*/
class LMSensorsAlarms : public TQObject {
Q_OBJECT
public:
enum Actions { acNothing, acSound, acCommand };
LMSensorsAlarms(LMSensors *sensors, TQObject *parent=0, const char *name=0);
~LMSensorsAlarms();
static int readAlarm(const char *name);
static TQString readAlarmSound(const char *name);
static void writeAlarm(const char *name, int alarm);
static TQString readAlarmCommand(const char *name);
static void writeAlarmCommand(const char *name, const TQString &cmd);
static void writeAlarmSound(const char *name, const TQString &cmd);
static void runSensorCommand(const char *name,const char *value, const char *cmd);
static void playSound(const char *sound);
public slots:
void setValueChanged(Sensor *);
private:
int sensorCount;
TQString soundPlay;
static void runCommand(const char *str);
void timerEvent( TQTimerEvent * );
};
#endif
|