Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
AeonGames::PropertyDelegate Class Reference

Custom item delegate for editing component properties in views. More...

#include <C:/Code/AeonEngine/tools/worldeditor/delegates/PropertyDelegate.h>

Inheritance diagram for AeonGames::PropertyDelegate:
Inheritance graph
Collaboration diagram for AeonGames::PropertyDelegate:
Collaboration graph

Public Member Functions

 PropertyDelegate (QObject *parent=nullptr)
 Construct the property delegate.
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Create an editor widget for the given model index.
void setEditorData (QWidget *editor, const QModelIndex &index) const override
 Set the editor widget data from the model.
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
 Write the editor widget data back to the model.
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Update the editor geometry to match the view item area.

Detailed Description

Custom item delegate for editing component properties in views.

Definition at line 24 of file PropertyDelegate.h.

Constructor & Destructor Documentation

◆ PropertyDelegate()

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

Construct the property delegate.

Parameters
parentParent object.

Definition at line 28 of file PropertyDelegate.cpp.

Member Function Documentation

◆ createEditor()

QWidget * AeonGames::PropertyDelegate::createEditor ( QWidget * parent,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
override

Create an editor widget for the given model index.

Parameters
parentParent widget for the editor.
optionStyle options for the item.
indexModel index of the item to edit.
Returns
Editor widget.

Definition at line 73 of file PropertyDelegate.cpp.

◆ setEditorData()

void AeonGames::PropertyDelegate::setEditorData ( QWidget * editor,
const QModelIndex & index ) const
override

Set the editor widget data from the model.

Parameters
editorEditor widget.
indexModel index to read from.

Definition at line 106 of file PropertyDelegate.cpp.

◆ setModelData()

void AeonGames::PropertyDelegate::setModelData ( QWidget * editor,
QAbstractItemModel * model,
const QModelIndex & index ) const
override

Write the editor widget data back to the model.

Parameters
editorEditor widget.
modelModel to write to.
indexModel index to write to.

Definition at line 148 of file PropertyDelegate.cpp.

◆ updateEditorGeometry()

void AeonGames::PropertyDelegate::updateEditorGeometry ( QWidget * editor,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
override

Update the editor geometry to match the view item area.

Parameters
editorEditor widget.
optionStyle options for the item.
indexModel index.

Definition at line 191 of file PropertyDelegate.cpp.


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