A widget that expands and collapses its content area.
More...
#include <expanding_widget.h>
|
| enum class | Direction { } |
| | Enumerates the possible directions for expanding and collapsing. More...
|
|
| void | setExpanded (bool expanded) |
| | Sets whether the area is expanded or collapsed.
|
|
| | ExpandingWidget (Direction direction, QWidget *parent=nullptr) |
| | Constructs an ExpandingWidget with a specified direction.
|
| void | setButtonIcon (const QIcon &icon) |
| | Sets the icon for the button that controls the expansion/collapse.
|
| void | setButtonTooltip (const QString &tooltip) |
| | Sets the tooltip for the button that controls the expansion/collapse.
|
| void | addCollapsableWidget (QWidget *widget, const QString &label="") |
| | Adds a collapsible widget to the expanding area.
|
| void | setExpandedSize (int size) |
| | Sets the size of the expanded state. The height in vertical mode, the width in horizontal mode.
|
|
void | expandArea () |
| | Expands the area controlled by the button.
|
|
void | collapseArea () |
| | Collapses the area controlled by the button.
|
|
|
void | setupVerticalWidget () |
| | The width of the expanded state.
|
|
|
QWidget * | mSearchArea |
| | Pointer to the button that controls expansion/collapse.
|
|
QWidget * | mContentWidget |
| | Pointer to the collapsible area widget.
|
|
QPropertyAnimation * | mAnimation |
| | Pointer to the actual content inside the mCollapsibleArea.
|
|
Direction | mDirection |
| | Pointer to the property animation for expanding/collapsing.
|
A widget that expands and collapses its content area.
◆ Direction
Enumerates the possible directions for expanding and collapsing.
| Enumerator |
|---|
| Left | Expands to the right.
Expands to the left.
|
◆ ExpandingWidget()
| ExpandingWidget::ExpandingWidget |
( |
Direction | direction, |
|
|
QWidget * | parent = nullptr ) |
Constructs an ExpandingWidget with a specified direction.
- Parameters
-
| direction | The direction in which the widget expands and collapses. |
| parent | The parent widget of this ExpandingWidget. |
◆ addCollapsableWidget()
| void ExpandingWidget::addCollapsableWidget |
( |
QWidget * | widget, |
|
|
const QString & | label = "" ) |
Adds a collapsible widget to the expanding area.
- Parameters
-
| widget | The QWidget to add to the collapsible area. |
◆ areaCollapsed
Emitted when the area is collapsed.
- Parameters
-
| button | The ClickableIcon* that controls the collapse. |
◆ areaExpanded
Emitted when the area is expanded.
- Parameters
-
| button | The ClickableIcon* that controls the expansion. |
◆ setButtonIcon()
| void ExpandingWidget::setButtonIcon |
( |
const QIcon & | icon | ) |
|
Sets the icon for the button that controls the expansion/collapse.
- Parameters
-
| icon | The QIcon to set as the button's icon. |
◆ setButtonTooltip()
| void ExpandingWidget::setButtonTooltip |
( |
const QString & | tooltip | ) |
|
Sets the tooltip for the button that controls the expansion/collapse.
- Parameters
-
| tooltip | The QString to set as the button's tooltip. |
◆ setExpanded
| void ExpandingWidget::setExpanded |
( |
bool | expanded | ) |
|
|
slot |
Sets whether the area is expanded or collapsed.
- Parameters
-
| expanded | A bool indicating whether to expand (true) or collapse (false). |
◆ setExpandedSize()
| void ExpandingWidget::setExpandedSize |
( |
int | size | ) |
|
Sets the size of the expanded state. The height in vertical mode, the width in horizontal mode.
- Parameters
-
| size | The int size to set for the expanded state. |
◆ textChanged
| void ExpandingWidget::textChanged |
( |
const QString & | text | ) |
|
|
signal |
Emitted when the text changes.
- Parameters
-
| text | The QString containing the new text. |
The documentation for this class was generated from the following files:
- /__w/maki/maki/app/widgets/expanding_widget.h
- /__w/maki/maki/app/widgets/expanding_widget.cpp