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=fb395f71f579669b06a87e7662fac322802749f8;hb=7e983f239ca96faf5c8ba92cd4de54eba5235f75;hpb=9230b2cf1a95c50e2bf0b4ca8e214bddd45cf65f diff --git a/src/gui/widgets/CFGScene.hxx b/src/gui/widgets/CFGScene.hxx index fb395f7..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, BasicBlockWidget * from, BasicBlockWidget * to, int8_t side = 0); + void spaceWidgets(); - void spaceWidgets(); + BasicBlockWidget* highlightedBlock; }; #endif