File indexing completed on 2024-09-15 10:32:55
0001 /* 0002 SPDX-FileCopyrightText: 2008 Michael Jansen <kde@michael-jansen.biz> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #ifndef HOTKEYS_WIDGET_IFACE 0007 #define HOTKEYS_WIDGET_IFACE 0008 0009 #include "libkhotkeysfwd.h" 0010 0011 #include <QSignalMapper> 0012 #include <QWidget> 0013 0014 /** 0015 * @author Michael Jansen <kde@michael-jansen.biz> 0016 */ 0017 class HotkeysWidgetIFace : public QWidget 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 /** 0023 * Default constructor 0024 */ 0025 HotkeysWidgetIFace(QWidget *parent = nullptr); 0026 0027 /** 0028 * Destructor 0029 */ 0030 ~HotkeysWidgetIFace() override; 0031 0032 virtual bool isChanged() const = 0; 0033 void copyFromObject(); 0034 void copyToObject(); 0035 0036 virtual void apply(); 0037 0038 Q_SIGNALS: 0039 0040 virtual void changed(bool) const; 0041 0042 public Q_SLOTS: 0043 0044 virtual void slotChanged(const QString &what = "Nothing"); 0045 0046 protected: 0047 QSignalMapper *_changedSignals; 0048 0049 virtual void doCopyFromObject() = 0; 0050 virtual void doCopyToObject() = 0; 0051 }; 0052 0053 #endif /* #ifndef HOTKEYS_WIDGET_BASE_H */