summaryrefslogtreecommitdiff
path: root/tikzit/src/gui/tikzscene.h
blob: c7039e6ffee722154057f86f68f28bf356f173ec (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
#ifndef TIKZSCENE_H
#define TIKZSCENE_H

#include "graph.h"
#include "nodeitem.h"

#include <QWidget>
#include <QGraphicsScene>
#include <QPainter>
#include <QRectF>
#include <QVector>
#include <QGraphicsEllipseItem>

class TikzScene : public QGraphicsScene
{
    Q_OBJECT
public:
    TikzScene(Graph *graph, QObject *parent);
    Graph *graph() const;
    void setGraph(Graph *graph);
public slots:
    void graphReplaced();

private:
    Graph *_graph;
    QVector<NodeItem*> nodeItems;

protected:
    void drawBackground(QPainter *painter, const QRectF &rect);
};

#endif // TIKZSCENE_H