File indexing completed on 2025-09-28 05:06:14
0001 /* 0002 * SPDX-License-Identifier: GPL-2.0-or-later 0003 * 0004 * SPDX-FileCopyrightText: 2001 Michael v.Ostheim <MvOstheim@web.de> 0005 */ 0006 0007 #ifndef KGAMMA_H_ 0008 #define KGAMMA_H_ 0009 0010 #include <KCModule> 0011 // Added by qt3to4: 0012 #include <QList> 0013 0014 class GammaCtrl; 0015 class QCheckBox; 0016 class QComboBox; 0017 class QProcess; 0018 class XVidExtWrap; 0019 0020 class KGamma : public KCModule 0021 { 0022 Q_OBJECT 0023 public: 0024 KGamma(QObject *parent, const KPluginMetaData &data); 0025 ~KGamma() override; 0026 0027 void load() override; 0028 void save() override; 0029 void defaults() override; 0030 int buttons(); 0031 0032 protected: // Protected methods 0033 /** The user interface */ 0034 void setupUI(); 0035 /** Decides if to load settings from user or system config */ 0036 bool loadSettings(); 0037 /** Load settings from kgammarc */ 0038 bool loadUserSettings(); 0039 /** Load settings from XF86Config */ 0040 bool loadSystemSettings(); 0041 /** Validate the loaded gamma values */ 0042 bool validateGammaValues(); 0043 0044 private Q_SLOTS: 0045 /** Called if the user marked or unmarked the XF86Config checkbox */ 0046 void changeConfig(); 0047 /** Called if the user marked or unmarked the sync screen checkbox */ 0048 void SyncScreens(); 0049 /** Called if the user chooses a new screen */ 0050 void changeScreen(int sn); 0051 0052 private: 0053 bool saved, GammaCorrection; 0054 int ScreenCount, currentScreen; 0055 QStringList rgamma, ggamma, bgamma; 0056 QList<int> assign; 0057 QList<float> rbak, gbak, bbak; 0058 GammaCtrl *gctrl, *rgctrl, *ggctrl, *bgctrl; 0059 QCheckBox *xf86cfgbox, *syncbox; 0060 QComboBox *screenselect; 0061 QProcess *rootProcess; 0062 XVidExtWrap *xv; 0063 }; 0064 0065 #endif