A custom-painted rotating banner widget that cycles through informational slides.
More...
#include <info_banner_widget.h>
|
| void | paintEvent (QPaintEvent *event) override |
| | Paint the current slide onto the widget surface.
|
| |
| void | mousePressEvent (QMouseEvent *event) override |
| | Handle mouse press events for dot navigation and button clicks.
|
| |
| void | mouseMoveEvent (QMouseEvent *event) override |
| | Track the hovered dot and update the cursor.
|
| |
| void | leaveEvent (QEvent *event) override |
| | Clear the hover state when the pointer leaves the widget.
|
| |
| void | changeEvent (QEvent *event) override |
| | Respond to widget state changes such as palette or font updates.
|
| |
| bool | event (QEvent *event) override |
| | Handle miscellaneous events, including tooltip queries.
|
| |
A custom-painted rotating banner widget that cycles through informational slides.
◆ InfoBannerWidget()
| InfoBannerWidget::InfoBannerWidget |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Construct an InfoBannerWidget.
- Parameters
-
| parent | The parent widget; may be nullptr. |
◆ changeEvent()
| void InfoBannerWidget::changeEvent |
( |
QEvent * |
event | ) |
|
|
overrideprotected |
Respond to widget state changes such as palette or font updates.
- Parameters
-
| event | The change event; inspect event->type() to determine what changed. |
◆ event()
| bool InfoBannerWidget::event |
( |
QEvent * |
event | ) |
|
|
overrideprotected |
Handle miscellaneous events, including tooltip queries.
- Parameters
-
| event | The event to handle. |
- Returns
- true if the event was consumed; false otherwise.
◆ hasVisibleSlides()
| bool InfoBannerWidget::hasVisibleSlides |
( |
| ) |
const |
Return whether any slides are currently visible.
- Returns
- true if
slides_ is non-empty after filtering; false if the widget has nothing to display and should be hidden.
◆ isCompactMode()
| bool InfoBannerWidget::isCompactMode |
( |
| ) |
const |
Return whether compact mode is currently active.
- Returns
- true if the widget is in compact mode.
◆ leaveEvent()
| void InfoBannerWidget::leaveEvent |
( |
QEvent * |
event | ) |
|
|
overrideprotected |
Clear the hover state when the pointer leaves the widget.
- Parameters
-
◆ minimumSizeHint()
| QSize InfoBannerWidget::minimumSizeHint |
( |
| ) |
const |
|
override |
Return the minimum acceptable size for the widget.
- Returns
- The minimum
QSize.
◆ mouseMoveEvent()
| void InfoBannerWidget::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Track the hovered dot and update the cursor.
- Parameters
-
| event | The mouse move event. |
◆ mousePressEvent()
| void InfoBannerWidget::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Handle mouse press events for dot navigation and button clicks.
- Parameters
-
| event | The mouse press event. |
◆ paintEvent()
| void InfoBannerWidget::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotected |
Paint the current slide onto the widget surface.
- Parameters
-
| event | The paint event (used to obtain the dirty rect). |
◆ setAutoAdvance()
| void InfoBannerWidget::setAutoAdvance |
( |
bool |
advance | ) |
|
Enable or disable automatic slide advancement.
- Parameters
-
| advance | true to enable auto-advance; false to disable it. |
◆ setAutoAdvanceInterval()
| void InfoBannerWidget::setAutoAdvanceInterval |
( |
unsigned |
seconds | ) |
|
Set the auto-advance interval.
- Parameters
-
| seconds | Number of seconds between automatic slide transitions. Values are converted to milliseconds and stored in auto_advance_ms_. The timer is restarted if auto-advance is currently enabled. |
◆ setCompactMode()
| void InfoBannerWidget::setCompactMode |
( |
bool |
compact | ) |
|
Switch between full-height and compact-height layout modes.
In compact mode the widget uses kCardHeightCompact instead of kCardHeight and suppresses the illustration area. The change triggers a layout recalculation and repaint.
- Parameters
-
| compact | true to enable compact mode; false for full mode. |
◆ setSlideDeckFreeze()
| void InfoBannerWidget::setSlideDeckFreeze |
( |
bool |
freeze | ) |
|
Freeze or unfreeze slide deck processing in case of changing preference settings.
- Parameters
-
| freeze | true to freeze slide deck processing; false to unfreeze and trigger slide deck processing. |
◆ setSlidesTest()
| void InfoBannerWidget::setSlidesTest |
( |
bool |
test | ) |
|
Enable or disable slide test mode.
- Parameters
-
| test | true to enable test mode; false to restore normal operation. |
◆ setSlideTypeVisible()
| void InfoBannerWidget::setSlideTypeVisible |
( |
BannerSlideType |
type, |
|
|
bool |
visible |
|
) |
| |
Show or hide all slides of a given type.
- Parameters
-
| type | The slide type to configure. |
| visible | true to include slides of type in the rotation; false to suppress them. |
◆ sizeHint()
| QSize InfoBannerWidget::sizeHint |
( |
| ) |
const |
|
override |
Return the preferred size for the widget.
- Returns
- The preferred
QSize.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/widgets/info_banner_widget.h
- /builds/wireshark/wireshark/ui/qt/widgets/info_banner_widget.cpp