add more spacing
[personal-kdebase.git] / workspace / kcontrol / energy / energy.h
blobe6144b06f887b9666154312a02eb5391b7da0a40
1 /* vi: ts=8 sts=4 sw=4
5 * This file is part of the KDE project, module kcontrol.
6 * Copyright (C) 1999 Geert Jansen <g.t.jansen@stud.tue.nl>
8 * You can Freely distribute this program under the GNU General Public
9 * License. See the file "COPYING" for the exact licensing terms.
11 * Based on kcontrol1 energy.h, Copyright (c) 1999 Tom Vijlbrief.
14 #ifndef __Energy_h_Included__
15 #define __Energy_h_Included__
17 #include <QObject>
18 #include <kcmodule.h>
20 class QCheckBox;
21 class KIntNumInput;
22 class KConfig;
24 extern "C" void kcminit_energy();
26 /**
27 * The Desktop/Energy tab in kcontrol.
29 class KEnergy: public KCModule
31 Q_OBJECT
33 public:
34 KEnergy(QWidget *parent, const QVariantList &args);
35 ~KEnergy();
37 virtual void load();
38 virtual void save();
39 virtual void defaults();
41 private Q_SLOTS:
42 void slotChangeEnable(bool);
43 void slotChangeStandby(int);
44 void slotChangeSuspend(int);
45 void slotChangeOff(int);
46 void openUrl(const QString &);
48 private:
49 void readSettings();
50 void writeSettings();
51 void showSettings();
53 static void applySettings(bool, int, int, int);
54 friend void kcminit_energy();
56 bool m_bChanged, m_bDPMS, m_bEnabled, m_bMaintainSanity;
57 int m_Standby, m_Suspend, m_Off;
58 int m_StandbyDesired, m_SuspendDesired, m_OffDesired;
60 QCheckBox *m_pCBEnable;
61 KIntNumInput *m_pStandbySlider;
62 KIntNumInput *m_pSuspendSlider;
63 KIntNumInput *m_pOffSlider;
64 KConfig *m_pConfig;
67 #endif // __Energy_h_Included__