summaryrefslogtreecommitdiff
path: root/ui/minigraph.h
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2021-11-18 13:52:25 -0500
committerRusty Wagner <rusty.wagner@gmail.com>2022-01-10 15:25:18 -0700
commit7f6e54fdc8ff4a06fdcd3c510a37add337f04bac (patch)
tree60cce5955fcc05fc84f35f9662d49c7e0790dde1 /ui/minigraph.h
parentd9661f34eec6855d495a10eaafc2a8e2679756a7 (diff)
Refactor main area to use pane system
Diffstat (limited to 'ui/minigraph.h')
-rw-r--r--ui/minigraph.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/ui/minigraph.h b/ui/minigraph.h
index 90a0c318..69b59768 100644
--- a/ui/minigraph.h
+++ b/ui/minigraph.h
@@ -13,19 +13,31 @@ class FlowGraphWidget;
class Menu;
class ViewFrame;
-class BINARYNINJAUIAPI MiniGraph: public SidebarWidget
+class BINARYNINJAUIAPI MiniGraph: public SidebarWidget, public UIContextNotification
{
Q_OBJECT
- ViewFrame* m_frame;
+ ViewFrame* m_frame = nullptr;
FlowGraphWidget* m_flowGraphWidget = nullptr;
+ QWidget* m_header = nullptr;
+ bool m_popout;
+ QRect m_miniRenderRect;
public:
- MiniGraph(ViewFrame* frame);
+ MiniGraph(bool popout = false);
~MiniGraph();
+ // Called when used in sidebar
virtual void notifyViewChanged(ViewFrame* frame) override;
+ // Called when popped out of sidebar
+ virtual void OnViewChange(UIContext* context, ViewFrame* frame, const QString& type) override;
+
+ virtual QWidget* headerWidget() override { return m_header; }
+ virtual QSize sizeHint() const override { return QSize(200, 200); }
+
+ void setSource(ViewFrame* frame, FlowGraphWidget* graphView);
+
protected:
virtual void contextMenuEvent(QContextMenuEvent* event) override;
virtual void mouseMoveEvent(QMouseEvent* event) override;
@@ -35,6 +47,8 @@ protected:
public Q_SLOTS:
void notifyUpdate();
+ void graphDestroyed();
+ void newPane();
};