A widget that displays a 2D bubble level visualization based on tilt angles from an OrientationSensor, providing visual feedback for device leveling.
More...
|
| void | paintEvent (QPaintEvent *event) override |
| | Paints the bubble level visualization.
|
| void | resizeEvent (QResizeEvent *event) override |
| | Handles resize events to recalculate layout geometry.
|
A widget that displays a 2D bubble level visualization based on tilt angles from an OrientationSensor, providing visual feedback for device leveling.
Definition at line 13 of file BubbleLevelWidget.h.
◆ BubbleLevelWidget()
| BubbleLevelWidget::BubbleLevelWidget |
( |
QWidget * | parent = nullptr | ) |
|
|
explicit |
◆ animateTo()
Smoothly animates the bubble to the specified tilt angles.
- Parameters
-
| [in] | angles | The target X and Y tilt angles. |
◆ paintEvent()
| void BubbleLevelWidget::paintEvent |
( |
QPaintEvent * | event | ) |
|
|
overrideprotected |
Paints the bubble level visualization.
- Parameters
-
| [in] | event | The paint event. |
◆ resizeEvent()
| void BubbleLevelWidget::resizeEvent |
( |
QResizeEvent * | event | ) |
|
|
overrideprotected |
Handles resize events to recalculate layout geometry.
- Parameters
-
| [in] | event | The resize event. |
◆ setAngles()
Sets the tilt angles to display immediately without animation.
- Parameters
-
| [in] | angles | The X and Y tilt angles. |
◆ setSensor()
Sets the orientation sensor whose tilt data drives the bubble display.
- Parameters
-
| [in] | sensor | The orientation sensor. |
◆ sizeHint()
| QSize BubbleLevelWidget::sizeHint |
( |
| ) |
const |
|
override |
Returns the recommended size for this widget.
- Returns
- The preferred size hint.
The documentation for this class was generated from the following file: