File indexing completed on 2024-09-15 10:32:54
0001 /* 0002 SPDX-FileCopyrightText: 2008 Michael Jansen <kde@michael-jansen.biz> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #ifndef GLOBAL_SETTINGS_WIDGET_H 0007 #define GLOBAL_SETTINGS_WIDGET_H 0008 0009 #include <ui_global_settings_widget.h> 0010 0011 #include "hotkeys_widget_iface.h" 0012 0013 #include <KSharedConfig> 0014 0015 class KHotkeysModel; 0016 0017 /** 0018 * @author Michael Jansen <kde@michael-jansen.biz> 0019 */ 0020 class GlobalSettingsWidget : public HotkeysWidgetIFace 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 /** 0026 * Default constructor 0027 */ 0028 GlobalSettingsWidget(QWidget *parent = nullptr); 0029 0030 /** 0031 * Destructor 0032 */ 0033 ~GlobalSettingsWidget() override; 0034 0035 /** 0036 * Set the model we configure 0037 */ 0038 void setModel(KHotkeysModel *); 0039 0040 private Q_SLOTS: 0041 0042 bool isChanged() const override; 0043 0044 protected: 0045 void doCopyFromObject() override; 0046 void doCopyToObject() override; 0047 0048 private: 0049 KSharedConfigPtr _config; 0050 KHotkeysModel *_model; 0051 Ui::GlobalSettingsWidget ui; 0052 }; 0053 0054 #endif /* #ifndef GLOBAL_SETTINGS_WIDGET_H */