VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
makVrv::DtBackgroundStatusWidget Class Reference

Qt widget that shows always-visible status icons in the bottom status bar.

Placed inside a fixed-height non-movable QDockWidget ("DtBackgroundStatusDock") at the bottom of DtQtDeMainWindow. The widget itself and all icon buttons are always visible. Inactive icons are drawn at a low opacity (greyed out). Active icons flicker between full opacity and a dim-but-recognisable opacity. Icons are centred in the bar with vertical '|' separators between them. setCorner() on the main window ensures the dock spans only the central column — it does not extend under the left or right dock panels.

Inheritance diagram for makVrv::DtBackgroundStatusWidget:
Inheritance graph
[legend]

Classes

struct  StatusEntry
 

Public Slots

void slot_onDockVisibilityChanged (bool visible)
 

Public Member Functions

 DtBackgroundStatusWidget (DtDe &de, QWidget *parent=nullptr)
 
 ~DtBackgroundStatusWidget () override
 
Non-copyable / Non-movable

QWidget subclasses with active timers must not be copied or moved.

 DtBackgroundStatusWidget (const DtBackgroundStatusWidget &)=delete
 
DtBackgroundStatusWidget & operator= (const DtBackgroundStatusWidget &)=delete
 
 DtBackgroundStatusWidget (DtBackgroundStatusWidget &&)=delete
 
DtBackgroundStatusWidget & operator= (DtBackgroundStatusWidget &&)=delete
 

Protected Slots

void slot_tick ()
 

Protected Member Functions

void rebuildEntries ()
 
bool eventFilter (QObject *watched, QEvent *event) override
 

Protected Attributes

DtBackgroundStatusManager & myManager
 
DtDe & myDe
 
QTimer * myFlickerTimer
 
bool myFlickerPhase
 
QGridLayout * myOuterLayout
 
QWidget * myLeftGroup
 
QWidget * myCenterGroup
 
QWidget * myRightGroup
 
QHBoxLayout * myLeftGroupLayout
 
QHBoxLayout * myCenterGroupLayout
 
QHBoxLayout * myRightGroupLayout
 
std::vector< StatusEntry > myEntries
 

Private Member Functions

StatusEntry * findEntry (DtBackgroundStatus *status)
 
void showTooltipFor (StatusEntry &entry)
 
void hideTooltip (bool immediate)
 
void positionTooltipFor (const StatusEntry &entry)
 
void onStatusIconClicked (DtBackgroundStatus *status)
 

Private Attributes

QWidget * myTooltipWidget
 
QLabel * myTooltipTitleLabel
 
QFrame * myTooltipDivider
 
QLabel * myTooltipMessageLabel
 
QPropertyAnimation * myFadeAnimation
 
DtBackgroundStatus * myHoveredStatus
 
DtBackgroundStatus * myPinnedStatus
 

Constructor & Destructor Documentation

makVrv::DtBackgroundStatusWidget::DtBackgroundStatusWidget ( DtDe &  de,
QWidget *  parent = nullptr 
)

Constructor.

Parameters
deThe owning display engine. The DtBackgroundStatusManager is retrieved from de via DtBackgroundStatusManager::instance().
parentOptional Qt parent widget.
makVrv::DtBackgroundStatusWidget::~DtBackgroundStatusWidget ( )
override

Destructor. Unmanages all icon buttons and stops the flicker timer.

makVrv::DtBackgroundStatusWidget::DtBackgroundStatusWidget ( const DtBackgroundStatusWidget &  )
delete
makVrv::DtBackgroundStatusWidget::DtBackgroundStatusWidget ( DtBackgroundStatusWidget &&  )
delete

Member Function Documentation

DtBackgroundStatusWidget& makVrv::DtBackgroundStatusWidget::operator= ( const DtBackgroundStatusWidget &  )
delete
DtBackgroundStatusWidget& makVrv::DtBackgroundStatusWidget::operator= ( DtBackgroundStatusWidget &&  )
delete
void makVrv::DtBackgroundStatusWidget::slot_onDockVisibilityChanged ( bool  visible)
slot

Called when the dock widget's visibility changes.

Starts the flicker timer when visible is true, and stops it when false, achieving zero CPU cost when the status bar is hidden.

Parameters
visibleTrue if the dock is now visible; false if it was hidden.
void makVrv::DtBackgroundStatusWidget::slot_tick ( )
protectedslot

Timer callback — advances flicker phase and refreshes icon visibility.

void makVrv::DtBackgroundStatusWidget::rebuildEntries ( )
protected

Adds icon labels for any statuses not yet represented in myEntries.

bool makVrv::DtBackgroundStatusWidget::eventFilter ( QObject *  watched,
QEvent *  event 
)
overrideprotected

Overridden to handle mouse-enter and mouse-leave events on icon buttons, driving instant tooltip show and fade-out on cursor departure.

StatusEntry* makVrv::DtBackgroundStatusWidget::findEntry ( DtBackgroundStatus *  status)
private

Finds the entry whose status pointer matches status.

Returns
Pointer to the entry, or nullptr if not found.
void makVrv::DtBackgroundStatusWidget::showTooltipFor ( StatusEntry &  entry)
private

Shows the custom tooltip for entry, cancelling any in-progress fade.

void makVrv::DtBackgroundStatusWidget::hideTooltip ( bool  immediate)
private

Hides the custom tooltip.

Parameters
immediateIf true, hide instantly; otherwise start the fade-out animation.
void makVrv::DtBackgroundStatusWidget::positionTooltipFor ( const StatusEntry &  entry)
private

Positions the custom tooltip above and centred on the entry's icon button.

void makVrv::DtBackgroundStatusWidget::onStatusIconClicked ( DtBackgroundStatus *  status)
private

Toggles the pin for status. Clicking an already-pinned icon removes the pin; clicking a different icon moves the pin to the new icon.

Member Data Documentation

DtBackgroundStatusManager& makVrv::DtBackgroundStatusWidget::myManager
protected

Reference to the status manager (non-owning).

DtDe& makVrv::DtBackgroundStatusWidget::myDe
protected

The owning display engine; non-owning reference for icon loading.

QTimer* makVrv::DtBackgroundStatusWidget::myFlickerTimer
protected

Timer driving icon flicker; owned by Qt parent hierarchy.

bool makVrv::DtBackgroundStatusWidget::myFlickerPhase
protected

Current flicker phase — toggled on each tick to drive alternating icon visibility.

QGridLayout* makVrv::DtBackgroundStatusWidget::myOuterLayout
protected

Outer grid layout managing the three alignment-zone groups; owned by Qt parent hierarchy.

QWidget* makVrv::DtBackgroundStatusWidget::myLeftGroup
protected

Left-aligned icon group widget; owned by Qt parent hierarchy.

QWidget* makVrv::DtBackgroundStatusWidget::myCenterGroup
protected

Center-aligned icon group widget; owned by Qt parent hierarchy.

QWidget* makVrv::DtBackgroundStatusWidget::myRightGroup
protected

Right-aligned icon group widget; owned by Qt parent hierarchy.

QHBoxLayout* makVrv::DtBackgroundStatusWidget::myLeftGroupLayout
protected

Layout for the left icon group; owned by Qt parent hierarchy.

QHBoxLayout* makVrv::DtBackgroundStatusWidget::myCenterGroupLayout
protected

Layout for the center icon group; owned by Qt parent hierarchy.

QHBoxLayout* makVrv::DtBackgroundStatusWidget::myRightGroupLayout
protected

Layout for the right icon group; owned by Qt parent hierarchy.

std::vector<StatusEntry> makVrv::DtBackgroundStatusWidget::myEntries
protected

One entry per registered status.

QWidget* makVrv::DtBackgroundStatusWidget::myTooltipWidget
private

Floating tooltip widget; parented to this for lifetime management but displayed as a frameless top-level tool window via Qt::Tool flag.

QLabel* makVrv::DtBackgroundStatusWidget::myTooltipTitleLabel
private

Bold title label inside myTooltipWidget, centred at the top.

QFrame* makVrv::DtBackgroundStatusWidget::myTooltipDivider
private

Horizontal-line divider between the title and the message text.

QLabel* makVrv::DtBackgroundStatusWidget::myTooltipMessageLabel
private

Multi-line message label inside myTooltipWidget, below the divider.

QPropertyAnimation* makVrv::DtBackgroundStatusWidget::myFadeAnimation
private

Animation that fades myTooltipWidget from opaque to transparent then hides it.

DtBackgroundStatus* makVrv::DtBackgroundStatusWidget::myHoveredStatus
private

Status whose icon is currently under the mouse cursor; nullptr if not hovering.

DtBackgroundStatus* makVrv::DtBackgroundStatusWidget::myPinnedStatus
private

Status whose tooltip is pinned (persists without hover); nullptr if unpinned.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)