File indexing completed on 2024-04-28 16:44:47

0001 /*
0002    SPDX-FileCopyrightText: 2008 Michael Jansen <kde@michael-jansen.biz>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #ifndef ACTION_WIDGET_BASE_H
0007 #define ACTION_WIDGET_BASE_H
0008 
0009 #include "hotkeys_widget_iface.h"
0010 
0011 #include "actions/actions.h"
0012 #include "libkhotkeysfwd.h"
0013 
0014 /**
0015  * @author Michael Jansen <kde@michael-jansen.biz>
0016  */
0017 class ActionWidgetBase : public HotkeysWidgetIFace
0018 {
0019     Q_OBJECT
0020 
0021 public:
0022     /**
0023      * Destructor
0024      */
0025     ~ActionWidgetBase() override;
0026 
0027     virtual KHotKeys::Action *action()
0028     {
0029         return _action;
0030     }
0031     virtual const KHotKeys::Action *action() const
0032     {
0033         return _action;
0034     }
0035 
0036 protected:
0037     ActionWidgetBase(KHotKeys::Action *action, QWidget *parent = nullptr);
0038 
0039     KHotKeys::Action *_action;
0040 };
0041 
0042 #endif /* #ifndef ACTION_WIDGET_BASE_H */