20#ifndef LIBREPCB_EDITOR_KEYBOARDSHORTCUTSMODEL_H
21#define LIBREPCB_EDITOR_KEYBOARDSHORTCUTSMODEL_H
35class EditorCommandCategory;
58 const QMap<QString, QList<QKeySequence>>&
getOverrides() const noexcept {
62 const QMap<QString, QList<QKeySequence>>& overrides)
noexcept;
66 const QModelIndex&
parent = QModelIndex()) const noexcept override;
68 const QModelIndex&
parent = QModelIndex()) const noexcept override;
71 const QModelIndex&
parent = QModelIndex()) const noexcept override;
72 QModelIndex
parent(const QModelIndex&
index) const noexcept override;
73 Qt::ItemFlags
flags(const QModelIndex&
index) const noexcept override;
75 int role = Qt::DisplayRole) const noexcept override;
76 bool setData(const QModelIndex&
index, const QVariant& value,
77 int role = Qt::EditRole) noexcept override;
85 const QModelIndex&
index) const noexcept;
86 static QString
format(const QList<QKeySequence>& sequences,
87 bool showNone) noexcept;
Category for librepcb::editor::EditorCommand.
Definition: editorcommandcategory.h:42
Command for editors, e.g. to be added to a QMenu.
Definition: editorcommand.h:42
A QAbstractItemModel to represent keyboard shortcut workspace settings.
Definition: keyboardshortcutsmodel.h:44
static QString format(const QList< QKeySequence > &sequences, bool showNone) noexcept
Definition: keyboardshortcutsmodel.cpp:249
Qt::ItemFlags flags(const QModelIndex &index) const noexcept override
Definition: keyboardshortcutsmodel.cpp:117
KeyboardShortcutsModel()=delete
QMap< QString, QList< QKeySequence > > mOverrides
Definition: keyboardshortcutsmodel.h:91
QModelIndex parent(const QModelIndex &index) const noexcept override
Definition: keyboardshortcutsmodel.cpp:105
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) noexcept override
Definition: keyboardshortcutsmodel.cpp:207
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const noexcept override
Definition: keyboardshortcutsmodel.cpp:94
Category * categoryFromIndex(const QModelIndex &index) const noexcept
Definition: keyboardshortcutsmodel.cpp:228
int columnCount(const QModelIndex &parent=QModelIndex()) const noexcept override
Definition: keyboardshortcutsmodel.cpp:78
const EditorCommand * commandFromIndex(const QModelIndex &index) const noexcept
Definition: keyboardshortcutsmodel.cpp:238
const QMap< QString, QList< QKeySequence > > & getOverrides() const noexcept
Definition: keyboardshortcutsmodel.h:58
int rowCount(const QModelIndex &parent=QModelIndex()) const noexcept override
Definition: keyboardshortcutsmodel.cpp:84
QList< Category * > mCategories
Definition: keyboardshortcutsmodel.h:90
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const noexcept override
Definition: keyboardshortcutsmodel.cpp:126
void setOverrides(const QMap< QString, QList< QKeySequence > > &overrides) noexcept
Definition: keyboardshortcutsmodel.cpp:67
KeyboardShortcutsModel(const KeyboardShortcutsModel &other)=delete
Definition: occmodel.cpp:77
Definition: keyboardshortcutsmodel.h:45
const EditorCommandCategory * category
Definition: keyboardshortcutsmodel.h:46
QList< const EditorCommand * > commands
Definition: keyboardshortcutsmodel.h:47