diff options
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); +}; |
