Added getPaths(...) to PropertyVector class.

This commit is contained in:
Eivind Kvedalen
2017-07-21 16:30:39 +02:00
committed by wmayer
parent 05fad5e1f0
commit 705bb1c56e
2 changed files with 12 additions and 0 deletions

View File

@@ -191,6 +191,15 @@ void PropertyVector::Paste(const Property &from)
hasSetValue();
}
void PropertyVector::getPaths(std::vector<ObjectIdentifier> &paths) const
{
paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName())
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("x")));
paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName())
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("y")));
paths.push_back(ObjectIdentifier(getContainer()) << ObjectIdentifier::Component::SimpleComponent(getName())
<< ObjectIdentifier::Component::SimpleComponent(ObjectIdentifier::String("z")));
}
//**************************************************************************
// PropertyVectorDistance

View File

@@ -75,6 +75,9 @@ public:
void setValue(const Base::Vector3d &vec);
void setValue(double x, double y, double z);
/// Get valid paths for this property; used by auto completer
void getPaths(std::vector<ObjectIdentifier> &paths) const;
/** This method returns a string representation of the property
*/
const Base::Vector3d &getValue(void) const;