Gui::PropertyEditor::PropertyEditor Class Reference

#include <PropertyEditor.h>

Public Member Functions

bool appendProperty (const App::Property &)
 
void buildUp (PropertyModel::PropertyList &&props=PropertyModel::PropertyList(), bool checkDocument=false)
 Builds up the list view with the properties. More...
 
QBrush groupBackground () const
 
QColor groupTextColor () const
 
bool isAutomaticDocumentUpdate (bool) const
 
bool isAutomaticExpand (bool) const
 
bool isBinding () const
 
 PropertyEditor (QWidget *parent=0)
 
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 updateEditorMode (const App::Property &)
 
void updateProperty (const App::Property &)
 
 ~PropertyEditor ()
 

Protected Slots

void onItemActivated (const QModelIndex &index)
 

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 rowsInserted (const QModelIndex &parent, int start, int end)
 
virtual QStyleOptionViewItem viewOptions () const
 

Properties

QBrush groupBackground
 
QColor groupTextColor
 

Friends

class Gui::PropertyView
 

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

◆ appendProperty()

bool PropertyEditor::appendProperty ( const App::Property prop)

◆ buildUp()

◆ closeEditor()

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

◆ 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

◆ removeProperty()

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

◆ reset()

void PropertyEditor::reset ( )
virtual

Reset the internal state of the view.

References Gui::PropertyEditor::PropertyModel::rowCount().

Referenced by draftguitools.gui_trackers.gridTracker::set().

◆ rowsInserted()

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

◆ 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)

◆ updateEditorMode()

◆ 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

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:
  • Sources/FreeCAD/src/Gui/propertyeditor/PropertyEditor.h
  • Sources/FreeCAD/src/Gui/propertyeditor/PropertyEditor.cpp