10#ifndef COLLAPSIBLE_SECTION_H
11#define COLLAPSIBLE_SECTION_H
41 QWidget *parent =
nullptr);
116 void onToggle(
bool checked);
122 void refreshTitleMetrics();
129 void applyTitleMetrics();
131 QToolButton *toggleButton;
133 QHBoxLayout *headerLayout_ =
nullptr;
136 QWidget *headerContainer_ =
nullptr;
137 QWidget *contentArea;
138 QVBoxLayout *mainLayout;
140 QWidget *headerTrailingWidget_ =
nullptr;
143 bool expanded_ =
false;
void toggled(bool expanded)
Emitted when the section is toggled.
void titleMetricsChanged()
The title row height or font changed, after an application font change or a zoom step.
void setHeaderTrailingWidget(QWidget *widget)
Set an optional widget in the header row after the horizontal rule (order: title, rule,...
Definition collapsible_section.cpp:141
void setContentWidget(QWidget *contentWidget)
Set the content widget for this section.
Definition collapsible_section.cpp:121
CollapsibleSection(const QString &title=QString(), QWidget *parent=nullptr)
Construct a collapsible section.
Definition collapsible_section.cpp:21
void setExpanded(bool expanded)
Set the expanded state of the section.
Definition collapsible_section.cpp:161
void setTitle(const QString &title)
Set the title text.
Definition collapsible_section.cpp:171
int headerHeight() const
Get the header height (for splitter sizing when collapsed).
Definition collapsible_section.cpp:176
int titleButtonHeight() const
Height of the title / toggle control (single header line).
Definition collapsible_section.cpp:181
bool isExpanded() const
Check if the section is currently expanded.
Definition collapsible_section.cpp:166
QFont titleButtonFont() const
Font used for the section title (bold application font).
Definition collapsible_section.cpp:186