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

Detailed Description

Definition at line 32 of file ShortcutTableModel.h.

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

Definition at line 26 of file ShortcutTableModel.cpp.

◆ 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

Definition at line 31 of file ShortcutTableModel.cpp.

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

Definition at line 105 of file ShortcutTableModel.cpp.

◆ columnCount()

int columnCount ( const QModelIndex &  parent) const
override

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

Parameters
parentParent QObject
Returns
number of columns

Definition at line 48 of file ShortcutTableModel.cpp.

◆ 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

Definition at line 53 of file ShortcutTableModel.cpp.

◆ 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

Definition at line 80 of file ShortcutTableModel.cpp.

◆ rowCount()

int rowCount ( const QModelIndex &  parent) const
override

Returns the number of given rows.

Parameters
parentParent QObject
Returns
number of rows

Definition at line 43 of file ShortcutTableModel.cpp.

◆ setShortcutHashTable()

void setShortcutHashTable ( QHash< QString, QKeySequence >  Shortcuts)

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

Parameters
ShortcutsQHash of predefined Shortcuts-Hash

Definition at line 37 of file ShortcutTableModel.cpp.


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