Seamly2D
Code documentation
VPE::VPropertyDelegate Class Reference

#include <vpropertydelegate.h>

Inheritance diagram for VPE::VPropertyDelegate:
Collaboration diagram for VPE::VPropertyDelegate:

Public Member Functions

 VPropertyDelegate (QObject *parent=nullptr)
 
virtual ~VPropertyDelegate () Q_DECL_OVERRIDE
 
virtual QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
 Creates the editor widget. More...
 
virtual void setEditorData (QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE
 Sets the index data to the editor. More...
 
virtual void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const Q_DECL_OVERRIDE
 Updates the index data. More...
 
virtual QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
 Returns the size hint. More...
 
void setRowHeight (int height=0, bool add_to_standard=false)
 Sets the row height. Set this to 0 and the standard will be taken. More...
 
virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
 Renders the delegate using the given painter and style option for the item specified by index. More...
 

Protected Attributes

int RowHeight
 
bool AddRowHeight
 

Detailed Description

Definition at line 35 of file vpropertydelegate.h.

Constructor & Destructor Documentation

◆ VPropertyDelegate()

VPE::VPropertyDelegate::VPropertyDelegate ( QObject *  parent = nullptr)
explicit

Definition at line 36 of file vpropertydelegate.cpp.

◆ ~VPropertyDelegate()

VPE::VPropertyDelegate::~VPropertyDelegate ( )
virtual

Definition at line 41 of file vpropertydelegate.cpp.

Member Function Documentation

◆ createEditor()

QWidget * VPE::VPropertyDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

Creates the editor widget.

Definition at line 46 of file vpropertydelegate.cpp.

References VPE::VProperty::createEditor().

◆ paint()

void VPE::VPropertyDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

Renders the delegate using the given painter and style option for the item specified by index.

Definition at line 114 of file vpropertydelegate.cpp.

◆ setEditorData()

void VPE::VPropertyDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
virtual

Sets the index data to the editor.

Definition at line 61 of file vpropertydelegate.cpp.

References VPE::VProperty::setEditorData().

◆ setModelData()

void VPE::VPropertyDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
virtual

Updates the index data.

Definition at line 77 of file vpropertydelegate.cpp.

References VPE::VProperty::getEditorData().

◆ setRowHeight()

void VPE::VPropertyDelegate::setRowHeight ( int  height = 0,
bool  add_to_standard = false 
)

Sets the row height. Set this to 0 and the standard will be taken.

Definition at line 108 of file vpropertydelegate.cpp.

◆ sizeHint()

QSize VPE::VPropertyDelegate::sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

Returns the size hint.

Definition at line 95 of file vpropertydelegate.cpp.

Member Data Documentation

◆ AddRowHeight

bool VPE::VPropertyDelegate::AddRowHeight
protected

Definition at line 65 of file vpropertydelegate.h.

◆ RowHeight

int VPE::VPropertyDelegate::RowHeight
protected

Definition at line 64 of file vpropertydelegate.h.


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