26#include <QAbstractTableModel>
28#include <QKeySequence>
51 explicit ShortcutTableModel(QHash<QString, QKeySequence> Shortcuts, QObject* parent = 0);
66 int rowCount(
const QModelIndex& parent)
const override;
74 int columnCount(
const QModelIndex& parent)
const override;
83 QVariant
data(
const QModelIndex&
index,
int role)
const override;
93 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
105 QHash<QString, QKeySequence> registeredShortcuts;
int rowCount(const QModelIndex &parent) const override
Returns the number of given rows.
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Returns the header of a given Section by orientation.
QVariant actionName(const QModelIndex &index, int role) const
Returns the Name of the Action of the given Row.
int columnCount(const QModelIndex &parent) const override
Returns the number of given columns (standard = 2).
ShortcutTableModel(QObject *parent=0)
A constructor.
void setShortcutHashTable(QHash< QString, QKeySequence > Shortcuts)
Sets a predefined Shortcuts-Hash as new Hash of this ShortcutTableModel.