Wed, 08 Jun 2022 20:41:21 +0300
Refactor colors.cpp/.h
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 | }; |