Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
AeonGames::ComponentListModel Class Reference

List model that enumerates the components attached to a node. More...

#include <C:/Code/AeonEngine/tools/worldeditor/models/ComponentListModel.h>

Inheritance diagram for AeonGames::ComponentListModel:
Inheritance graph
Collaboration diagram for AeonGames::ComponentListModel:
Collaboration graph

Public Member Functions

 ComponentListModel (QObject *parent=nullptr)
 Construct the component list model.
virtual ~ComponentListModel ()
 Destructor.
Qt QAbstractListModel overrides
int rowCount (const QModelIndex &index=QModelIndex()) const override
 Return the number of rows under the given parent.
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 Return the data for the given index and role.
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 Return the header data for the given section, orientation, and role.
Public Member Functions inherited from AeonGames::ListModel
 ListModel (QObject *parent=nullptr)
 Construct the list model.
virtual ~ListModel ()
 Destructor.
void SetNode (Node *aNode)
 Set the node associated with this model.
const NodeGetNode () const
 Get a const pointer to the associated node.
NodeGetNode ()
 Get a mutable pointer to the associated node.

Additional Inherited Members

NodemNode {}
 Pointer to the associated node.

Detailed Description

List model that enumerates the components attached to a node.

Definition at line 26 of file ComponentListModel.h.

Constructor & Destructor Documentation

◆ ComponentListModel()

AeonGames::ComponentListModel::ComponentListModel ( QObject * parent = nullptr)

Construct the component list model.

Parameters
parentParent QObject.

Definition at line 24 of file ComponentListModel.cpp.

Member Function Documentation

◆ data()

QVariant AeonGames::ComponentListModel::data ( const QModelIndex & index,
int role = Qt::DisplayRole ) const
overridevirtual

Return the data for the given index and role.

Parameters
indexModel index.
roleData role.
Returns
Data as a QVariant.

Implements AeonGames::ListModel.

Definition at line 53 of file ComponentListModel.cpp.

◆ headerData()

QVariant AeonGames::ComponentListModel::headerData ( int section,
Qt::Orientation orientation,
int role = Qt::DisplayRole ) const
overridevirtual

Return the header data for the given section, orientation, and role.

Parameters
sectionHeader section index.
orientationHorizontal or vertical header.
roleData role.
Returns
Header data as a QVariant.

Implements AeonGames::ListModel.

Definition at line 29 of file ComponentListModel.cpp.

◆ rowCount()

int AeonGames::ComponentListModel::rowCount ( const QModelIndex & index = QModelIndex()) const
overridevirtual

Return the number of rows under the given parent.

Parameters
indexParent model index.
Returns
Number of rows.

Implements AeonGames::ListModel.

Definition at line 44 of file ComponentListModel.cpp.


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