diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-03-12 21:44:49 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-03-12 21:44:49 +0100 |
commit | 39c2c74c664a6c770639ead8f45322352cacb997 (patch) | |
tree | e93bf563eef3c3cd9762b36d06205b91e35a33db /src/data/nodestyle.h | |
parent | 09c331761648541de907c866c56fb6084c6f7a9b (diff) |
style loading works
Diffstat (limited to 'src/data/nodestyle.h')
-rw-r--r-- | src/data/nodestyle.h | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/src/data/nodestyle.h b/src/data/nodestyle.h index 00d1b20..58c0c12 100644 --- a/src/data/nodestyle.h +++ b/src/data/nodestyle.h @@ -1,24 +1,40 @@ #ifndef NODESTYLE_H #define NODESTYLE_H +#include "graphelementdata.h" + #include <QColor> +#include <QPen> +#include <QBrush> +#include <QPainterPath> +#include <QIcon> enum NodeShape { - Square, UpTriangle, DownTriangle, Circle + Rectangle, UpTriangle, DownTriangle, Circle }; class NodeStyle { public: NodeStyle(); - NodeStyle(QString nm, NodeShape sh, QColor fillCol); - NodeStyle(QString nm, NodeShape sh, QColor fillCol, QColor strokeCol, int strokeThick); + NodeStyle(QString name, GraphElementData *data); bool isNone(); - QString name; - NodeShape shape; - QColor fillColor; - QColor strokeColor; - int strokeThickness; + + GraphElementData *data() const; + QString name() const; + NodeShape shape() const; + QColor fillColor() const; + QColor strokeColor() const; + int strokeThickness() const; + + QPen pen() const; + QBrush brush() const; + QPainterPath path() const; + QPainterPath palettePath() const; + QIcon icon() const; +private: + QString _name; + GraphElementData *_data; }; extern NodeStyle *noneStyle; |