diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-01-04 16:00:52 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-01-04 16:00:52 +0100 |
commit | 738ecbd5fad2b46836bfd6a94aeebf165ae2bbca (patch) | |
tree | df04709807cc9ec8481a3ebc7d80ac25e5b2f457 /src/data/graphelementproperty.h | |
parent | 0421a96749743868554d44585050b1b3d04864d2 (diff) |
relocated source code to the root
Diffstat (limited to 'src/data/graphelementproperty.h')
-rw-r--r-- | src/data/graphelementproperty.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/data/graphelementproperty.h b/src/data/graphelementproperty.h new file mode 100644 index 0000000..01b6e5a --- /dev/null +++ b/src/data/graphelementproperty.h @@ -0,0 +1,40 @@ +#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); + + static QString tikzEscape(QString str); + QString tikz(); +signals: + +public slots: + +private: + QString _key; + QString _value; + bool _atom; + bool _keyMatch; +}; + +#endif // GRAPHELEMENTPROPERTY_H |