RPropertyEditor
Class in Core Module
Header: #include <src/core/RPropertyEditor.h>
Inherits: RPropertyListener, RLayerListener
Description
Section titled “Description”Base class for property editors.
Provides basic functionality that is common to any property editor implementation.
Scriptable: This class is available in script environments.
\generateScriptShell
Public Functions
Section titled “Public Functions”RPropertyEditor()Default Constructor. |
|
| virtual | ~RPropertyEditor()Destructor. |
| virtual void | clearEditor()This method is called to signal that no properties are currently relevant. |
| virtual void | clearLayers()This method is called to signal that no document is currently active. |
| virtual QStringList | getAppProperties() |
| RPropertyAttributes | getCustomPropertyAttributes(const QString &group, const QString &title) |
| RS::EntityType | getEntityTypeFilter() const |
| virtual QStringList | getFixedCustomPropertyNames(const QList< RS::EntityType > &objectTypes) |
| 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::EntityType > | getTypes() |
| void | listPropertyChanged(RPropertyTypeId propertyTypeId, int index, QVariant propertyValue) |
| void | propertyChanged(RPropertyTypeId propertyTypeId, QVariant propertyValue, RS::MetaType typeHint=RS::UnknownType) |
| virtual void | setCurrentLayer(RDocumentInterface *documentInterface, RObject::Id previousLayerId)This method is called when a different layer becomes the new current layer. |
| void | setEntityTypeFilter(RS::EntityType type) |
| virtual void | updateFromDocument(RDocument *document, bool onlyChanges, RS::EntityType filter=RS::EntityUnknown, bool manual=false, bool showOnRequest=false)Removes all but the given properties from the combined properties collected so far. |
| void | updateFromDocumentNow(RDocument *document, bool onlyChanges, RS::EntityType filter=RS::EntityUnknown, bool manual=false, bool showOnRequest=false) |
| virtual void | updateFromObject(RObject *object, RDocument *document=NULL)Implements updateFromObject from RPropertyListener to show properties for one single object. |
| virtual void | updateLayers(RDocumentInterface *documentInterface) |
| virtual void | updateLayers(RDocumentInterface *documentInterface, QList< RObject::Id > &layerIds)This method is called whenever at least one layer in the given document has changed. |
Static Public Functions
Section titled “Static Public Functions”| static bool | checkType(RS::EntityType type, RS::EntityType filter) |
| static RPropertyEditor * | getInstance() |
| static void | makeReadOnly(QWidget *control, bool on) |
Protected Types
Section titled “Protected Types”| typedef | QMap< QString, RPropertyMap > RPropertyGroupMap group key / key,value,attributes |
| typedef | QMap< QString, QPair< QVariant, RPropertyAttributes > > RPropertyMap key / value / attributes |
Protected Functions
Section titled “Protected Functions”| virtual bool | showCustomAppProperties(RPropertyAttributes::Option opt)Can be re-implemented to show custom app properties of the given type(s). |
| virtual void | updateEditor(RObject &object, const QList< RPropertyTypeId > &propertyTypeIds, bool doUpdateGui, RDocument *document=NULL, bool showOnRequest=false)Updates the property widget to include the properties of the given property owner. |
| virtual void | updateGui(bool onlyChanges=false)Updates the user interface of this property editor. |
| 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. |
Static Protected Functions
Section titled “Static Protected Functions”| static void | computePropertyValue(RProperty &property) |
Protected Attributes
Section titled “Protected Attributes”| RPropertyGroupMap | combinedProperties |
| QMap< RS::EntityType, int > | combinedTypes |
| RS::EntityType | entityTypeFilter |
| QStringList | groupOrder |
| bool | guiUpToDate |
| QMap< QString, QStringList > | propertyOrder |
| bool | updatesDisabled |
Static Protected Attributes
Section titled “Static Protected Attributes”| static RPropertyEditor * | instance |
Private Attributes
Section titled “Private Attributes”| bool | terminate |
Member Documentation
Section titled “Member Documentation”RPropertyEditor
Section titled “RPropertyEditor”RPropertyEditor::RPropertyEditor()Default Constructor.
~RPropertyEditor
Section titled “~RPropertyEditor”virtual RPropertyEditor::~RPropertyEditor()virtual
Destructor.
clearEditor
Section titled “clearEditor”virtual void RPropertyEditor::clearEditor()virtual
This method is called to signal that no properties are currently relevant.
For example that no entities are selected in a document or that nothing is being drawn at the moment.
Reimplemented from clearEditor.
clearLayers
Section titled “clearLayers”virtual void RPropertyEditor::clearLayers()virtual
This method is called to signal that no document is currently active.
Reimplemented from clearLayers.
getAppProperties
Section titled “getAppProperties”virtual QStringList RPropertyEditor::getAppProperties()virtual inline
getCustomPropertyAttributes
Section titled “getCustomPropertyAttributes”RPropertyAttributes RPropertyEditor::getCustomPropertyAttributes(const QString &group, const QString &title)getEntityTypeFilter
Section titled “getEntityTypeFilter”RS::EntityType RPropertyEditor::getEntityTypeFilter() constinline const
getFixedCustomPropertyNames
Section titled “getFixedCustomPropertyNames”virtual QStringList RPropertyEditor::getFixedCustomPropertyNames(const QList< RS::EntityType > &objectTypes)virtual inline
getGroupTitles
Section titled “getGroupTitles”QStringList RPropertyEditor::getGroupTitles()Returns: All groups in correct order.
getPropertyAttributes
Section titled “getPropertyAttributes”RPropertyAttributes RPropertyEditor::getPropertyAttributes(const QString &group, const QString &title)Returns: Property attributes for given property.
getPropertyAttributes
Section titled “getPropertyAttributes”RPropertyAttributes RPropertyEditor::getPropertyAttributes(const RPropertyTypeId &propertyTypeId)Returns: Property attributes of given property.
getPropertyTitles
Section titled “getPropertyTitles”QStringList RPropertyEditor::getPropertyTitles(const QString &group)Returns: All properties of the given group in correct order.
getPropertyValue
Section titled “getPropertyValue”QVariant RPropertyEditor::getPropertyValue(const QString &group, const QString &title)Returns: Property value of given property.
getPropertyValue
Section titled “getPropertyValue”QVariant RPropertyEditor::getPropertyValue(const RPropertyTypeId &propertyTypeId)Returns: Property value of given property.
getTypeCount
Section titled “getTypeCount”int RPropertyEditor::getTypeCount(RS::EntityType type)getTypes
Section titled “getTypes”QList< RS::EntityType > RPropertyEditor::getTypes()listPropertyChanged
Section titled “listPropertyChanged”void RPropertyEditor::listPropertyChanged(RPropertyTypeId propertyTypeId, int index, QVariant propertyValue)propertyChanged
Section titled “propertyChanged”void RPropertyEditor::propertyChanged(RPropertyTypeId propertyTypeId, QVariant propertyValue, RS::MetaType typeHint=RS::UnknownType)setCurrentLayer
Section titled “setCurrentLayer”virtual void RPropertyEditor::setCurrentLayer(RDocumentInterface *documentInterface, RObject::Id previousLayerId)virtual
This method is called when a different layer becomes the new current layer.
Reimplemented from setCurrentLayer.
setEntityTypeFilter
Section titled “setEntityTypeFilter”void RPropertyEditor::setEntityTypeFilter(RS::EntityType type)inline
updateFromDocument
Section titled “updateFromDocument”virtual void RPropertyEditor::updateFromDocument(RDocument *document, bool onlyChanges, RS::EntityType filter=RS::EntityUnknown, bool manual=false, bool showOnRequest=false)virtual
Removes all but the given properties from the combined properties collected so far.
Implements updateFromDocument from RPropertyListener to show properties for selected objects.
Updates the property editor to contain the properties of the objects that are selected for editing in the given document.
Parameters:
filter: RS::EntityUnknown to use same filter as previously used, any other value to change filter.
Reimplemented from updateFromDocument.
updateFromDocumentNow
Section titled “updateFromDocumentNow”void RPropertyEditor::updateFromDocumentNow(RDocument *document, bool onlyChanges, RS::EntityType filter=RS::EntityUnknown, bool manual=false, bool showOnRequest=false)updateFromObject
Section titled “updateFromObject”virtual void RPropertyEditor::updateFromObject(RObject *object, RDocument *document=NULL)virtual
Implements updateFromObject from RPropertyListener to show properties for one single object.
Reimplemented from updateFromObject.
updateLayers
Section titled “updateLayers”virtual void RPropertyEditor::updateLayers(RDocumentInterface *documentInterface)virtual
updateLayers
Section titled “updateLayers”virtual void RPropertyEditor::updateLayers(RDocumentInterface *documentInterface, QList< RObject::Id > &layerIds)virtual
This method is called whenever at least one layer in the given document has changed.
Reimplemented from updateLayers.
checkType
Section titled “checkType”static bool RPropertyEditor::checkType(RS::EntityType type, RS::EntityType filter)static
getInstance
Section titled “getInstance”static RPropertyEditor * RPropertyEditor::getInstance()static
makeReadOnly
Section titled “makeReadOnly”static void RPropertyEditor::makeReadOnly(QWidget *control, bool on)static
RPropertyGroupMap
Section titled “RPropertyGroupMap”typedef QMap<QString, RPropertyMap> RPropertyEditor::RPropertyGroupMapprotected
group key / key,value,attributes
RPropertyMap
Section titled “RPropertyMap”typedef QMap<QString, QPair<QVariant, RPropertyAttributes> > RPropertyEditor::RPropertyMapprotected
key / value / attributes
showCustomAppProperties
Section titled “showCustomAppProperties”virtual bool RPropertyEditor::showCustomAppProperties(RPropertyAttributes::Option opt)virtual protected
Can be re-implemented to show custom app properties of the given type(s).
updateEditor
Section titled “updateEditor”virtual void RPropertyEditor::updateEditor(RObject &object, const QList< RPropertyTypeId > &propertyTypeIds, bool doUpdateGui, RDocument *document=NULL, bool showOnRequest=false)virtual protected
Updates the property widget to include the properties of the given property owner.
Non-Scriptable: This function is not available in script environments.
updateGui
Section titled “updateGui”virtual void RPropertyEditor::updateGui(bool onlyChanges=false)virtual inline protected
Updates the user interface of this property editor.
This is the only part of the property editor that depends on the user interface and GUI toolkit that is available.
updateProperty
Section titled “updateProperty”void RPropertyEditor::updateProperty(const RPropertyTypeId &propertyTypeId, RObject &object, RDocument *document, bool showOnRequest=false)protected
Sets the property with the given name to the given value or to ‘mixed’ if that property exists already with a different value.
Parameters:
propertyTypeId: Id of the property.showOnRequest: True to show also slow properties shown on request.
computePropertyValue
Section titled “computePropertyValue”static void RPropertyEditor::computePropertyValue(RProperty &property)static protected
combinedProperties
Section titled “combinedProperties”RPropertyGroupMap RPropertyEditor::combinedPropertiesprotected
combinedTypes
Section titled “combinedTypes”QMap<RS::EntityType, int> RPropertyEditor::combinedTypesprotected
entityTypeFilter
Section titled “entityTypeFilter”RS::EntityType RPropertyEditor::entityTypeFilterprotected
groupOrder
Section titled “groupOrder”QStringList RPropertyEditor::groupOrderprotected
guiUpToDate
Section titled “guiUpToDate”bool RPropertyEditor::guiUpToDateprotected
propertyOrder
Section titled “propertyOrder”QMap<QString, QStringList> RPropertyEditor::propertyOrderprotected
updatesDisabled
Section titled “updatesDisabled”bool RPropertyEditor::updatesDisabledprotected
instance
Section titled “instance”static RPropertyEditor * RPropertyEditor::instance = NULLstatic protected
All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD.
terminate
Section titled “terminate”bool RPropertyEditor::terminateprivate