From 4545000e325235c75cf58576f8b14d227979425a Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Wed, 7 Apr 2021 17:04:23 -0400 Subject: Make getNodeForMouseEvent public so it can be called from the python bindings --- ui/flowgraphwidget.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/flowgraphwidget.h b/ui/flowgraphwidget.h index ef2a4df7..6d759401 100644 --- a/ui/flowgraphwidget.h +++ b/ui/flowgraphwidget.h @@ -156,10 +156,6 @@ protected: virtual void scrollContentsBy(int dx, int dy) override; - bool getNodeForMouseEvent(QMouseEvent* event, FlowGraphNodeRef& node); - bool getLineForMouseEvent(QMouseEvent* event, CursorPosition& pos); - bool getEdgeForMouseEvent(QMouseEvent* event, FlowGraphNodeRef& source, - BinaryNinja::FlowGraphEdge& edge, bool& incoming); HighlightTokenState getTokenForMouseEvent(QMouseEvent* event); void showContextMenu(); @@ -292,6 +288,14 @@ public: static std::string getStringForRegisterValue(ArchitectureRef arch, BinaryNinja::RegisterValue value); static std::string getStringForPossibleValueSet(ArchitectureRef arch, const BinaryNinja::PossibleValueSet& values); +// protected: + // These APIs are really supposed to be protected but since the bindings need to call them + // and they have out parameters (and thus need to be re-implemented) they must be public + bool getNodeForMouseEvent(QMouseEvent* event, FlowGraphNodeRef& node); + bool getLineForMouseEvent(QMouseEvent* event, CursorPosition& pos); + bool getEdgeForMouseEvent(QMouseEvent* event, FlowGraphNodeRef& source, + BinaryNinja::FlowGraphEdge& edge, bool& incoming); + Q_SIGNALS: void layoutComplete(); void updateMiniGraph(); -- cgit v1.3.1