32 QAbstractTableModel(parent)
34 registeredShortcuts = Shortcuts;
40 registeredShortcuts = Shortcuts;
41 emit(layoutChanged());
47 return registeredShortcuts.size();
64 if (
index.row() >= registeredShortcuts.size() ||
index.row() < 0)
69 if (role == Qt::DisplayRole)
71 if (
index.column() == 0)
73 return tr(registeredShortcuts.keys().at(
index.row()).toStdString().c_str());
75 else if (
index.column() == 1)
78 registeredShortcuts.values().at(
index.row()).toString().toStdString().c_str());
88 if (role != Qt::DisplayRole)
93 if (orientation == Qt::Horizontal)
101 return tr(
"Key-Sequence");
114 if (!
index.isValid())
119 if (
index.row() >= registeredShortcuts.size() ||
index.row() < 0)
124 if (role == Qt::DisplayRole)
126 return registeredShortcuts.keys().at(
index.row()).toStdString().c_str();