Helper class to implement PropertyLists. More...
#include <Property.h>
Public Types | |
typedef AtomicPropertyChangeInterface< PropertyListsT< T, ListT, ParentT > >::AtomicPropertyChange atomic_change | |
typedef ListT::const_reference const_reference | |
typedef ListT list_type | |
typedef ParentT parent_type | |
![]() | |
enum Status { Touched = 0, Immutable = 1, ReadOnly = 2, Hidden = 3, Transient = 4, MaterialEdit = 5, NoMaterialListEdit = 6, Output = 7, LockDynamic = 8, NoModify = 9, PartialTrigger = 10, NoRecompute = 11, Single = 12, Ordered = 13, EvalOnRestore = 14, PropStaticBegin = 21, PropDynamic = 21, PropNoPersist = 22, PropNoRecompute = 23, PropReadOnly = 24, PropTransient = 25, PropHidden = 26, PropOutput = 27, PropStaticEnd = 28, User1 = 28, User2 = 29, User3 = 30, User4 = 31 } | |
Public Member Functions | |
virtual int getSize (void) const override | |
const ListT & getValue (void) const | |
const ListT & getValues (void) const | |
const_reference operator[] (int idx) const | |
virtual void set1Value (int index, const_reference value) | |
virtual void setPyObject (PyObject *value) override | |
virtual void setSize (int newSize) override | |
virtual void setSize (int newSize, const_reference def) | |
void setValue (const ListT &newValues=ListT()) | |
void setValue (const_reference value) | |
virtual void setValues (const ListT &newValues=ListT()) | |
![]() | |
bool isOrderRelevant () const | |
void setOrderRelevant (bool on) | |
![]() | |
virtual void aboutToSetChildValue (Property &) | |
Called before a child property changing value. More... | |
virtual void afterRestore () | |
Called at the beginning of Document::afterRestore() More... | |
virtual App::ObjectIdentifier canonicalPath (const App::ObjectIdentifier &p) const | |
Convert p to a canonical representation of it. More... | |
virtual Property * Copy (void) const =0 | |
Returns a new copy of the property (mainly for Undo/Redo and transactions) More... | |
PropertyContainer * getContainer (void) const | |
Get a pointer to the PropertyContainer derived class the property belongs to. More... | |
const char * getDocumentation (void) const | |
Get the documentation of this property. More... | |
virtual const char * getEditorName (void) const | |
Get the class name of the associated property editor item. More... | |
std::string getFullName () const | |
const char * getGroup (void) const | |
Get the group of this property. More... | |
virtual unsigned int getMemSize (void) const override | |
This method is used to get the size of objects It is not meant to have the exact size, it is more or less an estimation which runs fast! Is it two bytes or a GB? This method is defined in Base::Persistence. More... | |
const char * getName (void) const | |
get the name of this property in the belonging container More... | |
virtual void getPaths (std::vector< App::ObjectIdentifier > &paths) const | |
Get valid paths for this property; used by auto completer. More... | |
virtual const boost::any getPathValue (const App::ObjectIdentifier &path) const | |
Get value of property. More... | |
virtual bool getPyPathValue (const App::ObjectIdentifier &, Py::Object &) const | |
Get Python value of property. More... | |
unsigned long getStatus () const | |
return the status bits More... | |
short getType (void) const | |
Get the type of the property in the container. More... | |
virtual void hasSetChildValue (Property &) | |
Called when a child property has changed value. More... | |
bool isReadOnly () const | |
bool isSinglePrecision () const | |
Gets precision of properties using floating point numbers. More... | |
bool isTouched (void) const | |
Test if this property is touched. More... | |
virtual void onContainerRestored () | |
Called before calling DocumentObject::onDocumentRestored() More... | |
virtual void Paste (const Property &from)=0 | |
Paste the value from the property (mainly for Undo/Redo and transactions) More... | |
Property () | |
void purgeTouched (void) | |
Reset this property touched. More... | |
void setContainer (PropertyContainer *Father) | |
Is called by the framework to set the father (container) More... | |
virtual void setPathValue (const App::ObjectIdentifier &path, const boost::any &value) | |
Set value of property. More... | |
void setReadOnly (bool readOnly) | |
Sets property editable/grayed out in property editor. More... | |
void setSinglePrecision (bool single) | |
Sets precision of properties using floating point numbers to single, the default is double. More... | |
void setStatus (Status pos, bool on) | |
void setStatusValue (unsigned long status) | |
bool testStatus (Status pos) const | |
void touch () | |
Property status handling. More... | |
virtual ~Property () | |
![]() | |
void dumpToStream (std::ostream &stream, int compression) | |
virtual Base::Type getTypeId (void) const | |
virtual void Restore (XMLReader &)=0 | |
This method is used to restore properties from an XML document. More... | |
virtual void RestoreDocFile (Reader &) | |
This method is used to restore large amounts of data from a file In this method you simply stream in your SaveDocFile() saved data. More... | |
void restoreFromStream (std::istream &stream) | |
virtual void Save (Writer &) const =0 | |
This method is used to save properties to an XML document. More... | |
virtual void SaveDocFile (Writer &) const | |
This method is used to save large amounts of data to a binary file. More... | |
![]() | |
BaseClass () | |
Construction. More... | |
virtual PyObject * getPyObject (void) | |
This method returns the Python wrapper for a C++ object. More... | |
bool isDerivedFrom (const Type type) const | |
virtual ~BaseClass () | |
Destruction. More... | |
![]() | |
void clearTouchList () | |
const std::set< int > & getTouchList () const | |
Public Attributes | |
friend atomic_change | |
Protected Member Functions | |
virtual T getPyValue (PyObject *item) const =0 | |
void setPyValues (const std::vector< PyObject * > &vals, const std::vector< int > &indices) override | |
![]() | |
virtual void aboutToSetValue (void) | |
Gets called by all setValue() methods before the value has changed. More... | |
virtual void hasSetValue (void) | |
Gets called by all setValue() methods after the value has changed. More... | |
virtual void verifyPath (const App::ObjectIdentifier &p) const | |
Verify a path for the current property. More... | |
![]() | |
AtomicPropertyChangeInterface () | |
Additional Inherited Members | |
![]() | |
static void destroy (Property *p) | |
For safe deleting of a dynamic property. More... | |
![]() | |
static void * create (void) | |
static std::string encodeAttribute (const std::string &) | |
Encodes an attribute upon saving. More... | |
static Base::Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static void * create (void) | |
static Type getClassTypeId (void) | |
static void init (void) | |
![]() | |
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) | |
![]() | |
std::bitset< 32 > StatusBits | |
Status bits of the property The first 8 bits are used for the base system the rest can be used in descendent classes to mark special statuses on the objects. More... | |
![]() | |
bool hasChanged | |
int signalCounter | |
Counter for invoking transaction start/stop. More... | |
Detailed Description
template<class T, class ListT = std::vector<T>, class ParentT = PropertyLists>
class App::PropertyListsT< T, ListT, ParentT >
Helper class to implement PropertyLists.
Member Typedef Documentation
◆ atomic_change
typedef AtomicPropertyChangeInterface< PropertyListsT<T,ListT,ParentT> >::AtomicPropertyChange App::PropertyListsT< T, ListT, ParentT >::atomic_change |
◆ const_reference
typedef ListT::const_reference App::PropertyListsT< T, ListT, ParentT >::const_reference |
◆ list_type
typedef ListT App::PropertyListsT< T, ListT, ParentT >::list_type |
◆ parent_type
typedef ParentT App::PropertyListsT< T, ListT, ParentT >::parent_type |
Member Function Documentation
◆ getPyValue()
|
protectedpure virtual |
Implemented in App::PropertyStringList, App::PropertyLinkList, App::PropertyFloatList, App::PropertyIntegerList, App::PropertyMaterialList, App::PropertyColorList, App::PropertyBoolList, App::PropertyPlacementList, and App::PropertyVectorList.
Referenced by App::PropertyListsT< Base::Placement >::setPyObject(), and App::PropertyListsT< Base::Placement >::setPyValues().
◆ getSize()
|
overridevirtual |
Implements App::PropertyListsBase.
Referenced by TechDraw::DrawViewCollection::addView(), Gui::ViewProviderLink::applyMaterial(), Part::Loft::execute(), Part::Sweep::execute(), Fem::FemVTKTools::exportFreeCADResult(), PartGui::ViewProviderPartExt::getElementColors(), Gui::ViewProviderLink::getElementColors(), Drawing::FeaturePage::onBeforeChange(), App::VRMLObject::onChanged(), Drawing::FeaturePage::onChanged(), MeshGui::ViewProviderMesh::removeFacets(), App::GroupExtension::removeObjectsFromDocument(), TechDraw::DrawViewCollection::removeView(), App::VRMLObject::Restore(), App::VRMLObject::RestoreDocFile(), App::VRMLObject::SaveDocFile(), App::PropertyListsT< Base::Placement >::set1Value(), PointsGui::ViewProviderPoints::setDisplayMode(), PartDesignGui::ViewProviderTransformed::startEditing(), MeshGui::ViewProviderMesh::tryColorPerVertexOrFace(), Gui::ViewProviderVRMLObject::updateData(), and Gui::ViewProviderLink::updateElementList().
◆ getValue()
const ListT& App::PropertyListsT< T, ListT, ParentT >::getValue | ( | void | ) | const |
◆ getValues()
const ListT& App::PropertyListsT< T, ListT, ParentT >::getValues | ( | void | ) | const |
Referenced by PartDesignGui::TaskDlgLoftParameters::accept(), PartDesignGui::TaskDlgPipeParameters::accept(), TechDrawGui::MDIViewPage::addChildrenToPage(), PartDesign::Body::addObject(), App::GroupExtension::addObjects(), App::GeoFeatureGroupExtension::addObjects(), TechDraw::DrawProjGroup::addProjection(), TechDraw::DrawViewCollection::addView(), TechDraw::DrawLeaderLine::adjustLastSegment(), TechDraw::DrawProjGroup::arrangeViewPointers(), TechDraw::DrawProjGroup::autoPositionChildren(), Gui::ViewProviderColorBuilder::buildNodes(), TechDrawGui::TaskRichAnno::calcTextStartPos(), TechDraw::DrawViewDimExtent::checkReferences2D(), PartDesignGui::ViewProviderMultiTransform::claimChildren(), FemGui::ViewProviderFemPostPipeline::claimChildren(), PartDesignGui::ViewProviderLoft::claimChildren(), PartDesignGui::ViewProviderPipe::claimChildren(), TechDrawGui::ViewProviderProjGroup::claimChildren(), TechDrawGui::ViewProviderViewClip::claimChildren(), PartGui::ViewProviderSweep::claimChildren(), TechDraw::DrawViewCollection::countChildren(), App::GroupExtension::countObjectsOfType(), PartGui::ViewProviderFace::dragObject(), PathGui::ViewProviderPathShape::dragObject(), PartGui::ViewProviderCompound::dragObject(), PartGui::ViewProviderMultiFuse::dragObject(), PathGui::ViewProviderArea::dragObject(), PartGui::ViewProviderMultiCommon::dragObject(), PartGui::ViewProviderFace::dropObject(), PartDesignGui::ViewProviderBody::dropObject(), PathGui::ViewProviderPathShape::dropObject(), PartGui::ViewProviderCompound::dropObject(), PartGui::ViewProviderMultiFuse::dropObject(), PathGui::ViewProviderArea::dropObject(), PartGui::ViewProviderMultiCommon::dropObject(), TechDraw::DrawProjGroup::dumpISO(), TechDraw::LandmarkDimension::execute(), Part::MultiCommon::execute(), Part::MultiFuse::execute(), Part::Face::execute(), Part::Compound::execute(), PartDesign::Loft::execute(), TechDraw::DrawViewDimExtent::execute(), PartDesign::Pipe::execute(), Path::FeatureArea::execute(), PartDesign::Boolean::execute(), Drawing::FeaturePage::execute(), Part::Loft::execute(), Path::FeatureShape::execute(), PartDesign::Transformed::execute(), Part::Sweep::execute(), Inspection::Feature::execute(), Fem::FemVTKTools::exportFreeCADResult(), Import::ExportOCAF::exportObject(), Gui::ViewProviderGeoFeatureGroupExtension::extensionClaimChildren(), App::GroupExtension::extensionGetSubObject(), App::GeoFeatureGroupExtension::extensionGetSubObject(), App::GroupExtension::extensionGetSubObjects(), App::GeoFeatureGroupExtension::extensionGetSubObjects(), App::GeoFeatureGroupExtension::extensionOnChanged(), App::GroupExtension::extensionOnChanged(), TechDrawGui::MDIViewPage::findMissingViews(), TechDrawGui::QGVPage::findParent(), App::GroupExtension::getAllChildren(), TechDraw::DrawProjGroup::getAllSources(), TechDraw::DrawViewPart::getAllSources(), TechDraw::DrawPage::getAllViews(), PartDesign::Transformed::getBaseObject(), TechDraw::DrawProjGroup::getBoundingBox(), TechDrawGui::QGEPath::getDeltasFromLeader(), TechDraw::DrawLeaderLine::getKinkPoint(), PartDesign::Body::getNextSolidFeature(), App::GroupExtension::getObjects(), App::GroupExtension::getObjectsOfType(), App::Origin::getOriginFeature(), TechDraw::DrawViewDimExtent::getPointsTwoVerts(), PartDesign::Body::getPrevSolidFeature(), TechDraw::DrawProjGroup::getProjObj(), TechDraw::DrawViewCollection::getRect(), TechDraw::ShapeExtractor::getShapes2d(), TechDraw::ShapeExtractor::getShapesFromObject(), PartDesign::Transformed::getSketchObject(), PartDesign::Body::getSubObject(), TechDraw::DrawLeaderLine::getTailPoint(), TechDraw::DrawLeaderLine::getTileOrigin(), PartDesign::MultiTransform::getTransformations(), PartDesignGui::TaskMultiTransformParameters::getTransformFeatures(), App::PropertyListsT< Base::Placement >::getValue(), TechDraw::DrawProjGroup::getViewsAsDPGI(), TechDrawGui::QGILeaderLine::getWayPointsFromFeature(), App::GroupExtension::hasObject(), App::Origin::hasObject(), TechDraw::DrawProjGroup::hasProjection(), PartDesignGui::ViewProviderDressUp::highlightReferences(), PartDesignGui::ViewProviderShapeBinder::highlightReferences(), PartDesignGui::ViewProviderPipe::highlightReferences(), PartDesign::Body::insertObject(), PartDesign::Body::isMemberOfMultiTransform(), TechDrawGui::TaskLinkDim::loadAvailDims(), TechDraw::DrawViewCollection::lockChildren(), PartDesignGui::ViewProvider::onChanged(), App::VRMLObject::onChanged(), PartDesign::Body::onChanged(), PartGui::ViewProviderPartExt::onChanged(), PartDesignGui::ViewProviderMultiTransform::onDelete(), PathGui::ViewProviderPathShape::onDelete(), PartGui::ViewProviderCompound::onDelete(), PathGui::ViewProviderArea::onDelete(), PartGui::ViewProviderMultiFuse::onDelete(), PartDesignGui::ViewProviderBoolean::onDelete(), Gui::ViewProviderOrigin::onDelete(), PartGui::ViewProviderMultiCommon::onDelete(), PartDesign::Body::onDocumentRestored(), PartDesignGui::TaskBooleanParameters::onSelectionChanged(), SurfaceGui::FillingUnboundPanel::onSelectionChanged(), SurfaceGui::FillingPanel::onSelectionChanged(), TechDrawGui::TaskLeaderLine::onTrackerClicked(), PartDesignGui::TaskTransformedParameters::originalSelected(), TechDrawGui::MDIViewPage::orphanExists(), PartDesign::MultiTransform::positionBySupport(), PartGui::FaceColors::Private::Private(), TechDraw::DrawProjGroup::purgeProjections(), TechDraw::DrawViewCollection::rebuildViewList(), TechDraw::DrawProjGroup::recomputeChildren(), PartDesignGui::TaskPipeParameters::referenceSelected(), PartDesignGui::relinkToBody(), MeshGui::ViewProviderMesh::removeFacets(), PartDesign::Body::removeObject(), App::GroupExtension::removeObjects(), App::GeoFeatureGroupExtension::removeObjects(), App::GroupExtension::removeObjectsFromDocument(), TechDraw::DrawProjGroup::removeProjection(), TechDraw::DrawViewCollection::removeView(), App::VRMLObject::Restore(), App::VRMLObject::Save(), TechDrawGui::TaskProjGroup::saveGroupState(), TechDrawGui::TaskLeaderLine::saveState(), MeshGui::ViewProviderMesh::setColorPerFace(), MeshGui::ViewProviderMesh::setColorPerVertex(), SurfaceGui::FillingUnboundPanel::setEditedObject(), SurfaceGui::FillingPanel::setEditedObject(), Gui::ViewProviderLink::setElementColors(), App::PropertyLinkSubList::setPyObject(), App::PropertyXLinkList::setPyObject(), PointsGui::ViewProviderPoints::setVertexColorMode(), PartDesignGui::ViewProviderBody::setVisualBodyMode(), PartDesignGui::TaskBooleanParameters::TaskBooleanParameters(), FemGui::TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(), FemGui::TaskFemConstraintTransform::TaskFemConstraintTransform(), PartDesignGui::TaskLoftParameters::TaskLoftParameters(), PartDesignGui::TaskMultiTransformParameters::TaskMultiTransformParameters(), PartDesignGui::TaskPipeScaling::TaskPipeScaling(), PathGui::TaskWidgetPathCompound::TaskWidgetPathCompound(), PartDesignGui::ViewProviderBody::unifyVisualProperty(), TechDraw::LandmarkDimension::unsetupObject(), TechDraw::DrawViewDimExtent::unsetupObject(), TechDraw::DrawViewCollection::unsetupObject(), App::Origin::unsetupObject(), TechDraw::DrawProjGroup::updateChildrenEnforce(), TechDraw::DrawProjGroup::updateChildrenLock(), TechDraw::DrawProjGroup::updateChildrenScale(), TechDraw::DrawProjGroup::updateChildrenSource(), PartDesignGui::ViewProviderBody::updateData(), FemGui::ViewProviderFemConstraintPressure::updateData(), PartGui::ViewProviderMultiFuse::updateData(), FemGui::ViewProviderFemConstraintForce::updateData(), FemGui::ViewProviderFemConstraintFixed::updateData(), FemGui::ViewProviderFemConstraintFluidBoundary::updateData(), PartGui::ViewProviderBoolean::updateData(), FemGui::ViewProviderFemConstraintPlaneRotation::updateData(), FemGui::ViewProviderFemConstraintTemperature::updateData(), FemGui::ViewProviderFemConstraintContact::updateData(), FemGui::ViewProviderFemConstraintHeatflux::updateData(), FemGui::ViewProviderFemConstraintTransform::updateData(), PartGui::ViewProviderFillet::updateData(), PartGui::ViewProviderCompound::updateData(), PartGui::ViewProviderMultiCommon::updateData(), PartGui::ViewProviderChamfer::updateData(), TechDraw::DrawProjGroup::updateSecondaryDirs(), App::PropertyXLinkSubList::upgrade(), and Part::TopoShapePy::writeInventor().
◆ operator[]()
const_reference App::PropertyListsT< T, ListT, ParentT >::operator[] | ( | int | idx | ) | const |
◆ set1Value()
|
virtual |
◆ setPyObject()
|
overridevirtual |
Reimplemented from App::PropertyLists.
Reimplemented in App::PropertyBoolList.
Referenced by Gui::LinkViewPy::setChildren(), Gui::LinkViewPy::setLink(), App::PropertyLinkSubList::setPyObject(), App::PropertyXLinkList::setPyObject(), and Part::TopoShapePy::writeInventor().
◆ setPyValues()
|
overrideprotectedvirtual |
Reimplemented from App::PropertyListsBase.
◆ setSize() [1/2]
|
overridevirtual |
Implements App::PropertyListsBase.
Reimplemented in App::PropertyLinkList.
◆ setSize() [2/2]
|
virtual |
Reimplemented in App::PropertyLinkList.
Referenced by App::VRMLObject::onChanged(), App::VRMLObject::Restore(), App::PropertyListsT< Base::Placement >::set1Value(), and Gui::ViewProviderLink::updateElementList().
◆ setValue() [1/2]
void App::PropertyListsT< T, ListT, ParentT >::setValue | ( | const ListT & | newValues = ListT() | ) |
◆ setValue() [2/2]
void App::PropertyListsT< T, ListT, ParentT >::setValue | ( | const_reference | value | ) |
◆ setValues()
|
virtual |
Reimplemented in App::PropertyLinkList.
Referenced by TechDraw::DrawLeaderLine::adjustLastSegment(), Fem::ConstraintFluidBoundary::ConstraintFluidBoundary(), Fem::ConstraintHeatflux::ConstraintHeatflux(), Fem::ConstraintTemperature::ConstraintTemperature(), Fem::ConstraintTransform::ConstraintTransform(), TechDrawGui::TaskLeaderLine::createLeaderFeature(), PartDesignGui::ViewProviderDressUp::highlightReferences(), PartDesignGui::ViewProviderShapeBinder::highlightReferences(), PartDesignGui::ViewProviderPipe::highlightReferences(), Fem::ConstraintPressure::onChanged(), Fem::ConstraintPlaneRotation::onChanged(), Fem::ConstraintFixed::onChanged(), Fem::ConstraintTransform::onChanged(), Fem::ConstraintHeatflux::onChanged(), Fem::ConstraintInitialTemperature::onChanged(), Fem::ConstraintTemperature::onChanged(), Fem::ConstraintContact::onChanged(), Fem::ConstraintFluidBoundary::onChanged(), Fem::ConstraintDisplacement::onChanged(), SurfaceGui::FillingUnboundPanel::onSelectionChanged(), SurfaceGui::FillingPanel::onSelectionChanged(), MeshGui::ViewProviderMesh::removeFacets(), TechDrawGui::TaskLeaderLine::restoreState(), Gui::ViewProviderLink::setElementColors(), App::PropertyListsT< Base::Placement >::setPyValues(), App::PropertyListsT< Base::Placement >::setValue(), PartGui::ViewProviderMultiFuse::updateData(), PartGui::ViewProviderBoolean::updateData(), PartGui::ViewProviderCompound::updateData(), PartGui::ViewProviderFillet::updateData(), PartGui::ViewProviderMultiCommon::updateData(), and PartGui::ViewProviderChamfer::updateData().
Member Data Documentation
◆ atomic_change
friend App::PropertyListsT< T, ListT, ParentT >::atomic_change |
The documentation for this class was generated from the following file:
- src/App/Property.h