44#include < QtWidgets/QStackedWidget>
55#include < QtWidgets/QWidget>
66#include " splitter.h"
7+ #include " sidebarwidget.h"
78
89class Sidebar ;
9- class SidebarWidgetType ;
10- class SidebarWidgetAndHeader ;
1110class SplitPaneWidget ;
1211
1312/* !
@@ -88,17 +87,22 @@ class BINARYNINJAUIAPI SidebarWidgetContainer : public QWidget
8887 std::map<SplitPaneWidget*,
8988 std::map<ViewFrame*, std::map<QString, std::map<SidebarWidgetType*, SidebarWidgetAndHeader*>>>>
9089 m_widgets;
90+ std::map<SplitPaneWidget*,
91+ std::map<ViewFrame*, std::map<QString, std::map<SidebarWidgetType*, SidebarContentClassifier*>>>>
92+ m_contentClassifiers;
9193 std::map<SplitPaneWidget*, std::map<QString, std::set<SidebarWidgetType*>>> m_priorWidgets;
9294
9395 std::map<SidebarWidgetType*, SidebarFloatingWidgetState> m_savedFloatingWidgetState;
9496
9597 SidebarStackedWidget& stackedWidgetForType (SidebarWidgetType* type);
9698 std::vector<SidebarWidgetAndHeader*> widgetsForContext () const ;
99+ std::vector<SidebarContentClassifier*> contentClassifiersForContext () const ;
97100 void insertWidgetIntoContainer (SidebarWidgetType* type, QStackedWidget* widget);
98101 void updateContentsVisibility ();
99102
100103private Q_SLOTS:
101104 void floatingWidgetClosed (SidebarWidgetType* type);
105+ void childContentClassificationChanged ();
102106
103107public:
104108 SidebarWidgetContainer (Sidebar* sidebar, SidebarContainerLocation location);
@@ -134,8 +138,11 @@ private Q_SLOTS:
134138 SidebarWidget* widgetWithTitle (SidebarWidgetType* type, const QString& title) const ;
135139 bool hasWidgetWithTitle (SidebarWidgetType* type, const QString& title) const ;
136140 bool activateWidgetWithTitle (SidebarWidgetType* type, const QString& title) const ;
137- bool hasContent (SidebarWidgetType* type) const ;
138- bool shouldHide (SidebarWidgetType* type) const ;
141+ SidebarContentClassification contentClassification (SidebarWidgetType* type);
142+ bool hasContent (SidebarWidgetType* type);
143+ bool shouldHide (SidebarWidgetType* type);
144+
145+ SidebarContentClassifier* contentClassifier (SidebarWidgetType* type);
139146
140147 virtual QSize sizeHint () const override ;
141148
@@ -162,4 +169,5 @@ private Q_SLOTS:
162169Q_SIGNALS:
163170 void showContents ();
164171 void hideContents ();
172+ void contentClassificationChanged ();
165173};
0 commit comments