summaryrefslogtreecommitdiff
path: root/tikzit/src/data/edge.h
blob: 5884b901412700e44f5d8ab6d47aff10b35a2f3a (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
#ifndef EDGE_H
#define EDGE_H

#include "graphelementdata.h"

#include <QObject>

class Node;

class Edge : public QObject
{
    Q_OBJECT
public:
    explicit Edge(Node *s, Node *t, QObject *parent = 0);
    ~Edge();

    Node *source() const;
    Node *target() const;

    GraphElementData *data() const;
    void setData(GraphElementData *data);

    QString sourceAnchor() const;
    void setSourceAnchor(const QString &sourceAnchor);

    QString targetAnchor() const;
    void setTargetAnchor(const QString &targetAnchor);

signals:

public slots:

private:
    Node *_source;
    Node *_target;
    GraphElementData *_data;
    QString _sourceAnchor;
    QString _targetAnchor;
};

#endif // EDGE_H