kmilo
asus.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef ASUS_H
00024 #define ASUS_H
00025
00026 #include <kapplication.h>
00027
00028 #include "monitor.h"
00029
00030 namespace KMilo {
00031
00032 typedef struct
00033 {
00034 unsigned int brightness;
00035 unsigned int lcd;
00036 unsigned int display;
00037 } asus_state_struct;
00038
00042 class AsusMonitor: public KMilo::Monitor {
00043 public:
00044 AsusMonitor(QObject *parent, const QVariantList&);
00045 virtual ~AsusMonitor();
00046
00051 virtual bool init();
00052
00057 virtual DisplayType poll();
00058
00064 virtual int progress() const;
00065
00066 private:
00067
00068 int m_progress;
00069
00070 asus_state_struct last_asus_state;
00071 asus_state_struct asus_state;
00072
00073 bool readProc(asus_state_struct* );
00074 int readProcEntry(const QString &);
00075
00076 void clearStruct(asus_state_struct& asus_state);
00077
00078 #ifdef Q_OS_FREEBSD
00079 int brightness_mib[4];
00080 int backlight_mib[4];
00081 int video_mib[4];
00082 #endif
00083 };
00084
00085 }
00086
00087 #endif