Part: Added getPaths(...) method to PropertyPartShape.
This commit is contained in:
parent
ddc22a4101
commit
3f0fc98d72
|
@ -53,6 +53,7 @@
|
|||
#include <Base/Stream.h>
|
||||
#include <App/Application.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/ObjectIdentifier.h>
|
||||
|
||||
#include "PropertyTopoShape.h"
|
||||
#include "TopoShapePy.h"
|
||||
|
@ -229,6 +230,20 @@ unsigned int PropertyPartShape::getMemSize (void) const
|
|||
return _Shape.getMemSize();
|
||||
}
|
||||
|
||||
void PropertyPartShape::getPaths(std::vector<App::ObjectIdentifier> &paths) const
|
||||
{
|
||||
paths.push_back(App::ObjectIdentifier(getContainer()) << App::ObjectIdentifier::Component::SimpleComponent(getName())
|
||||
<< App::ObjectIdentifier::Component::SimpleComponent(App::ObjectIdentifier::String("ShapeType")));
|
||||
paths.push_back(App::ObjectIdentifier(getContainer()) << App::ObjectIdentifier::Component::SimpleComponent(getName())
|
||||
<< App::ObjectIdentifier::Component::SimpleComponent(App::ObjectIdentifier::String("Orientation")));
|
||||
paths.push_back(App::ObjectIdentifier(getContainer()) << App::ObjectIdentifier::Component::SimpleComponent(getName())
|
||||
<< App::ObjectIdentifier::Component::SimpleComponent(App::ObjectIdentifier::String("Length")));
|
||||
paths.push_back(App::ObjectIdentifier(getContainer()) << App::ObjectIdentifier::Component::SimpleComponent(getName())
|
||||
<< App::ObjectIdentifier::Component::SimpleComponent(App::ObjectIdentifier::String("Area")));
|
||||
paths.push_back(App::ObjectIdentifier(getContainer()) << App::ObjectIdentifier::Component::SimpleComponent(getName())
|
||||
<< App::ObjectIdentifier::Component::SimpleComponent(App::ObjectIdentifier::String("Volume")));
|
||||
}
|
||||
|
||||
void PropertyPartShape::Save (Base::Writer &writer) const
|
||||
{
|
||||
if(!writer.isForceXML()) {
|
||||
|
|
|
@ -92,6 +92,9 @@ public:
|
|||
unsigned int getMemSize (void) const;
|
||||
//@}
|
||||
|
||||
/// Get valid paths for this property; used by auto completer
|
||||
virtual void getPaths(std::vector<App::ObjectIdentifier> & paths) const;
|
||||
|
||||
private:
|
||||
TopoShape _Shape;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user