A collapsible section widget for use in a QSplitter.
More...
#include <collapsible_section.h>
|
| void | toggled (bool expanded) |
| | Emitted when the section is toggled.
|
| |
|
| | CollapsibleSection (const QString &title=QString(), QWidget *parent=nullptr) |
| | Construct a collapsible section.
|
| |
| void | setContentWidget (QWidget *contentWidget) |
| | Set the content widget for this section.
|
| |
| void | setExpanded (bool expanded) |
| | Set the expanded state of the section.
|
| |
| bool | isExpanded () const |
| | Check if the section is currently expanded.
|
| |
| void | setTitle (const QString &title) |
| | Set the title text.
|
| |
| int | headerHeight () const |
| | Get the header height (for splitter sizing when collapsed).
|
| |
| int | titleButtonHeight () const |
| | Height of the title / toggle control (single header line).
|
| |
|
QFont | titleButtonFont () const |
| | Font used for the section title (bold application font).
|
| |
| void | setHeaderTrailingWidget (QWidget *widget) |
| | Set an optional widget in the header row after the horizontal rule (order: title, rule, trailing). Pass nullptr to clear. The widget is sized to the title line height. The section takes ownership of widget.
|
| |
A collapsible section widget for use in a QSplitter.
This widget displays a clickable header that toggles the visibility of the content area. When collapsed, the widget shrinks to just the header height. When expanded, it can be resized via the parent splitter. Multiple CollapsibleSection widgets can be independently expanded or collapsed.
◆ CollapsibleSection()
| CollapsibleSection::CollapsibleSection |
( |
const QString & |
title = QString(), |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
Construct a collapsible section.
- Parameters
-
| title | The title displayed in the header. |
| parent | Optional parent widget. |
◆ headerHeight()
| int CollapsibleSection::headerHeight |
( |
| ) |
const |
Get the header height (for splitter sizing when collapsed).
- Returns
- The height of the header in pixels.
◆ isExpanded()
| bool CollapsibleSection::isExpanded |
( |
| ) |
const |
Check if the section is currently expanded.
- Returns
- True if expanded, false if collapsed.
◆ setContentWidget()
| void CollapsibleSection::setContentWidget |
( |
QWidget * |
contentWidget | ) |
|
Set the content widget for this section.
- Parameters
-
| contentWidget | The widget to display when expanded. |
The section takes ownership of the widget.
◆ setExpanded()
| void CollapsibleSection::setExpanded |
( |
bool |
expanded | ) |
|
Set the expanded state of the section.
- Parameters
-
| expanded | True to expand, false to collapse. |
◆ setHeaderTrailingWidget()
| void CollapsibleSection::setHeaderTrailingWidget |
( |
QWidget * |
widget | ) |
|
Set an optional widget in the header row after the horizontal rule (order: title, rule, trailing). Pass nullptr to clear. The widget is sized to the title line height. The section takes ownership of widget.
- Parameters
-
| widget | The widget to show, or nullptr. |
◆ setTitle()
| void CollapsibleSection::setTitle |
( |
const QString & |
title | ) |
|
Set the title text.
- Parameters
-
◆ titleButtonHeight()
| int CollapsibleSection::titleButtonHeight |
( |
| ) |
const |
Height of the title / toggle control (single header line).
- Returns
- Pixels, at least 1. Used to size header trailing controls to match.
◆ toggled
| void CollapsibleSection::toggled |
( |
bool |
expanded | ) |
|
|
signal |
Emitted when the section is toggled.
- Parameters
-
| expanded | True if now expanded, false if collapsed. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/widgets/collapsible_section.h
- /builds/wireshark/wireshark/ui/qt/widgets/collapsible_section.cpp