Abstract item model base class for property editing views.
More...
#include <C:/Code/AeonEngine/tools/worldeditor/models/PropertyModel.h>
|
| | PropertyModel (QObject *parent=nullptr) |
| | Construct the property model.
|
|
virtual | ~PropertyModel () |
| | Destructor.
|
| 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.
|
| int | columnCount (const QModelIndex &index=QModelIndex()) const override |
| | Return the number of columns for children of 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.
|
| bool | hasChildren (const QModelIndex &index=QModelIndex()) const override |
| | Return whether the given parent index has any children.
|
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| | Return the item flags for the given model index.
|
| 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.
|
| bool | setData (const QModelIndex &index, const QVariant &value, int role) override=0 |
| | Set the data for the given index and role.
|
Abstract item model base class for property editing views.
Definition at line 26 of file PropertyModel.h.
◆ PropertyModel()
| AeonGames::PropertyModel::PropertyModel |
( |
QObject * | parent = nullptr | ) |
|
◆ columnCount()
| int AeonGames::PropertyModel::columnCount |
( |
const QModelIndex & | index = QModelIndex() | ) |
const |
|
override |
Return the number of columns for children of the given parent.
- Parameters
-
- Returns
- Number of columns.
Definition at line 62 of file PropertyModel.cpp.
◆ data()
| QVariant AeonGames::PropertyModel::data |
( |
const QModelIndex & | index, |
|
|
int | role = Qt::DisplayRole ) const |
|
overridepure virtual |
Return the data for the given index and role.
- Parameters
-
- Returns
- Data as a QVariant.
Implemented in AeonGames::ComponentModel.
◆ flags()
| Qt::ItemFlags AeonGames::PropertyModel::flags |
( |
const QModelIndex & | index | ) |
const |
|
override |
Return the item flags for the given model index.
- Parameters
-
- Returns
- Item flags.
Definition at line 73 of file PropertyModel.cpp.
◆ hasChildren()
| bool AeonGames::PropertyModel::hasChildren |
( |
const QModelIndex & | index = QModelIndex() | ) |
const |
|
override |
Return whether the given parent index has any children.
- Parameters
-
- Returns
- True if the parent has children.
Definition at line 67 of file PropertyModel.cpp.
◆ headerData()
| QVariant AeonGames::PropertyModel::headerData |
( |
int | section, |
|
|
Qt::Orientation | orientation, |
|
|
int | role = Qt::DisplayRole ) const |
|
override |
Return the header data for the given section, orientation, and role.
- Parameters
-
| section | Header section index. |
| orientation | Horizontal or vertical header. |
| role | Data role. |
- Returns
- Header data as a QVariant.
Definition at line 40 of file PropertyModel.cpp.
◆ index()
| QModelIndex AeonGames::PropertyModel::index |
( |
int | row, |
|
|
int | column, |
|
|
const QModelIndex & | parent = QModelIndex() ) const |
|
overridepure virtual |
Return the index of the item at the given row and column under parent.
- Parameters
-
| row | Row number. |
| column | Column number. |
| parent | Parent model index. |
- Returns
- Model index for the specified item.
Implemented in AeonGames::ComponentModel.
◆ parent()
| QModelIndex AeonGames::PropertyModel::parent |
( |
const QModelIndex & | index | ) |
const |
|
override |
Return the parent of the given model index.
- Parameters
-
| index | The child model index. |
- Returns
- Parent model index, or an invalid index if the item has no parent.
Definition at line 57 of file PropertyModel.cpp.
◆ rowCount()
| int AeonGames::PropertyModel::rowCount |
( |
const QModelIndex & | index = QModelIndex() | ) |
const |
|
overridepure virtual |
Return the number of rows under the given parent.
- Parameters
-
- Returns
- Number of rows.
Implemented in AeonGames::ComponentModel.
◆ setData()
| bool AeonGames::PropertyModel::setData |
( |
const QModelIndex & | index, |
|
|
const QVariant & | value, |
|
|
int | role ) |
|
overridepure virtual |
Set the data for the given index and role.
- Parameters
-
- Returns
- True if the data was set successfully.
Implemented in AeonGames::ComponentModel.
The documentation for this class was generated from the following files: