leocad/common/lc_collapsiblewidget.h

26 lines
445 B
C
Raw Normal View History

2021-01-07 02:45:38 +01:00
#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;
};