#include <flow_widget.h>
|
| | FlowWidget (QWidget *parent, Qt::Orientation orientation, Qt::ScrollBarPolicy horizontalPolicy, Qt::ScrollBarPolicy verticalPolicy) |
| | Constructs a FlowWidget with a scrollable layout.
|
| void | addWidget (QWidget *widget_to_add) const |
| | Adds a widget to the flow layout within the FlowWidget.
|
| void | insertWidgetAtIndex (QWidget *toInsert, int index) |
| void | removeWidget (QWidget *widgetToRemove) const |
| void | clearLayout () |
| | Clears all widgets from the flow layout.
|
| int | count () const |
| QLayoutItem * | itemAt (int index) const |
◆ FlowWidget()
| FlowWidget::FlowWidget |
( |
QWidget * | parent, |
|
|
Qt::Orientation | orientation, |
|
|
Qt::ScrollBarPolicy | horizontalPolicy, |
|
|
Qt::ScrollBarPolicy | verticalPolicy ) |
Constructs a FlowWidget with a scrollable layout.
- Parameters
-
| parent | The parent widget of this FlowWidget. |
| horizontalPolicy | The horizontal scroll bar policy for the scroll area. |
| verticalPolicy | The vertical scroll bar policy for the scroll area. |
◆ addWidget()
| void FlowWidget::addWidget |
( |
QWidget * | widget_to_add | ) |
const |
Adds a widget to the flow layout within the FlowWidget.
Adjusts the widget's size policy based on the scroll bar policies.
- Parameters
-
| widget_to_add | The widget to add to the flow layout. |
◆ clearLayout()
| void FlowWidget::clearLayout |
( |
| ) |
|
Clears all widgets from the flow layout.
Deletes each widget and layout item, and recreates the flow layout if it was removed.
◆ count()
| int FlowWidget::count |
( |
| ) |
const |
|
nodiscard |
◆ insertWidgetAtIndex()
| void FlowWidget::insertWidgetAtIndex |
( |
QWidget * | toInsert, |
|
|
int | index ) |
◆ itemAt()
| QLayoutItem * FlowWidget::itemAt |
( |
int | index | ) |
const |
|
nodiscard |
◆ removeWidget()
| void FlowWidget::removeWidget |
( |
QWidget * | widgetToRemove | ) |
const |
◆ resizeEvent()
| void FlowWidget::resizeEvent |
( |
QResizeEvent * | event | ) |
|
|
overrideprotected |
Handles resize events for the FlowWidget.
Triggers layout recalculation and adjusts the scroll area content size.
- Parameters
-
| event | The resize event containing the new size information. |
◆ setMinimumSizeToMaxSizeHint
| void FlowWidget::setMinimumSizeToMaxSizeHint |
( |
| ) |
|
|
slot |
Sets the minimum size for all widgets inside the FlowWidget to the maximum sizeHint of all of them.
◆ container
| QWidget* FlowWidget::container |
|
private |
◆ flowDirection
| Qt::Orientation FlowWidget::flowDirection |
|
private |
◆ flowLayout
◆ mainLayout
| QHBoxLayout* FlowWidget::mainLayout |
|
private |
◆ scrollArea
| QScrollArea* FlowWidget::scrollArea |
The documentation for this class was generated from the following files:
- cockatrice/src/interface/widgets/general/layout_containers/flow_widget.h
- cockatrice/src/interface/widgets/general/layout_containers/flow_widget.cpp