27 QAbstractTableModel(parent)
32 QAbstractTableModel(parent)
34 registeredShortcuts = Shortcuts;
39 registeredShortcuts = Shortcuts;
40 emit(layoutChanged());
45 return registeredShortcuts.size();
60 if (
index.row() >= registeredShortcuts.size() ||
index.row() < 0)
65 if (role == Qt::DisplayRole)
67 if (
index.column() == 0)
69 return tr(registeredShortcuts.keys().at(
index.row()).toStdString().c_str());
71 else if (
index.column() == 1)
73 return tr(registeredShortcuts.values().at(
index.row()).toString().toStdString().c_str());
82 if (role != Qt::DisplayRole)
87 if (orientation == Qt::Horizontal)
95 return tr(
"Key-Sequence");
107 if (!
index.isValid())
112 if (
index.row() >= registeredShortcuts.size() ||
index.row() < 0)
117 if (role == Qt::DisplayRole)
119 return registeredShortcuts.keys().at(
index.row()).toStdString().c_str();