Tue, 01 Mar 2022 17:00:19 +0200
work on edit history
16 | 1 | #pragma once |
2 | #include <QWidget> | |
3 | #include <QAbstractTableModel> | |
4 | ||
5 | class KeyboardShortcutsEditor : public QAbstractTableModel | |
6 | { | |
7 | Q_OBJECT | |
8 | public: | |
9 | enum Column | |
10 | { | |
11 | TitleColumn, | |
12 | ShortcutColumn, | |
13 | }; | |
14 | explicit KeyboardShortcutsEditor(QObject* subject, QObject* parent = nullptr); | |
15 | int rowCount(const QModelIndex&) const override; | |
16 | int columnCount(const QModelIndex&) const override; | |
17 | QVariant data(const QModelIndex& index, int role) const override; | |
18 | QVariant headerData(int section, Qt::Orientation orientation, int role) const override; | |
19 | private: | |
20 | const QVector<QAction*> actions; | |
21 | }; |