![]() |
QCAD
Open Source 2D CAD
|
Base class for property editors. More...
#include <RPropertyEditor.h>
Public Member Functions | |
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) |
RPropertyEditor () | |
Default Constructor. | |
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. | |
virtual | ~RPropertyEditor () |
Destructor. | |
![]() | |
virtual | ~RPropertyListener () |
![]() | |
virtual | ~RLayerListener () |
Static Public Member Functions | |
static bool | checkType (RS::EntityType type, RS::EntityType filter) |
static RPropertyEditor * | getInstance () |
static void | makeReadOnly (QWidget *control, bool on) |
Protected Types | |
typedef QMap< QString, RPropertyMap > | RPropertyGroupMap |
group key / key,value,attributes | |
typedef QMap< QString, QPair< QVariant, RPropertyAttributes > > | RPropertyMap |
key / value / attributes | |
Protected Member 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 Member Functions | |
static void | computePropertyValue (RProperty &property) |
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 | |
static RPropertyEditor * | instance = NULL |
Copyright (c) 2011-2018 by Andrew Mustun. | |
Private Attributes | |
bool | terminate |
Base class for property editors.
Provides basic functionality that is common to any property editor implementation.
|
protected |
group key / key,value,attributes
|
protected |
key / value / attributes
RPropertyEditor::RPropertyEditor | ( | ) |
Default Constructor.
|
virtual |
Destructor.
|
static |
|
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.
Implements RPropertyListener.
|
virtual |
This method is called to signal that no document is currently active.
Implements RLayerListener.
|
staticprotected |
|
inlinevirtual |
RPropertyAttributes RPropertyEditor::getCustomPropertyAttributes | ( | const QString & | group, |
const QString & | title ) |
|
inline |
|
inlinevirtual |
QStringList RPropertyEditor::getGroupTitles | ( | ) |
|
static |
RPropertyAttributes RPropertyEditor::getPropertyAttributes | ( | const QString & | group, |
const QString & | title ) |
RPropertyAttributes RPropertyEditor::getPropertyAttributes | ( | const RPropertyTypeId & | propertyTypeId | ) |
QStringList RPropertyEditor::getPropertyTitles | ( | const QString & | group | ) |
QVariant RPropertyEditor::getPropertyValue | ( | const RPropertyTypeId & | propertyTypeId | ) |
int RPropertyEditor::getTypeCount | ( | RS::EntityType | type | ) |
QList< RS::EntityType > RPropertyEditor::getTypes | ( | ) |
void RPropertyEditor::listPropertyChanged | ( | RPropertyTypeId | propertyTypeId, |
int | index, | ||
QVariant | propertyValue ) |
|
static |
void RPropertyEditor::propertyChanged | ( | RPropertyTypeId | propertyTypeId, |
QVariant | propertyValue, | ||
RS::MetaType | typeHint = RS::UnknownType ) |
|
virtual |
This method is called when a different layer becomes the new current layer.
Implements RLayerListener.
|
inline |
|
protectedvirtual |
Can be re-implemented to show custom app properties of the given type(s).
|
protectedvirtual |
Updates the property widget to include the properties of the given property owner.
|
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.
filter | RS::EntityUnknown to use same filter as previously used, any other value to change filter. |
Implements RPropertyListener.
void RPropertyEditor::updateFromDocumentNow | ( | RDocument * | document, |
bool | onlyChanges, | ||
RS::EntityType | filter = RS::EntityUnknown, | ||
bool | manual = false, | ||
bool | showOnRequest = false ) |
Implements updateFromObject from RPropertyListener to show properties for one single object.
Implements RPropertyListener.
|
inlineprotectedvirtual |
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.
|
virtual |
|
virtual |
This method is called whenever at least one layer in the given document has changed.
Implements RLayerListener.
|
protected |
Sets the property with the given name to the given value or to 'mixed' if that property exists already with a different value.
propertyTypeId | Id of the property. |
showOnRequest | True to show also slow properties shown on request. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
Copyright (c) 2011-2018 by Andrew Mustun.
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.
|
protected |
|
private |
|
protected |