1
0
Fork 0
mirror of https://github.com/leozide/leocad synced 2025-01-15 15:40:48 +01:00
leocad/common/lc_collapsiblewidget.h
2021-01-06 17:45:38 -08:00

25 lines
445 B
C++

#pragma once
class lcCollapsibleWidget : public QWidget
{
Q_OBJECT
public:
lcCollapsibleWidget(const QString& RootTitle, QWidget* Parent = nullptr);
void Collapse();
void SetChildLayout(QLayout* Layout);
protected slots:
void TitleClicked();
protected:
void UpdateIcon();
QToolButton* mTitleButton = nullptr;
QWidget* mChildWidget = nullptr;
bool mExpanded = true;
static QImage mExpandedIcon;
static QImage mCollapsedIcon;
};