00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __Energy_h_Included__
00015 #define __Energy_h_Included__
00016
00017 #include <tqobject.h>
00018 #include <kcmodule.h>
00019
00020 class TQCheckBox;
00021 class KIntNumInput;
00022 class KConfig;
00023
00024 extern "C" void init_energy();
00025
00029 class KEnergy: public KCModule
00030 {
00031 Q_OBJECT
00032
00033 public:
00034 KEnergy(TQWidget *parent, const char *name);
00035 ~KEnergy();
00036
00037 virtual void load();
00038 virtual void load( bool useDefaults );
00039 virtual void save();
00040 virtual void defaults();
00041
00042 private slots:
00043 void slotChangeEnable(bool);
00044 void slotChangeStandby(int);
00045 void slotChangeSuspend(int);
00046 void slotChangeOff(int);
00047 void openURL(const TQString &);
00048
00049 private:
00050 void readSettings();
00051 void writeSettings();
00052 void showSettings();
00053
00054 static void applySettings(bool, int, int, int);
00055 friend void init_energy();
00056
00057 bool m_bChanged, m_bDPMS, m_bEnabled, m_bMaintainSanity;
00058 int m_Standby, m_Suspend, m_Off;
00059 int m_StandbyDesired, m_SuspendDesired, m_OffDesired;
00060
00061 TQCheckBox *m_pCBEnable;
00062 KIntNumInput *m_pStandbySlider;
00063 KIntNumInput *m_pSuspendSlider;
00064 KIntNumInput *m_pOffSlider;
00065 KConfig *m_pConfig;
00066 };
00067
00068 #endif // __Energy_h_Included__