class CFGScene : public QGraphicsScene {
public:
- CFGScene(QWidget * parent = 0)
- : QGraphicsScene(parent) {}
+ CFGScene(QWidget * parent = 0)
+ : QGraphicsScene(parent) {}
- // Take special care when adding a BasicBlock to the scene as we
- // need to draw arrows for it later on
- void addItem(BasicBlockWidget* block) {
- widgets.push_back(block);
- QGraphicsScene::addItem(block);
- }
+ // Take special care when adding a BasicBlock to the scene as we
+ // need to draw arrows for it later on
+ void addItem(BasicBlockWidget* block) {
+ widgets.push_back(block);
+ QGraphicsScene::addItem(block);
+ }
- virtual void drawBackground(QPainter* painter, const QRectF & rect);
+ virtual void drawBackground(QPainter* painter, const QRectF & rect);
private:
- std::vector<BasicBlockWidget*> widgets;
+ std::vector<BasicBlockWidget*> widgets;
- void drawLine(QPainter* painter, QPointF from, QPointF to, bool left = true);
+ void drawLine(QPainter* painter, BasicBlockWidget * from, BasicBlockWidget * to, int8_t side = 0);
- void spaceWidgets();
+ void spaceWidgets();
};
#endif