diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-12-31 21:24:29 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-02 15:38:18 +0100 |
| commit | 25a2123e5ffe66715d0a1ec09297ee91a9fcbe1c (patch) | |
| tree | b13f943d76833b1c331d63397cf6ed553eeb27c0 /src/pluginlistview.h | |
| parent | f2d8469ed6cd0fafc22097cdba2ee8f325f00513 (diff) | |
Move keyboard event to PluginListView.
Diffstat (limited to 'src/pluginlistview.h')
| -rw-r--r-- | src/pluginlistview.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pluginlistview.h b/src/pluginlistview.h index 95450ffd..92f03588 100644 --- a/src/pluginlistview.h +++ b/src/pluginlistview.h @@ -43,6 +43,21 @@ protected slots: void onFilterChanged(const QString& filter); +protected: + + // method to react to various key events + // + bool moveSelection(int key); + bool toggleSelectionState(); + + // get/set the selected items on the view, this method return/take indices + // from the mod list model, not the view, so it's safe to restore + // + std::pair<QModelIndex, QModelIndexList> selected() const; + void setSelected(const QModelIndex& current, const QModelIndexList& selected); + + bool event(QEvent* event) override; + private: struct PluginListViewUi |
