ShortcutTableModel Class Reference

#include <MemoryX/gui-plugins/SceneEditor/gui/ShortcutTableModel.h>

+ Inheritance diagram for ShortcutTableModel:

Public Member Functions

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).
 
QVariant data (const QModelIndex &index, int role) const override
 Returns the value of a given Position in the model.
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 Returns the header of a given Section by orientation.
 
int rowCount (const QModelIndex &parent) const override
 Returns the number of given rows.
 
void setShortcutHashTable (QHash< QString, QKeySequence > Shortcuts)
 Sets a predefined Shortcuts-Hash as new Hash of this ShortcutTableModel.
 
 ShortcutTableModel (QHash< QString, QKeySequence > Shortcuts, QObject *parent=0)
 A constructor.
 
 ShortcutTableModel (QObject *parent=0)
 A constructor.
 

Constructor & Destructor Documentation

◆ ShortcutTableModel() [1/2]

ShortcutTableModel ( QObject * parent = 0)
explicit

A constructor.

Creates a new Instance of ShortcutTableModel with a given parent.

Parameters
parentParent QObject

◆ ShortcutTableModel() [2/2]

ShortcutTableModel ( QHash< QString, QKeySequence > Shortcuts,
QObject * parent = 0 )
explicit

A constructor.

Creates a new Instance of ShortcutTableModel with a predefined Shortcuts-Hash and a given parent.

Parameters
ShortcutsQHash of predefined Shortcuts-Hash
parentParent QObject

Member Function Documentation

◆ actionName()

QVariant actionName ( const QModelIndex & index,
int role ) const

Returns the Name of the Action of the given Row.

Parameters
indexPosition in Model to be returned
roleRole that is used to get data
Returns
Name of the action

◆ columnCount()

int columnCount ( const QModelIndex & parent) const
override

Returns the number of given columns (standard = 2).

Parameters
parentParent QObject
Returns
number of columns

◆ data()

QVariant data ( const QModelIndex & index,
int role ) const
override

Returns the value of a given Position in the model.

Parameters
indexPosition in Model to be returned
roleRole that is used to get data
Returns
Value of given Position

◆ headerData()

QVariant headerData ( int section,
Qt::Orientation orientation,
int role ) const
override

Returns the header of a given Section by orientation.

Parameters
sectionSection in Header to be returned
orientationOrientation to find given section
roleRole that is used to get data
Returns
Headervalue of given Section

◆ rowCount()

int rowCount ( const QModelIndex & parent) const
override

Returns the number of given rows.

Parameters
parentParent QObject
Returns
number of rows

◆ setShortcutHashTable()

void setShortcutHashTable ( QHash< QString, QKeySequence > Shortcuts)

Sets a predefined Shortcuts-Hash as new Hash of this ShortcutTableModel.

Parameters
ShortcutsQHash of predefined Shortcuts-Hash

The documentation for this class was generated from the following files: