Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
AeonGames::ListModel Class Referenceabstract

Abstract list model base class associated with a scene node. More...

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

Inheritance diagram for AeonGames::ListModel:
Inheritance graph
Collaboration diagram for AeonGames::ListModel:
Collaboration graph

Public Member Functions

 ListModel (QObject *parent=nullptr)
 Construct the list model.
virtual ~ListModel ()
 Destructor.

Qt QAbstractListModel overrides

NodemNode {}
 Pointer to the associated node.
int rowCount (const QModelIndex &index=QModelIndex()) const =0
 Return the number of rows under the given parent.
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const =0
 Return the data for the given index and role.
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const =0
 Return the header data for the given section, orientation, and role.
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.

Detailed Description

Abstract list model base class associated with a scene node.

Definition at line 26 of file ListModel.h.

Constructor & Destructor Documentation

◆ ListModel()

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

Construct the list model.

Parameters
parentParent QObject.

Definition at line 30 of file ListModel.cpp.

Member Function Documentation

◆ data()

QVariant AeonGames::ListModel::data ( const QModelIndex & index,
int role = Qt::DisplayRole ) const
pure virtual

Return the data for the given index and role.

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

Implemented in AeonGames::ComponentListModel.

◆ GetNode() [1/2]

Node * AeonGames::ListModel::GetNode ( )

Get a mutable pointer to the associated node.

Returns
Pointer to the node.

Definition at line 45 of file ListModel.cpp.

◆ GetNode() [2/2]

const Node * AeonGames::ListModel::GetNode ( ) const

Get a const pointer to the associated node.

Returns
Const pointer to the node.

Definition at line 41 of file ListModel.cpp.

◆ headerData()

QVariant AeonGames::ListModel::headerData ( int section,
Qt::Orientation orientation,
int role = Qt::DisplayRole ) const
pure virtual

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.

Implemented in AeonGames::ComponentListModel.

◆ rowCount()

int AeonGames::ListModel::rowCount ( const QModelIndex & index = QModelIndex()) const
pure virtual

Return the number of rows under the given parent.

Parameters
indexParent model index.
Returns
Number of rows.

Implemented in AeonGames::ComponentListModel.

◆ SetNode()

void AeonGames::ListModel::SetNode ( Node * aNode)

Set the node associated with this model.

Parameters
aNodePointer to the node.

Definition at line 35 of file ListModel.cpp.

Member Data Documentation

◆ mNode

Node* AeonGames::ListModel::mNode {}
protected

Pointer to the associated node.

Definition at line 67 of file ListModel.h.


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