diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2017-01-20 11:25:28 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2017-01-20 11:25:28 +0100 |
commit | b4f6b3997ba1d1355a42e6d2cd90e7715a9f9114 (patch) | |
tree | a80940205e2e367c630c73d47f29a460ce638e9a /tikzit/graphelementproperty.cpp | |
parent | 36ccd03c70c305e155e00e663da725546f8f2fd9 (diff) |
directory structure
Diffstat (limited to 'tikzit/graphelementproperty.cpp')
-rw-r--r-- | tikzit/graphelementproperty.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/tikzit/graphelementproperty.cpp b/tikzit/graphelementproperty.cpp deleted file mode 100644 index 9cc6b00..0000000 --- a/tikzit/graphelementproperty.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "graphelementproperty.h" - -GraphElementProperty::GraphElementProperty (): - _key(""), _value(""), _atom(false), _keyMatch(false) -{} - -GraphElementProperty::GraphElementProperty(QString key, QString value, bool atom, bool keyMatch) : - _key(key), _value(value), _atom(atom), _keyMatch(keyMatch) -{} - -GraphElementProperty::GraphElementProperty(QString key, QString value) : - _key(key), _value(value), _atom(false), _keyMatch(false) -{} - -GraphElementProperty::GraphElementProperty(QString key, bool keyMatch) : - _key(key), _value(""), _atom(!keyMatch), _keyMatch(keyMatch) -{} - -QString GraphElementProperty::key() const -{ return _key; } - -QString GraphElementProperty::value() const -{ return _value; } - -void GraphElementProperty::setValue(const QString &value) -{ _value = value; } - -bool GraphElementProperty::atom() const -{ return _atom; } - -bool GraphElementProperty::keyMatch() const -{ return _keyMatch; } - -bool GraphElementProperty::matches(const GraphElementProperty &p) -{ - if (p.atom()) return _atom && _key == p.key(); - if (p.keyMatch()) return !_atom && _key == p.key(); - if (_keyMatch) return !p.atom() && _key == p.key(); - return !_atom && _key == p.key() && _value == p.value(); -} - -bool GraphElementProperty::operator==(const GraphElementProperty &p) -{ - return matches(p); -} |