diff options
Diffstat (limited to 'src/data/graphelementdata.cpp')
-rw-r--r-- | src/data/graphelementdata.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/data/graphelementdata.cpp b/src/data/graphelementdata.cpp index 931f86a..d2146d9 100644 --- a/src/data/graphelementdata.cpp +++ b/src/data/graphelementdata.cpp @@ -265,3 +265,29 @@ QVector<GraphElementProperty> GraphElementData::properties() const {
return _properties;
}
+
+GraphElementData *GraphElementData::pathData() const
+{
+ GraphElementData *d = new GraphElementData();
+ foreach(GraphElementProperty p, _properties) {
+ if (isPathProperty(p.key())) d->add(p);
+ }
+ return d;
+}
+
+GraphElementData *GraphElementData::nonPathData() const
+{
+ GraphElementData *d = new GraphElementData();
+ foreach(GraphElementProperty p, _properties) {
+ if (!isPathProperty(p.key())) d->add(p);
+ }
+ return d;
+}
+
+bool GraphElementData::isPathProperty(QString key)
+{
+ return (key == "bend left" ||
+ key == "bend right" ||
+ key == "in" ||
+ key == "out");
+}
|