X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fgui%2Fwidgets%2FCFGScene.hxx;h=0efacfd2c98b2d2a6941cbb24f0c99ada2440098;hp=6baa618049d54b113930d86f64eeb01e0c94ee4d;hb=98e46099f6366309366ea54fc4b97fd5cb383fa7;hpb=6cc8f405b8d89a53f655625fe05506009130fd81 diff --git a/src/gui/widgets/CFGScene.hxx b/src/gui/widgets/CFGScene.hxx index 6baa618..0efacfd 100644 --- a/src/gui/widgets/CFGScene.hxx +++ b/src/gui/widgets/CFGScene.hxx @@ -1,30 +1,33 @@ #ifndef INCLUDE__CFGScene_hxx #define INCLUDE__CFGScene_hxx -#include "gui/qt.hxx" +#include "qt.hxx" #include "BasicBlockWidget.hxx" #include 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