1 #ifndef INCLUDE__CFGScene_hxx
2 #define INCLUDE__CFGScene_hxx
5 #include "BasicBlockWidget.hxx"
9 class CFGScene : public QGraphicsScene {
11 CFGScene(QWidget * parent = 0)
12 : QGraphicsScene(parent), highlightedBlock(NULL) {}
14 // Take special care when adding a BasicBlock to the scene as we
15 // need to draw arrows for it later on
16 void addItem(BasicBlockWidget* block) {
17 widgets.push_back(block);
18 QGraphicsScene::addItem(block);
21 virtual void drawBackground(QPainter* painter, const QRectF & rect);
22 void highlightBlock(BasicBlockWidget* block);
24 std::vector<BasicBlockWidget*> widgets;
26 void drawLine(QPainter* painter, BasicBlockWidget * from, BasicBlockWidget * to,
31 BasicBlockWidget* highlightedBlock;