Warning, file /plasma/khotkeys/kcm_hotkeys/hotkeys_tree_view.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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_TREE_VIEW_H
0007 #define HOTKEYS_TREE_VIEW_H
0008 
0009 #include "libkhotkeysfwd.h"
0010 
0011 #include "actions/actions.h"
0012 #include "triggers/triggers.h"
0013 
0014 #include <QMenu>
0015 #include <QTreeView>
0016 
0017 class KHotkeysModel;
0018 
0019 /**
0020  * @author Michael Jansen <kde@michael-jansen.biz>
0021  */
0022 class HotkeysTreeView : public QTreeView
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     /**
0028      * Default constructor
0029      */
0030     HotkeysTreeView(QWidget *parent = nullptr);
0031 
0032     /**
0033      * Destructor
0034      */
0035     ~HotkeysTreeView() override;
0036 
0037     /**
0038      * The user requested a context menu
0039      */
0040     void contextMenuEvent(QContextMenuEvent *event) override;
0041 
0042     /**
0043      * Set a new model
0044      */
0045     void setModel(QAbstractItemModel *model) override;
0046     KHotkeysModel *model();
0047 
0048 protected:
0049     void mouseReleaseEvent(QMouseEvent *me) override;
0050 
0051 private Q_SLOTS:
0052 
0053     void modelReset();
0054 };
0055 
0056 #endif /* #ifndef HOTKEYS_TREE_VIEW_H */