Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
InfoBannerWidget Class Reference

A custom-painted rotating banner widget that cycles through informational slides. More...

#include <info_banner_widget.h>

Inheritance diagram for InfoBannerWidget:

Public Member Functions

 InfoBannerWidget (QWidget *parent=nullptr)
 Construct an InfoBannerWidget.
 
void setCompactMode (bool compact)
 Switch between full-height and compact-height layout modes.
 
bool isCompactMode () const
 Return whether compact mode is currently active.
 
void setSlideDeckFreeze (bool freeze)
 Freeze or unfreeze slide deck processing in case of changing preference settings.
 
void setSlideTypeVisible (BannerSlideType type, bool visible)
 Show or hide all slides of a given type.
 
void setAutoAdvance (bool advance)
 Enable or disable automatic slide advancement.
 
void setAutoAdvanceInterval (unsigned seconds)
 Set the auto-advance interval.
 
void setSlidesTest (bool test)
 Enable or disable slide test mode.
 
bool hasVisibleSlides () const
 Return whether any slides are currently visible.
 
QSize sizeHint () const override
 Return the preferred size for the widget.
 
QSize minimumSizeHint () const override
 Return the minimum acceptable size for the widget.
 

Protected Member Functions

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.
 

Detailed Description

A custom-painted rotating banner widget that cycles through informational slides.

Constructor & Destructor Documentation

◆ InfoBannerWidget()

InfoBannerWidget::InfoBannerWidget ( QWidget *  parent = nullptr)
explicit

Construct an InfoBannerWidget.

Parameters
parentThe parent widget; may be nullptr.

Member Function Documentation

◆ changeEvent()

void InfoBannerWidget::changeEvent ( QEvent *  event)
overrideprotected

Respond to widget state changes such as palette or font updates.

Parameters
eventThe change event; inspect event->type() to determine what changed.

◆ event()

bool InfoBannerWidget::event ( QEvent *  event)
overrideprotected

Handle miscellaneous events, including tooltip queries.

Parameters
eventThe 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
eventThe leave event.

◆ 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
eventThe mouse move event.

◆ mousePressEvent()

void InfoBannerWidget::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Handle mouse press events for dot navigation and button clicks.

Parameters
eventThe mouse press event.

◆ paintEvent()

void InfoBannerWidget::paintEvent ( QPaintEvent *  event)
overrideprotected

Paint the current slide onto the widget surface.

Parameters
eventThe paint event (used to obtain the dirty rect).

◆ setAutoAdvance()

void InfoBannerWidget::setAutoAdvance ( bool  advance)

Enable or disable automatic slide advancement.

Parameters
advancetrue to enable auto-advance; false to disable it.

◆ setAutoAdvanceInterval()

void InfoBannerWidget::setAutoAdvanceInterval ( unsigned  seconds)

Set the auto-advance interval.

Parameters
secondsNumber 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
compacttrue 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
freezetrue 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
testtrue 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
typeThe slide type to configure.
visibletrue 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: