1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
/*
* This file is part of the KDE project, module kcontrol.
* Copyright (C) 1999 Geert Jansen <[email protected]>
*
* You can Freely distribute this program under the GNU General Public
* License. See the file "COPYING" for the exact licensing terms.
*
* Based on kcontrol1 energy.h, Copyright (c) 1999 Tom Vijlbrief.
*/
#ifndef __Energy_h_Included__
#define __Energy_h_Included__
#include <tqobject.h>
#include <tdecmodule.h>
class TQCheckBox;
class KIntNumInput;
class TDEConfig;
extern "C" void init_energy();
/**
* The Desktop/Energy tab in kcontrol.
*/
class KEnergy: public TDECModule
{
Q_OBJECT
public:
KEnergy(TQWidget *parent, const char *name);
~KEnergy();
virtual void load();
virtual void load( bool useDefaults );
virtual void save();
virtual void defaults();
private slots:
void slotChangeEnable(bool);
void slotChangeStandby(int);
void slotChangeSuspend(int);
void slotChangeOff(int);
void slotLaunchKPowersave();
void slotLaunchTDEPowersave();
void openURL(const TQString &);
private:
void readSettings();
void writeSettings();
void showSettings();
static void applySettings(bool, int, int, int);
friend void init_energy();
bool m_bChanged, m_bDPMS, m_bKPowersave, m_bTDEPowersave, m_bEnabled, m_bMaintainSanity;
int m_Standby, m_Suspend, m_Off;
int m_StandbyDesired, m_SuspendDesired, m_OffDesired;
TQCheckBox *m_pCBEnable;
KIntNumInput *m_pStandbySlider;
KIntNumInput *m_pSuspendSlider;
KIntNumInput *m_pOffSlider;
TDEConfig *m_pConfig;
};
#endif // __Energy_h_Included__
|