X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fgui%2Fwidgets%2FCFGScene.hxx;h=094233c0e11ccb4b17c95fb2d76193cfcc8a6eb3;hp=6baa618049d54b113930d86f64eeb01e0c94ee4d;hb=7e983f239ca96faf5c8ba92cd4de54eba5235f75;hpb=6cc8f405b8d89a53f655625fe05506009130fd81 diff --git a/src/gui/widgets/CFGScene.hxx b/src/gui/widgets/CFGScene.hxx index 6baa618..094233c 100644 --- a/src/gui/widgets/CFGScene.hxx +++ b/src/gui/widgets/CFGScene.hxx @@ -8,23 +8,26 @@ class CFGScene : public QGraphicsScene { public: - 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); - } - - virtual void drawBackground(QPainter* painter, const QRectF & rect); + CFGScene(QWidget * parent = 0) + : QGraphicsScene(parent), highlightedBlock(NULL) {} + + // 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); + void highlightBlock(BasicBlockWidget* block); private: - std::vector widgets; + std::vector widgets; + + void drawLine(QPainter* painter, BasicBlockWidget * from, BasicBlockWidget * to, int8_t side = 0); - void drawLine(QPainter* painter, QPointF from, QPointF to, bool left = true); + void spaceWidgets(); - void spaceWidgets(); + BasicBlockWidget* highlightedBlock; }; #endif