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 ACTIONGROUPWIDGET_H 0007 #define ACTIONGROUPWIDGET_H 0008 0009 #include "hotkeys_widget_base.h" 0010 0011 class ConditionsWidget; 0012 0013 /** 0014 * @author Michael Jansen <kde@michael-jansen.biz> 0015 */ 0016 class ActionGroupWidget : public HotkeysWidgetBase 0017 { 0018 Q_OBJECT 0019 0020 typedef HotkeysWidgetBase Base; 0021 0022 public: 0023 /** 0024 * Default constructor 0025 */ 0026 ActionGroupWidget(QWidget *parent = nullptr); 0027 0028 /** 0029 * Destructor 0030 */ 0031 ~ActionGroupWidget() override; 0032 0033 /** 0034 * The associated action. 0035 */ 0036 KHotKeys::ActionDataBase *data() 0037 { 0038 return static_cast<KHotKeys::ActionDataBase *>(_data); 0039 } 0040 0041 const KHotKeys::ActionDataBase *data() const 0042 { 0043 return static_cast<const KHotKeys::ActionDataBase *>(_data); 0044 } 0045 0046 //! Are there uncommitted changes? 0047 bool isChanged() const override; 0048 0049 void setActionData(KHotKeys::ActionDataGroup *group); 0050 0051 private: 0052 void doCopyFromObject() override; 0053 void doCopyToObject() override; 0054 0055 //! Widget to change the conditions 0056 ConditionsWidget *_conditions; 0057 }; 0058 0059 #endif /* #ifndef ACTIONGROUPWIDGET_HPP */