-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align properties in different categories.
- Loading branch information
Showing
5 changed files
with
266 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,43 @@ | ||
#pragma once | ||
|
||
class lcCollapsibleWidget : public QWidget | ||
class lcCollapsibleWidgetButton : public QToolButton | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
lcCollapsibleWidget(const QString& RootTitle, QWidget* Parent = nullptr); | ||
lcCollapsibleWidgetButton(const QString& Title, QWidget* Parent = nullptr); | ||
|
||
void Collapse(); | ||
void SetChildLayout(QLayout* Layout); | ||
|
||
signals: | ||
void StateChanged(bool Expanded); | ||
|
||
protected slots: | ||
void TitleClicked(); | ||
void Clicked(); | ||
|
||
protected: | ||
void UpdateIcon(); | ||
|
||
QToolButton* mTitleButton = nullptr; | ||
QWidget* mChildWidget = nullptr; | ||
bool mExpanded = true; | ||
|
||
static QImage mExpandedIcon; | ||
static QImage mCollapsedIcon; | ||
}; | ||
|
||
class lcCollapsibleWidget : public QWidget | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
lcCollapsibleWidget(const QString& RootTitle, QWidget* Parent = nullptr); | ||
|
||
void Collapse(); | ||
void SetChildLayout(QLayout* Layout); | ||
|
||
protected slots: | ||
void ButtonStateChanged(bool Expanded); | ||
|
||
protected: | ||
lcCollapsibleWidgetButton* mTitleButton = nullptr; | ||
QWidget* mChildWidget = nullptr; | ||
}; |
Oops, something went wrong.