From 39c2c74c664a6c770639ead8f45322352cacb997 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Mon, 12 Mar 2018 21:44:49 +0100 Subject: style loading works --- src/data/nodestyle.h | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'src/data/nodestyle.h') 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 +#include +#include +#include +#include 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; -- cgit v1.2.3