diff options
Diffstat (limited to 'tikzit/src/data/graphelementproperty.h')
-rw-r--r-- | tikzit/src/data/graphelementproperty.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tikzit/src/data/graphelementproperty.h b/tikzit/src/data/graphelementproperty.h new file mode 100644 index 0000000..4e8bbd1 --- /dev/null +++ b/tikzit/src/data/graphelementproperty.h @@ -0,0 +1,38 @@ +#ifndef GRAPHELEMENTPROPERTY_H +#define GRAPHELEMENTPROPERTY_H + +#include <QObject> + +class GraphElementProperty +{ +public: + GraphElementProperty(); + GraphElementProperty(QString key, QString value, bool atom, bool keyMatch); + + // construct a property + GraphElementProperty(QString key, QString value); + + // construct an atom or keymatch + GraphElementProperty(QString key, bool keyMatch = false); + + QString key() const; + QString value() const; + void setValue(const QString &value); + bool atom() const; + bool keyMatch() const; + + bool matches(const GraphElementProperty &p); + bool operator==(const GraphElementProperty &p); + +signals: + +public slots: + +private: + QString _key; + QString _value; + bool _atom; + bool _keyMatch; +}; + +#endif // GRAPHELEMENTPROPERTY_H |