Go to the documentation of this file.
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;
105 QHash<QString, QKeySequence> registeredShortcuts;
int columnCount(const QModelIndex &parent) const override
Returns the number of given columns (standard = 2).
QVariant data(const QModelIndex &index, int role) const override
Returns the value of a given Position in the model.
ScalarT Orientation(const VectorXD< 2, ScalarT > &p1, const VectorXD< 2, ScalarT > &p2, const VectorXD< 2, ScalarT > &c)
ShortcutTableModel(QObject *parent=0)
A constructor.
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Returns the header of a given Section by orientation.
void setShortcutHashTable(QHash< QString, QKeySequence > Shortcuts)
Sets a predefined Shortcuts-Hash as new Hash of this ShortcutTableModel.
int rowCount(const QModelIndex &parent) const override
Returns the number of given rows.
QVariant actionName(const QModelIndex &index, int role) const
Returns the Name of the Action of the given Row.