lmsensors.h

Go to the documentation of this file.
00001 
00023 #ifndef LMSENSORS_H
00024 #define LMSENSORS_H
00025 
00026 #include "sysinfo.h"
00027 
00028 #include <sensors/sensors.h>
00029 
00030 class LMSensors : public AbstractSysInfo
00031 {
00032         Q_OBJECT
00033         Q_PROPERTY(QStringList feature READ feature WRITE setFeature)
00034         Q_PROPERTY(QStringList sensor READ sensor WRITE setSensor)
00035 
00036         public:
00037                 LMSensors();
00038                 bool init();
00039                 void timer();
00040                 inline QGraphicsItem* graphicsItem() { return this; };
00041                 inline bool hasTimer() { return true; }
00042                 inline void setSensor(const QStringList& sensor){ m_sensor = m_sensorNames.indexOf(sensor.at(0)); }
00043                 inline void setFeature(const QStringList& feature){ m_feature = m_featureNames.indexOf(feature.at(0)); }
00044                 inline QStringList feature() { return m_featureNames; }
00045                 inline QStringList sensor() { return m_sensorNames; }
00046 
00047         private:
00048                 bool initSensorChip();
00049 
00050                 const sensors_chip_name* m_selectedChip; 
00051                 QMap<QString, int> m_mapFeatureNr;
00052                 QStringList m_featureNames;
00053                 QStringList m_sensorNames;
00054 
00055                 int m_feature;
00056                 int m_sensor;
00057 };
00058 
00059 #endif

Generated on Thu Apr 5 13:06:31 2007 for LCDBuilder by  doxygen 1.4.7