From f59acf14a8a8630a5b9a0e0cb422a1192f247f5d Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Tue, 17 Jun 2025 21:35:08 -0400 Subject: Allow sidebar icons to be hidden --- ui/sidebarcontainer.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'ui/sidebarcontainer.h') diff --git a/ui/sidebarcontainer.h b/ui/sidebarcontainer.h index 3ab30c83..acd27761 100644 --- a/ui/sidebarcontainer.h +++ b/ui/sidebarcontainer.h @@ -4,10 +4,9 @@ #include #include #include "splitter.h" +#include "sidebarwidget.h" class Sidebar; -class SidebarWidgetType; -class SidebarWidgetAndHeader; class SplitPaneWidget; /*! @@ -88,17 +87,22 @@ class BINARYNINJAUIAPI SidebarWidgetContainer : public QWidget std::map>>> m_widgets; + std::map>>> + m_contentClassifiers; std::map>> m_priorWidgets; std::map m_savedFloatingWidgetState; SidebarStackedWidget& stackedWidgetForType(SidebarWidgetType* type); std::vector widgetsForContext() const; + std::vector contentClassifiersForContext() const; void insertWidgetIntoContainer(SidebarWidgetType* type, QStackedWidget* widget); void updateContentsVisibility(); private Q_SLOTS: void floatingWidgetClosed(SidebarWidgetType* type); + void childContentClassificationChanged(); public: SidebarWidgetContainer(Sidebar* sidebar, SidebarContainerLocation location); @@ -134,8 +138,11 @@ public: SidebarWidget* widgetWithTitle(SidebarWidgetType* type, const QString& title) const; bool hasWidgetWithTitle(SidebarWidgetType* type, const QString& title) const; bool activateWidgetWithTitle(SidebarWidgetType* type, const QString& title) const; - bool hasContent(SidebarWidgetType* type) const; - bool shouldHide(SidebarWidgetType* type) const; + SidebarContentClassification contentClassification(SidebarWidgetType* type); + bool hasContent(SidebarWidgetType* type); + bool shouldHide(SidebarWidgetType* type); + + SidebarContentClassifier* contentClassifier(SidebarWidgetType* type); virtual QSize sizeHint() const override; @@ -162,4 +169,5 @@ public: Q_SIGNALS: void showContents(); void hideContents(); + void contentClassificationChanged(); }; -- cgit v1.3.1