Gui::PropertyEditor::PropertyEditor Class Reference

#include <PropertyEditor.h>

Public Member Functions

void buildUp (PropertyModel::PropertyList &&props=PropertyModel::PropertyList(), bool checkDocument=false)
 Builds up the list view with the properties. More...
 
void closeEditor ()
 
QBrush groupBackground () const
 
QColor groupTextColor () const
 
bool isAutomaticDocumentUpdate (bool) const
 
bool isAutomaticExpand (bool) const
 
bool isBinding () const
 
void openEditor (const QModelIndex &index)
 
 PropertyEditor (QWidget *parent=nullptr)
 
void removeProperty (const App::Property &)
 
virtual void reset ()
 
void setAutomaticDocumentUpdate (bool)
 
void setAutomaticExpand (bool)
 
void setGroupBackground (const QBrush &c)
 
void setGroupTextColor (const QColor &c)
 
void updateProperty (const App::Property &)
 
 ~PropertyEditor ()
 

Protected Slots

void onItemActivated (const QModelIndex &index)
 
void onItemCollapsed (const QModelIndex &index)
 
void onItemExpanded (const QModelIndex &index)
 
void onRowsMoved (const QModelIndex &parent, int start, int end, const QModelIndex &dst, int row)
 
void onRowsRemoved (const QModelIndex &parent, int start, int end)
 

Protected Member Functions

virtual void closeEditor (QWidget *editor, QAbstractItemDelegate::EndEditHint hint)
 
virtual void commitData (QWidget *editor)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 
virtual void currentChanged (const QModelIndex &current, const QModelIndex &previous)
 
virtual void drawBranches (QPainter *painter, const QRect &rect, const QModelIndex &index) const
 
virtual void editorDestroyed (QObject *editor)
 
virtual bool event (QEvent *)
 
virtual void rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
virtual void rowsInserted (const QModelIndex &parent, int start, int end)
 
virtual QStyleOptionViewItem viewOptions () const
 

Properties

QBrush groupBackground
 
QColor groupTextColor
 

Friends

class Gui::PropertyView
 
class PropertyItemDelegate
 

Detailed Description

Put this into the .qss file after GuiPropertyEditorPropertyEditor

GuiPropertyEditorPropertyEditor { qproperty-groupBackground: gray; qproperty-groupTextColor: white; }

See also: https://man42.net/blog/2011/09/qt-4-7-modify-a-custom-q_property-with-a-qt-style-sheet/

Constructor & Destructor Documentation

◆ PropertyEditor()

◆ ~PropertyEditor()

PropertyEditor::~PropertyEditor ( )

Member Function Documentation

◆ buildUp()

◆ closeEditor() [1/2]

void PropertyEditor::closeEditor ( )

◆ closeEditor() [2/2]

void PropertyEditor::closeEditor ( QWidget editor,
QAbstractItemDelegate::EndEditHint  hint 
)
protectedvirtual

◆ commitData()

void PropertyEditor::commitData ( QWidget editor)
protectedvirtual

◆ contextMenuEvent()

◆ currentChanged()

void PropertyEditor::currentChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
protectedvirtual

◆ drawBranches()

void PropertyEditor::drawBranches ( QPainter *  painter,
const QRect &  rect,
const QModelIndex &  index 
) const
protectedvirtual

References viewOptions().

◆ editorDestroyed()

void PropertyEditor::editorDestroyed ( QObject editor)
protectedvirtual

◆ event()

bool PropertyEditor::event ( QEvent event)
protectedvirtual

References event().

Referenced by event().

◆ groupBackground()

QBrush PropertyEditor::groupBackground ( ) const

◆ groupTextColor()

QColor PropertyEditor::groupTextColor ( ) const

◆ isAutomaticDocumentUpdate()

bool PropertyEditor::isAutomaticDocumentUpdate ( bool  ) const

◆ isAutomaticExpand()

bool PropertyEditor::isAutomaticExpand ( bool  ) const

◆ isBinding()

bool Gui::PropertyEditor::PropertyEditor::isBinding ( ) const

◆ onItemActivated

void PropertyEditor::onItemActivated ( const QModelIndex &  index)
protectedslot

References openEditor().

◆ onItemCollapsed

void PropertyEditor::onItemCollapsed ( const QModelIndex &  index)
protectedslot

◆ onItemExpanded

◆ onRowsMoved

void PropertyEditor::onRowsMoved ( const QModelIndex &  parent,
int  start,
int  end,
const QModelIndex &  dst,
int  row 
)
protectedslot

◆ onRowsRemoved

void PropertyEditor::onRowsRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
protectedslot

◆ openEditor()

◆ removeProperty()

void PropertyEditor::removeProperty ( const App::Property prop)

◆ reset()

◆ rowsAboutToBeRemoved()

void PropertyEditor::rowsAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
protectedvirtual

◆ rowsInserted()

◆ setAutomaticDocumentUpdate()

void PropertyEditor::setAutomaticDocumentUpdate ( bool  v)

◆ setAutomaticExpand()

void PropertyEditor::setAutomaticExpand ( bool  v)

◆ setGroupBackground()

void PropertyEditor::setGroupBackground ( const QBrush &  c)

◆ setGroupTextColor()

void PropertyEditor::setGroupTextColor ( const QColor &  c)

◆ updateProperty()

void PropertyEditor::updateProperty ( const App::Property prop)

◆ viewOptions()

QStyleOptionViewItem PropertyEditor::viewOptions ( ) const
protectedvirtual

Referenced by drawBranches().

Friends And Related Function Documentation

◆ Gui::PropertyView

friend class Gui::PropertyView
friend

◆ PropertyItemDelegate

Property Documentation

◆ groupBackground

QBrush Gui::PropertyEditor::PropertyEditor::groupBackground
readwrite

◆ groupTextColor

QColor Gui::PropertyEditor::PropertyEditor::groupTextColor
readwrite

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