Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
PropertyModel.h
1/*
2Copyright (C) 2018,2019,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17#ifndef AEONGAMES_PROPERTYMODEL_H
18#define AEONGAMES_PROPERTYMODEL_H
19#include <QAbstractItemModel>
20#include <QList>
21#include <QAction>
22
23namespace AeonGames
24{
26 class PropertyModel : public QAbstractItemModel
27 {
28 Q_OBJECT
29 public:
34 PropertyModel ( QObject *parent = nullptr );
36 virtual ~PropertyModel();
38
39
42 QModelIndex parent ( const QModelIndex & index ) const override;
46 int rowCount ( const QModelIndex & index = QModelIndex() ) const override = 0;
50 int columnCount ( const QModelIndex & index = QModelIndex() ) const override;
56 QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
60 bool hasChildren ( const QModelIndex & index = QModelIndex() ) const override;
64 Qt::ItemFlags flags ( const QModelIndex & index ) const override;
70 QModelIndex index ( int row, int column, const QModelIndex & parent = QModelIndex() ) const override = 0;
75 QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const override = 0;
81 bool setData ( const QModelIndex & index, const QVariant & value, int role ) override = 0;
83 };
84}
85#endif
bool setData(const QModelIndex &index, const QVariant &value, int role) override=0
Set the data for the given index and role.
QModelIndex parent(const QModelIndex &index) const override
Return the parent of the given model index.
int rowCount(const QModelIndex &index=QModelIndex()) const override=0
Return the number of rows under the given parent.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Return the header data for the given section, orientation, and role.
virtual ~PropertyModel()
Destructor.
int columnCount(const QModelIndex &index=QModelIndex()) const override
Return the number of columns for children of the given parent.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override=0
Return the index of the item at the given row and column under parent.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override=0
Return the data for the given index and role.
Qt::ItemFlags flags(const QModelIndex &index) const override
Return the item flags for the given model index.
bool hasChildren(const QModelIndex &index=QModelIndex()) const override
Return whether the given parent index has any children.
PropertyModel(QObject *parent=nullptr)
Construct the property model.
<- This is here just for the literals
Definition AABB.hpp:31