summaryrefslogtreecommitdiffstats
path: root/kcontrol/energy/energy.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit4aed2c8219774f5d797760606b8489a92ddc5163 (patch)
tree3f8c130f7d269626bf6a9447407ef6c35954426a /kcontrol/energy/energy.h
downloadtdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz
tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/energy/energy.h')
-rw-r--r--kcontrol/energy/energy.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/kcontrol/energy/energy.h b/kcontrol/energy/energy.h
new file mode 100644
index 000000000..d41b89e26
--- /dev/null
+++ b/kcontrol/energy/energy.h
@@ -0,0 +1,68 @@
+/* vi: ts=8 sts=4 sw=4
+ *
+ *
+ *
+ * This file is part of the KDE project, module kcontrol.
+ * Copyright (C) 1999 Geert Jansen <g.t.jansen@stud.tue.nl>
+ *
+ * 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 <qobject.h>
+#include <kcmodule.h>
+
+class QCheckBox;
+class KIntNumInput;
+class KConfig;
+
+extern "C" void init_energy();
+
+/**
+ * The Desktop/Energy tab in kcontrol.
+ */
+class KEnergy: public KCModule
+{
+ Q_OBJECT
+
+public:
+ KEnergy(QWidget *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 openURL(const QString &);
+
+private:
+ void readSettings();
+ void writeSettings();
+ void showSettings();
+
+ static void applySettings(bool, int, int, int);
+ friend void init_energy();
+
+ bool m_bChanged, m_bDPMS, m_bEnabled, m_bMaintainSanity;
+ int m_Standby, m_Suspend, m_Off;
+ int m_StandbyDesired, m_SuspendDesired, m_OffDesired;
+
+ QCheckBox *m_pCBEnable;
+ KIntNumInput *m_pStandbySlider;
+ KIntNumInput *m_pSuspendSlider;
+ KIntNumInput *m_pOffSlider;
+ KConfig *m_pConfig;
+};
+
+#endif // __Energy_h_Included__