QCAD
Open Source 2D CAD
PropertyEditorImpl Class Reference

Property editor implementation. More...

Inheritance diagram for PropertyEditorImpl:
RPropertyEditor RPropertyListener RLayerListener

Public Member Functions

void addCustomProperty ()
 
void filterChanged ()
 Called when user changes entity filter at the top of the property editor. More...
 
void getAdjustedPropertyValue (void propertyTypeId)
 
void initBooleanControls (void objectName, void propertyTypeId, void onlyChanges, void control)
 Initializes a boolean control (combo box with yes / no) for the given property. More...
 
void initChoiceControls (void objectName, void propertyTypeId, void onlyChanges, void control, void choices, void choicesData)
 Initializes a choice control (combo box) for the given property. More...
 
void initControls (void propertyTypeId, void onlyChanges, void control)
 Initializes a control for the given property. More...
 
void initNumberControls (void objectName, void propertyTypeId, void onlyChanges, void control, void index)
 Initializes a number control (RMathLineEdit) for the given property. More...
 
void initStringControls (void objectName, void propertyTypeId, void onlyChanges, void control)
 Initializes a string control (QLineEdit) for the given property. More...
 
void makeReadOnly (void control)
 Make given control read-only and more visibly so. More...
 
void makeReadWrite (void control)
 Make given control read-write again. More...
 
void PropertyEditorImpl (void basePath)
 
void requestAllProperties ()
 Called when the user requests all properties to be shown. More...
 
void updateGui (void onlyChanges)
 Implementation from RPropertyEditor to update the property editor GUI. More...
 
- Public Member Functions inherited from RPropertyEditor
virtual void clearEditor ()
 This method is called to signal that no properties are currently relevant. More...
 
virtual void clearLayers ()
 This method is called to signal that no document is currently active. More...
 
RPropertyAttributes getCustomPropertyAttributes (const QString &group, const QString &title)
 
RS::EntityType getEntityTypeFilter () const
 
QStringList getGroupTitles ()
 
RPropertyAttributes getPropertyAttributes (const QString &group, const QString &title)
 
RPropertyAttributes getPropertyAttributes (const RPropertyTypeId &propertyTypeId)
 
QStringList getPropertyTitles (const QString &group)
 
QVariant getPropertyValue (const QString &group, const QString &title)
 
QVariant getPropertyValue (const RPropertyTypeId &propertyTypeId)
 
int getTypeCount (RS::EntityType type)
 
QList< RS::EntityTypegetTypes ()
 
void listPropertyChanged (RPropertyTypeId propertyTypeId, int index, QVariant propertyValue)
 
void propertyChanged (RPropertyTypeId propertyTypeId, QVariant propertyValue, QVariant::Type typeHint=QVariant::Invalid)
 
 RPropertyEditor ()
 Default Constructor. More...
 
virtual void setCurrentLayer (RDocumentInterface *documentInterface, RLayer::Id previousLayerId)
 This method is called when a different layer becomes the new current layer. More...
 
void setEntityTypeFilter (RS::EntityType type)
 
virtual void updateFromDocument (RDocument *document, bool onlyChanges, RS::EntityType filter=RS::EntityUnknown, bool manual=false, bool showOnRequest=false)
 Implements updateFromDocument from RPropertyListener to show properties for selected objects. More...
 
virtual void updateFromObject (RObject *object, RDocument *document=NULL)
 Implements updateFromObject from RPropertyListener to show properties for one single object. More...
 
virtual void updateLayers (RDocumentInterface *documentInterface)
 
virtual void updateLayers (RDocumentInterface *documentInterface, QList< RLayer::Id > &layerIds)
 This method is called whenever at least one layer in the given document has changed. More...
 
virtual ~RPropertyEditor ()
 Destructor. More...
 
- Public Member Functions inherited from RPropertyListener
virtual ~RPropertyListener ()
 
- Public Member Functions inherited from RLayerListener
virtual ~RLayerListener ()
 

Public Attributes

int basePath
 
int childGroup
 
int colon
 
int customGroup
 
int geometryGroup
 
int onlyChangesOverride
 
int widget
 

Additional Inherited Members

- Static Public Member Functions inherited from RPropertyEditor
static bool checkType (RS::EntityType type, RS::EntityType filter)
 
static RPropertyEditorgetInstance ()
 
- Protected Types inherited from RPropertyEditor
typedef QMap< QString, RPropertyMapRPropertyGroupMap
 group key / key,value,attributes More...
 
typedef QMap< QString, QPair< QVariant, RPropertyAttributes > > RPropertyMap
 key / value / attributes More...
 
- Protected Member Functions inherited from RPropertyEditor
void removeAllButThese (const QMultiMap< QString, QString > &propertyTitles, bool customOnly=false)
 Removes all but the given properties from the combined properties collected so far. More...
 
virtual void updateEditor (RObject &object, bool doUpdateGui, RDocument *document=NULL, bool showOnRequest=false)
 Updates the property widget to include the properties of the given property owner. More...
 
virtual void updateGui (bool onlyChanges=false)
 Updates the user interface of this property editor. More...
 
void updateProperty (const RPropertyTypeId &propertyTypeId, RObject &object, RDocument *document, bool showOnRequest=false)
 Sets the property with the given name to the given value or to 'mixed' if that property exists already with a different value. More...
 
- Protected Attributes inherited from RPropertyEditor
RPropertyGroupMap combinedProperties
 
QMap< RS::EntityType, int > combinedTypes
 
RS::EntityType entityTypeFilter
 
QStringList groupOrder
 
bool guiUpToDate
 
QMap< QString, QStringList > propertyOrder
 
bool updatesDisabled
 
- Static Protected Attributes inherited from RPropertyEditor
static RPropertyEditorinstance = NULL
 Copyright (c) 2011-2018 by Andrew Mustun. More...
 

Detailed Description

Property editor implementation.

Constructor & Destructor Documentation

◆ PropertyEditorImpl()

void PropertyEditorImpl::PropertyEditorImpl ( void  basePath)
inline

Member Function Documentation

◆ addCustomProperty()

void PropertyEditorImpl::addCustomProperty ( )
inline

◆ filterChanged()

void PropertyEditorImpl::filterChanged ( )
inline

Called when user changes entity filter at the top of the property editor.

◆ getAdjustedPropertyValue()

void PropertyEditorImpl::getAdjustedPropertyValue ( void  propertyTypeId)
inline

◆ initBooleanControls()

void PropertyEditorImpl::initBooleanControls ( void  objectName,
void  propertyTypeId,
void  onlyChanges,
void  control 
)
inline

Initializes a boolean control (combo box with yes / no) for the given property.

◆ initChoiceControls()

void PropertyEditorImpl::initChoiceControls ( void  objectName,
void  propertyTypeId,
void  onlyChanges,
void  control,
void  choices,
void  choicesData 
)
inline

Initializes a choice control (combo box) for the given property.

◆ initControls()

void PropertyEditorImpl::initControls ( void  propertyTypeId,
void  onlyChanges,
void  control 
)
inline

Initializes a control for the given property.

Parameters
propertyTypeIdThe propery the returned control edits.
onlyChangesControl already exists and only need to be re-initialized.
controlThe control to initialize if it is already known by the caller.
Returns
The control(s) as array.

◆ initNumberControls()

void PropertyEditorImpl::initNumberControls ( void  objectName,
void  propertyTypeId,
void  onlyChanges,
void  control,
void  index 
)
inline

Initializes a number control (RMathLineEdit) for the given property.

◆ initStringControls()

void PropertyEditorImpl::initStringControls ( void  objectName,
void  propertyTypeId,
void  onlyChanges,
void  control 
)
inline

Initializes a string control (QLineEdit) for the given property.

◆ makeReadOnly()

void PropertyEditorImpl::makeReadOnly ( void  control)
inline

Make given control read-only and more visibly so.

◆ makeReadWrite()

void PropertyEditorImpl::makeReadWrite ( void  control)
inline

Make given control read-write again.

◆ requestAllProperties()

void PropertyEditorImpl::requestAllProperties ( )
inline

Called when the user requests all properties to be shown.

◆ updateGui()

void PropertyEditorImpl::updateGui ( void  onlyChanges)
inline

Implementation from RPropertyEditor to update the property editor GUI.

Member Data Documentation

◆ basePath

int PropertyEditorImpl::basePath

◆ childGroup

int PropertyEditorImpl::childGroup

◆ colon

int PropertyEditorImpl::colon

◆ customGroup

int PropertyEditorImpl::customGroup

◆ geometryGroup

int PropertyEditorImpl::geometryGroup

◆ onlyChangesOverride

int PropertyEditorImpl::onlyChangesOverride

◆ widget

int PropertyEditorImpl::widget

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