00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _MultiMeter_h_
00025 #define _MultiMeter_h_
00026
00027 #include <SensorDisplay.h>
00028
00029 class TQGroupBox;
00030 class TQLCDNumber;
00031 class TQLabel;
00032 class MultiMeterSettings;
00033
00034 class MultiMeter : public KSGRD::SensorDisplay
00035 {
00036 Q_OBJECT
00037
00038 public:
00039 MultiMeter(TQWidget* parent = 0, const char* name = 0,
00040 const TQString& = TQString::null, double min = 0, double max = 0, bool nf = false, bool isApplet = false);
00041 virtual ~MultiMeter()
00042 {
00043 }
00044
00045 bool addSensor(const TQString& hostName, const TQString& sensorName,
00046 const TQString& sensorType, const TQString& sensorDescr);
00047 void answerReceived(int id, const TQString& answer);
00048 void resizeEvent(TQResizeEvent*);
00049
00050 bool restoreSettings(TQDomElement& element);
00051 bool saveSettings(TQDomDocument& doc, TQDomElement& element, bool save = true);
00052
00053 virtual bool hasSettingsDialog() const
00054 {
00055 return (true);
00056 }
00057
00058 void configureSettings();
00059
00060 public slots:
00061 void applySettings();
00062 void applyStyle();
00063
00064 private:
00065 void setDigitColor(const TQColor& col);
00066 void setBackgroundColor(const TQColor& col);
00067
00068 TQLCDNumber* lcd;
00069 TQColor normalDigitColor;
00070 TQColor alarmDigitColor;
00071
00072 MultiMeterSettings* mms;
00073 bool lowerLimitActive;
00074 double lowerLimit;
00075 bool upperLimitActive;
00076 double upperLimit;
00077 };
00078
00079 #endif