File indexing completed on 2024-11-10 04:56:49

0001 /*
0002     windows.h
0003 
0004     SPDX-FileCopyrightText: 1997 Patrick Dowler <dowler@morgul.fsh.uvic.ca>
0005     SPDX-FileCopyrightText: 2001 Waldo Bastian <bastian@kde.org>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #pragma once
0011 
0012 #include <KCModule>
0013 #include <QWidget>
0014 
0015 #include "ui_advanced.h"
0016 #include "ui_focus.h"
0017 #include "ui_moving.h"
0018 
0019 class QRadioButton;
0020 class QCheckBox;
0021 class QPushButton;
0022 class QGroupBox;
0023 class QLabel;
0024 class QSlider;
0025 class QGroupBox;
0026 class QSpinBox;
0027 
0028 class KColorButton;
0029 
0030 class KWinOptionsSettings;
0031 class KWinOptionsKDEGlobalsSettings;
0032 
0033 class KWinFocusConfigForm : public QWidget, public Ui::KWinFocusConfigForm
0034 {
0035     Q_OBJECT
0036 
0037 public:
0038     explicit KWinFocusConfigForm(QWidget *parent);
0039 };
0040 
0041 class KWinMovingConfigForm : public QWidget, public Ui::KWinMovingConfigForm
0042 {
0043     Q_OBJECT
0044 
0045 public:
0046     explicit KWinMovingConfigForm(QWidget *parent);
0047 };
0048 
0049 class KWinAdvancedConfigForm : public QWidget, public Ui::KWinAdvancedConfigForm
0050 {
0051     Q_OBJECT
0052 
0053 public:
0054     explicit KWinAdvancedConfigForm(QWidget *parent);
0055 };
0056 
0057 class KFocusConfig : public KCModule
0058 {
0059     Q_OBJECT
0060 public:
0061     KFocusConfig(bool _standAlone, KWinOptionsSettings *settings, QWidget *parent);
0062 
0063     void load() override;
0064     void save() override;
0065     void defaults() override;
0066 
0067 protected:
0068     void initialize(KWinOptionsSettings *settings);
0069 
0070 private Q_SLOTS:
0071     void focusPolicyChanged();
0072     void updateMultiScreen();
0073     void updateDefaultIndicator();
0074 
0075 private:
0076     bool standAlone;
0077 
0078     KWinFocusConfigForm *m_ui;
0079     KWinOptionsSettings *m_settings;
0080 
0081     void updateFocusPolicyExplanatoryText();
0082 };
0083 
0084 class KMovingConfig : public KCModule
0085 {
0086     Q_OBJECT
0087 public:
0088     KMovingConfig(bool _standAlone, KWinOptionsSettings *settings, QWidget *parent);
0089 
0090     void save() override;
0091 
0092 protected:
0093     void initialize(KWinOptionsSettings *settings);
0094 
0095 private:
0096     KWinOptionsSettings *m_settings;
0097     bool standAlone;
0098     KWinMovingConfigForm *m_ui;
0099 };
0100 
0101 class KAdvancedConfig : public KCModule
0102 {
0103     Q_OBJECT
0104 public:
0105     KAdvancedConfig(bool _standAlone, KWinOptionsSettings *settings, KWinOptionsKDEGlobalsSettings *globalSettings, QWidget *parent);
0106 
0107     void save() override;
0108 
0109 protected:
0110     void initialize(KWinOptionsSettings *settings, KWinOptionsKDEGlobalsSettings *globalSettings);
0111 
0112 private:
0113     bool standAlone;
0114     KWinAdvancedConfigForm *m_ui;
0115     KWinOptionsSettings *m_settings;
0116 };