summaryrefslogtreecommitdiff
path: root/src/data/nodestyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/nodestyle.h')
-rw-r--r--src/data/nodestyle.h32
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;