summaryrefslogtreecommitdiffstats
path: root/kgamma/kcmkgamma/kgamma.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
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /kgamma/kcmkgamma/kgamma.h
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.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/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kgamma/kcmkgamma/kgamma.h')
-rw-r--r--kgamma/kcmkgamma/kgamma.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/kgamma/kcmkgamma/kgamma.h b/kgamma/kcmkgamma/kgamma.h
new file mode 100644
index 00000000..b347e2a1
--- /dev/null
+++ b/kgamma/kcmkgamma/kgamma.h
@@ -0,0 +1,78 @@
+/***************************************************************************
+ kgamma.h - description
+ -------------------
+ begin : Sun Dec 16 13:52:24 CET 2001
+ copyright : (C) 2001 by Michael v.Ostheim
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+#ifndef KGAMMA_H_
+#define KGAMMA_H_
+
+#include <kcmodule.h>
+
+class GammaCtrl;
+class QCheckBox;
+class QComboBox;
+class XVidExtWrap;
+class KProcess;
+
+class KGamma: public KCModule
+{
+ Q_OBJECT
+ public:
+ KGamma(QWidget *parent, const char *name, const QStringList&);
+ virtual ~KGamma();
+
+ void load();
+ void load(bool useDefaults);
+ void save();
+ void defaults();
+ int buttons();
+ QString quickHelp() const;
+
+ protected: // Protected methods
+ /** The user interface */
+ void setupUI();
+ /** Decides if to load settings from user or system config */
+ bool loadSettings();
+ /** Load settings from kgammarc */
+ bool loadUserSettings();
+ /** Load settings from XF86Config */
+ bool loadSystemSettings();
+ /** Validate the loaded gamma values */
+ bool validateGammaValues();
+
+ private slots:
+ /** Called if the user changesd something */
+ void Changed() { emit changed(true); }
+ /** Called if the user marked or unmarked the XF86Config checkbox */
+ void changeConfig();
+ /** Called if the user marked or unmarked the sync screen checkbox */
+ void SyncScreens();
+ /** Called if the user chooses a new screen */
+ void changeScreen(int sn);
+
+ private:
+ bool saved, GammaCorrection;
+ int ScreenCount, currentScreen;
+ QStringList rgamma, ggamma, bgamma;
+ QValueList<int> assign;
+ QValueList<float> rbak, gbak, bbak;
+ GammaCtrl *gctrl, *rgctrl, *ggctrl, *bgctrl;
+ QCheckBox *xf86cfgbox, *syncbox;
+ QComboBox *screenselect;
+ KProcess *rootProcess;
+ XVidExtWrap *xv;
+};
+
+#endif
+