klaptopdaemon
buttons.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
00024
00025 #ifndef __BUTTONSCONFIG_H__
00026 #define __BUTTONSCONFIG_H__
00027
00028 #include <kcmodule.h>
00029
00030
00031 class QWidget;
00032 class QSlider;
00033 class Q3ButtonGroup;
00034 class QRadioButton;
00035 class KConfig;
00036 class QCheckBox;
00037 class KComboBox;
00038
00039 class ButtonsConfig : public KCModule
00040 {
00041 Q_OBJECT
00042 public:
00043 ButtonsConfig( const KComponentData &inst,QWidget *parent=0);
00044 ~ButtonsConfig();
00045 void save( void );
00046 void load();
00047 void defaults();
00048
00049 virtual QString quickHelp() const;
00050
00051 private slots:
00052
00053 void configChanged();
00054
00055
00056 private:
00057
00058 int getPower();
00059 int getLid();
00060 void setPower( int, int );
00061
00062 Q3ButtonGroup *lidBox;
00063 QRadioButton *lidStandby, *lidSuspend, *lidOff, *lidHibernate, *lidShutdown, *lidLogout;
00064 QCheckBox *lidBrightness;
00065 QSlider *lidValBrightness;
00066 QCheckBox *lidThrottle;
00067 KComboBox *lidValThrottle;
00068 QCheckBox *lidPerformance;
00069 KComboBox *lidValPerformance;
00070 Q3ButtonGroup *powerBox;
00071 QRadioButton *powerStandby, *powerSuspend, *powerOff, *powerHibernate, *powerShutdown, *powerLogout;
00072 QCheckBox *powerBrightness;
00073 QSlider *powerValBrightness;
00074 QCheckBox *powerThrottle;
00075 KComboBox *powerValThrottle;
00076 QCheckBox *powerPerformance;
00077 KComboBox *powerValPerformance;
00078 int power_bright_val, lid_bright_val;
00079 bool lid_bright_enabled, power_bright_enabled;
00080 bool lid_throttle_enabled, power_throttle_enabled;
00081 QString lid_throttle_val, power_throttle_val;
00082 bool lid_performance_enabled, power_performance_enabled;
00083 QString lid_performance_val, power_performance_val;
00084
00085 KConfig *config;
00086 int power, lid, apm;
00087 };
00088
00089 #endif
00090