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

0001 /*
0002     mouse.h
0003 
0004     SPDX-FileCopyrightText: 1998 Matthias Ettrich <ettrich@kde.org>
0005 
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #pragma once
0011 
0012 class KConfig;
0013 
0014 #include <KCModule>
0015 #include <KLocalizedString>
0016 
0017 #include "ui_actions.h"
0018 #include "ui_mouse.h"
0019 
0020 class KWinOptionsSettings;
0021 
0022 class KWinMouseConfigForm : public QWidget, public Ui::KWinMouseConfigForm
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     explicit KWinMouseConfigForm(QWidget *parent);
0028 };
0029 
0030 class KWinActionsConfigForm : public QWidget, public Ui::KWinActionsConfigForm
0031 {
0032     Q_OBJECT
0033 
0034 public:
0035     explicit KWinActionsConfigForm(QWidget *parent);
0036 };
0037 
0038 class KTitleBarActionsConfig : public KCModule
0039 {
0040     Q_OBJECT
0041 
0042 public:
0043     KTitleBarActionsConfig(bool _standAlone, KWinOptionsSettings *settings, QWidget *parent);
0044 
0045     void save() override;
0046 
0047 protected:
0048     void initialize(KWinOptionsSettings *settings);
0049 
0050 private:
0051     bool standAlone;
0052 
0053     KWinMouseConfigForm *m_ui;
0054     KWinOptionsSettings *m_settings;
0055 };
0056 
0057 class KWindowActionsConfig : public KCModule
0058 {
0059     Q_OBJECT
0060 
0061 public:
0062     KWindowActionsConfig(bool _standAlone, KWinOptionsSettings *settings, QWidget *parent);
0063 
0064     void save() override;
0065 
0066     bool isDefaults() const;
0067     bool isSaveNeeded() const;
0068 
0069 protected:
0070     void initialize(KWinOptionsSettings *settings);
0071 
0072 private:
0073     bool standAlone;
0074 
0075     KWinActionsConfigForm *m_ui;
0076     KWinOptionsSettings *m_settings;
0077 };