17#include "ComponentListModel.h"
19#include "aeongames/Node.hpp"
20#include "aeongames/StringId.hpp"
31 if ( ( orientation == Qt::Horizontal ) && ( role == Qt::DisplayRole ) )
36 return QString (
"Node Data" );
46 if ( !
mNode || index.isValid() )
50 return static_cast<int> (
mNode->GetComponentCount() );
55 if ( !
mNode || !index.isValid() )
59 if ( role == Qt::DisplayRole )
61 return QString (
mNode->GetComponentByIndex ( index.row() )->GetId().GetString() );
Header for the Scene class.
int rowCount(const QModelIndex &index=QModelIndex()) const override
Return the number of rows under the given parent.
ComponentListModel(QObject *parent=nullptr)
Construct the component list model.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Return the data for the given index and role.
virtual ~ComponentListModel()
Destructor.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Return the header data for the given section, orientation, and role.
Node * mNode
Pointer to the associated node.
ListModel(QObject *parent=nullptr)
Construct the list model.
<- This is here just for the literals