summaryrefslogtreecommitdiff
path: root/src/data/nodestyle.h
blob: 0b9f282ad46ce63654a54cd47bdd66804e373a9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef NODESTYLE_H
#define NODESTYLE_H

#include "graphelementdata.h"

#include <QColor>
#include <QPen>
#include <QBrush>
#include <QPainterPath>
#include <QIcon>

class NodeStyle
{
public:
    enum Shape {
        Rectangle, UpTriangle, DownTriangle, Circle
    };

    NodeStyle();
    NodeStyle(QString name, GraphElementData *data);
    bool isNone();

    GraphElementData *data() const;
    QString name() const;
    Shape 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;

#endif // NODESTYLE_H