QCAD
Open Source 2D CAD
PropertyEditorImpl Class Reference

Property editor implementation. More...

Inheritance diagram for PropertyEditorImpl:
RPropertyEditor RPropertyListener

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 updateGui (void onlyChanges, void entityTypeFilter)
 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...
 
QStringList getGroupTitles ()
 
RPropertyAttributes getPropertyAttributes (const RPropertyTypeId &propertyTypeId)
 
RPropertyAttributes getPropertyAttributes (const QString &group, const QString &title)
 
QStringList getPropertyTitles (const QString &group)
 
QVariant getPropertyValue (const RPropertyTypeId &propertyTypeId)
 
QVariant getPropertyValue (const QString &group, const QString &title)
 
int getTypeCount (RS::EntityType type)
 
QList< RS::EntityTypegetTypes ()
 
void listPropertyChanged (RPropertyTypeId propertyTypeId, int index, QVariant propertyValue, RS::EntityType entityTypeFilter=RS::EntityAll)
 
void propertyChanged (RPropertyTypeId propertyTypeId, QVariant propertyValue, RS::EntityType entityTypeFilter=RS::EntityAll, QVariant::Type typeHint=QVariant::Invalid)
 
 RPropertyEditor ()
 Copyright (c) 2011-2015 by Andrew Mustun. More...
 
virtual void updateFromDocument (RDocument *document, bool onlyChanges, RS::EntityType entityTypeFilter=RS::EntityAll, bool manual=false)
 Updates the property editor to contain the properties of the objects that are selected for editing in the given document. More...
 
virtual void updateFromObject (RObject *object, RDocument *document=NULL)
 Implements update from RPropertyListener. More...
 
virtual ~RPropertyEditor ()
 Destructor. More...
 
- Public Member Functions inherited from RPropertyListener
virtual ~RPropertyListener ()
 

Public Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from RPropertyEditor
static bool checkType (RS::EntityType type, RS::EntityType filter)
 
- 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)
 Updates the property widget to include the properties of the given property owner. More...
 
virtual void updateGui (bool onlyChanges=false, RS::EntityType entityTypeFilter=RS::EntityAll)
 Updates the user interface of this property editor. More...
 
void updateProperty (const RPropertyTypeId &propertyTypeId, RObject &object, RDocument *document)
 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
 
QStringList groupOrder
 
bool guiUpToDate
 
QMap< QString, QStringList > propertyOrder
 
bool updatesDisabled
 

Detailed Description

Property editor implementation.

Constructor & Destructor Documentation

void PropertyEditorImpl::PropertyEditorImpl ( void  basePath)
inline

Member Function Documentation

void PropertyEditorImpl::addCustomProperty ( )
inline
void PropertyEditorImpl::filterChanged ( )
inline

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

void PropertyEditorImpl::getAdjustedPropertyValue ( void  propertyTypeId)
inline
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.

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.

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.
void PropertyEditorImpl::initNumberControls ( void  objectName,
void  propertyTypeId,
void  onlyChanges,
void  control,
void  index 
)
inline

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

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

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

void PropertyEditorImpl::makeReadOnly ( void  control)
inline

Make given control read-only and more visibly so.

void PropertyEditorImpl::makeReadWrite ( void  control)
inline

Make given control read-write again.

void PropertyEditorImpl::updateGui ( void  onlyChanges,
void  entityTypeFilter 
)
inline

Implementation from RPropertyEditor to update the property editor GUI.

Member Data Documentation

int PropertyEditorImpl::basePath
int PropertyEditorImpl::childGroup
int PropertyEditorImpl::colon
int PropertyEditorImpl::customGroup
int PropertyEditorImpl::entityTypeFilter
int PropertyEditorImpl::geometryGroup
int PropertyEditorImpl::onlyChangesOverride
int PropertyEditorImpl::varies
int PropertyEditorImpl::widget

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