![]() |
VR-Forces Developer's Guide
|
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.

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 |
| makVrv::DtBackgroundStatusWidget::DtBackgroundStatusWidget | ( | DtDe & | de, |
| QWidget * | parent = nullptr |
||
| ) |
Constructor.
| de | The owning display engine. The DtBackgroundStatusManager is retrieved from de via DtBackgroundStatusManager::instance(). |
| parent | Optional Qt parent widget. |
|
override |
Destructor. Unmanages all icon buttons and stops the flicker timer.
|
delete |
|
delete |
|
delete |
|
delete |
|
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.
| visible | True if the dock is now visible; false if it was hidden. |
|
protectedslot |
Timer callback — advances flicker phase and refreshes icon visibility.
|
protected |
Adds icon labels for any statuses not yet represented in myEntries.
|
overrideprotected |
Overridden to handle mouse-enter and mouse-leave events on icon buttons, driving instant tooltip show and fade-out on cursor departure.
|
private |
Finds the entry whose status pointer matches status.
|
private |
Shows the custom tooltip for entry, cancelling any in-progress fade.
|
private |
Hides the custom tooltip.
| immediate | If true, hide instantly; otherwise start the fade-out animation. |
|
private |
Positions the custom tooltip above and centred on the entry's icon button.
|
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.
|
protected |
Reference to the status manager (non-owning).
|
protected |
The owning display engine; non-owning reference for icon loading.
|
protected |
Timer driving icon flicker; owned by Qt parent hierarchy.
|
protected |
Current flicker phase — toggled on each tick to drive alternating icon visibility.
|
protected |
Outer grid layout managing the three alignment-zone groups; owned by Qt parent hierarchy.
|
protected |
Left-aligned icon group widget; owned by Qt parent hierarchy.
|
protected |
Center-aligned icon group widget; owned by Qt parent hierarchy.
|
protected |
Right-aligned icon group widget; owned by Qt parent hierarchy.
|
protected |
Layout for the left icon group; owned by Qt parent hierarchy.
|
protected |
Layout for the center icon group; owned by Qt parent hierarchy.
|
protected |
Layout for the right icon group; owned by Qt parent hierarchy.
|
protected |
One entry per registered status.
|
private |
Floating tooltip widget; parented to this for lifetime management but displayed as a frameless top-level tool window via Qt::Tool flag.
|
private |
Bold title label inside myTooltipWidget, centred at the top.
|
private |
Horizontal-line divider between the title and the message text.
|
private |
Multi-line message label inside myTooltipWidget, below the divider.
|
private |
Animation that fades myTooltipWidget from opaque to transparent then hides it.
|
private |
Status whose icon is currently under the mouse cursor; nullptr if not hovering.
|
private |
Status whose tooltip is pinned (persists without hover); nullptr if unpinned.