diff options
| author | Xusheng <xusheng@vector35.com> | 2021-02-05 20:28:13 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2021-04-22 10:52:39 +0800 |
| commit | c4b1dd712783e7474570705e6d95183a0c02a76e (patch) | |
| tree | 0393986e0078cb20610c8ad091db061f8f41a08b /ui/expandablegroup.h | |
| parent | a355d5c9aa1978d10f378931bfd5f06be60bae98 (diff) | |
add persistent search result
Diffstat (limited to 'ui/expandablegroup.h')
| -rw-r--r-- | ui/expandablegroup.h | 27 |
1 files changed, 27 insertions, 0 deletions
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 <QtWidgets/QToolButton> +#include <QtCore/QParallelAnimationGroup> +#include <QtWidgets/QScrollArea> +#include <QtCore/QPropertyAnimation> + +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); +}; |
