From c4b1dd712783e7474570705e6d95183a0c02a76e Mon Sep 17 00:00:00 2001 From: Xusheng Date: Fri, 5 Feb 2021 20:28:13 +0800 Subject: add persistent search result --- ui/expandablegroup.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 ui/expandablegroup.h (limited to 'ui/expandablegroup.h') diff --git a/ui/expandablegroup.h b/ui/expandablegroup.h new file mode 100644 index 00000000..164651f6 --- /dev/null +++ b/ui/expandablegroup.h @@ -0,0 +1,27 @@ +#pragma once + +#include "uitypes.h" +#include +#include +#include +#include + +class BINARYNINJAUIAPI ExpandableGroup : public QWidget +{ + Q_OBJECT + +private: + QToolButton* m_button; + QParallelAnimationGroup* m_animation; + QScrollArea* m_content; + int m_duration = 100; + +private Q_SLOTS: + void toggled(bool expanded); + +public: + explicit ExpandableGroup(const QString& title = "", QWidget* parent = nullptr); + void setContentLayout(QLayout* contentLayout); + void setTitle(const QString& title) { m_button->setText(title); } + void toggle(bool expanded); +}; -- cgit v1.3.1