Used with the NDEVR API Widget Docking system for widgets that are floating.
More...
|
|
virtual bool | event (QEvent *event) override |
| | Handles events including mouse interaction for dragging.
|
|
virtual void | hideEvent (QHideEvent *event) override |
| | Handles the hide event to update the widget state.
|
|
virtual void | paintEvent (QPaintEvent *e) override |
| | Paints the widget, including rounded corners if configured.
|
|
virtual void | showEvent (QShowEvent *event) override |
| | Handles the show event to update the widget state.
|
Used with the NDEVR API Widget Docking system for widgets that are floating.
These widgets appear as windows within the application, though they are still managed by a ContainerWidget.
Definition at line 49 of file FloatingWidget.h.
◆ FloatingWidget()
| FloatingWidget::FloatingWidget |
( |
ContainerWidgetBase * | container, |
|
|
SectionContent * | data, |
|
|
bool | is_fullscreen, |
|
|
bool | request_margins, |
|
|
QWidget * | parent = nullptr ) |
Constructs a FloatingWidget.
- Parameters
-
| [in] | container | The container widget that manages this floating widget. |
| [in] | data | The section content to display in this floating widget. |
| [in] | is_fullscreen | Whether the widget should be displayed fullscreen. |
| [in] | request_margins | Whether to add margins around the content. |
| [in] | parent | The parent widget. |
References FloatingWidget().
Referenced by FloatingWidget().
◆ content()
◆ getDragLocation()
| QPoint FloatingWidget::getDragLocation |
( |
| ) |
const |
Returns the current drag location of this floating widget.
- Returns
- The drag position as a QPoint.
◆ isDockedFullscreen()
| bool FloatingWidget::isDockedFullscreen |
( |
| ) |
const |
Returns whether this widget is docked in fullscreen mode.
- Returns
- True if docked fullscreen.
◆ setContent()
Sets the section content displayed in this floating widget.
- Parameters
-
| [in] | data | The section content to display. |
◆ setDockedFullscreen()
| void FloatingWidget::setDockedFullscreen |
( |
bool | is_fullscreen | ) |
|
Sets whether this widget should be docked fullscreen.
- Parameters
-
| [in] | is_fullscreen | Whether to dock fullscreen. |
◆ setRibbonArea()
| void FloatingWidget::setRibbonArea |
( |
RibbonArea | drop_area | ) |
|
Sets the ribbon area where this widget should dock when dropped.
- Parameters
-
| [in] | drop_area | The ribbon area for docking. |
◆ setRoundedCorners()
| void FloatingWidget::setRoundedCorners |
( |
int | radius | ) |
|
Sets the corner rounding radius for the widget border.
- Parameters
-
| [in] | radius | The corner radius in pixels. |
◆ sizeHint()
| virtual QSize FloatingWidget::sizeHint |
( |
| ) |
const |
|
overridevirtual |
Returns the recommended size for this floating widget.
- Returns
- The preferred size hint.
◆ takeContent()
Takes ownership of the given section content, removing it from its previous owner.
- Parameters
-
| [in] | data | The section content to take. |
- Returns
- True if the content was successfully taken.
◆ titleWidget()
Returns the title widget (tab) for this floating widget.
- Returns
- A pointer to the SectionTab title widget.
Definition at line 109 of file FloatingWidget.h.
The documentation for this class was generated from the following file: