Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
ExpandingWidget Class Reference

A widget that expands and collapses its content area. More...

#include <expanding_widget.h>

Inheritance diagram for ExpandingWidget:

Public Types

enum class  Direction { }
 Enumerates the possible directions for expanding and collapsing. More...

Public Slots

void setExpanded (bool expanded)
 Sets whether the area is expanded or collapsed.

Signals

void textChanged (const QString &text)
 Emitted when the text changes.
void areaExpanded (ClickableIcon *button)
 Emitted when the area is expanded.
void areaCollapsed (ClickableIcon *button)
 Emitted when the area is collapsed.

Public Member Functions

 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.

Private Member Functions

void setupVerticalWidget ()
 The width of the expanded state.

Private Attributes

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.

Detailed Description

A widget that expands and collapses its content area.

Member Enumeration Documentation

◆ Direction

enum class ExpandingWidget::Direction
strong

Enumerates the possible directions for expanding and collapsing.

Enumerator
Left 

Expands to the right.

Expands to the left.

Constructor & Destructor Documentation

◆ ExpandingWidget()

ExpandingWidget::ExpandingWidget ( Direction direction,
QWidget * parent = nullptr )

Constructs an ExpandingWidget with a specified direction.

Parameters
directionThe direction in which the widget expands and collapses.
parentThe parent widget of this ExpandingWidget.

Member Function Documentation

◆ addCollapsableWidget()

void ExpandingWidget::addCollapsableWidget ( QWidget * widget,
const QString & label = "" )

Adds a collapsible widget to the expanding area.

Parameters
widgetThe QWidget to add to the collapsible area.

◆ areaCollapsed

void ExpandingWidget::areaCollapsed ( ClickableIcon * button)
signal

Emitted when the area is collapsed.

Parameters
buttonThe ClickableIcon* that controls the collapse.

◆ areaExpanded

void ExpandingWidget::areaExpanded ( ClickableIcon * button)
signal

Emitted when the area is expanded.

Parameters
buttonThe ClickableIcon* that controls the expansion.

◆ setButtonIcon()

void ExpandingWidget::setButtonIcon ( const QIcon & icon)

Sets the icon for the button that controls the expansion/collapse.

Parameters
iconThe 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
tooltipThe QString to set as the button's tooltip.

◆ setExpanded

void ExpandingWidget::setExpanded ( bool expanded)
slot

Sets whether the area is expanded or collapsed.

Parameters
expandedA 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
sizeThe int size to set for the expanded state.

◆ textChanged

void ExpandingWidget::textChanged ( const QString & text)
signal

Emitted when the text changes.

Parameters
textThe 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