17#ifndef AEONGAMES_COMPONENTMODEL_H
18#define AEONGAMES_COMPONENTMODEL_H
19#include "aeongames/Component.hpp"
20#include "PropertyModel.h"
42 QModelIndex
index (
int row,
int column,
const QModelIndex &
parent = QModelIndex() )
const override;
46 int rowCount (
const QModelIndex &
index = QModelIndex() )
const override;
51 QVariant
data (
const QModelIndex &
index,
int role = Qt::DisplayRole )
const override;
57 bool setData (
const QModelIndex &
index,
const QVariant & value,
int role )
override;
Abstract base class for node components.
virtual ~ComponentModel()
Destructor.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Return the index of the item at the given row and column under parent.
int rowCount(const QModelIndex &index=QModelIndex()) const override
Return the number of rows under the given parent.
bool setData(const QModelIndex &index, const QVariant &value, int role) override
Set the data for the given index and role.
void SetComponent(Component *aComponent)
Set the component whose properties are represented by this model.
ComponentModel(QObject *parent=nullptr)
Construct the component model.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Return the data for the given index and role.
QModelIndex parent(const QModelIndex &index) const override
Return the parent of the given model index.
PropertyModel(QObject *parent=nullptr)
Construct the property model.
<- This is here just for the literals