VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtBackgroundStatusWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (c) 2026 MAK Technologies, Inc.
3  * All rights reserved.
4  ******************************************************************************/
5 
6 #pragma once
7 
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
13 
14 #include <QtWidgets/QWidget>
15 
16 #include <string>
17 #include <vector>
18 
19 class QFrame;
20 class QGridLayout;
21 class QHBoxLayout;
22 class QLabel;
23 class QPropertyAnimation;
24 class QTimer;
25 class QToolButton;
26 class QVBoxLayout;
27 class QGraphicsOpacityEffect;
28 
29 namespace makVrv
30 {
31 
32  class DtDe;
33  class DtBackgroundStatus;
34  class DtBackgroundStatusManager;
35 
47  {
48  Q_OBJECT
49 
50  public:
51 
56  DtBackgroundStatusWidget(DtDe& de, QWidget* parent = nullptr);
57 
59  ~DtBackgroundStatusWidget() override;
60 
65  DtBackgroundStatusWidget& operator=(const DtBackgroundStatusWidget&) = delete;
69 
70  public slots:
71 
78  void slot_onDockVisibilityChanged(bool visible);
79 
80  protected slots:
81 
83  void slot_tick();
84 
85  protected:
86 
88  void rebuildEntries();
89 
92  bool eventFilter(QObject* watched, QEvent* event) override;
93 
95  struct StatusEntry
96  {
99 
102 
105  QGraphicsOpacityEffect* myOpacityEffect;
106 
109  std::string myLastTooltip = {};
110 
113  std::string myLastTitle = {};
114  };
115 
118 
121 
123  QTimer* myFlickerTimer;
124 
127 
129  QGridLayout* myOuterLayout;
130 
132  QWidget* myLeftGroup;
133 
135  QWidget* myCenterGroup;
136 
138  QWidget* myRightGroup;
139 
141  QHBoxLayout* myLeftGroupLayout;
142 
144  QHBoxLayout* myCenterGroupLayout;
145 
147  QHBoxLayout* myRightGroupLayout;
148 
150  std::vector<StatusEntry> myEntries;
151 
152  private:
153 
156  StatusEntry* findEntry(DtBackgroundStatus* status);
157 
159  void showTooltipFor(StatusEntry& entry);
160 
163  void hideTooltip(bool immediate);
164 
166  void positionTooltipFor(const StatusEntry& entry);
167 
170  void onStatusIconClicked(DtBackgroundStatus* status);
171 
174  QWidget* myTooltipWidget;
175 
178 
181 
184 
186  QPropertyAnimation* myFadeAnimation;
187 
190 
193  };
194 
195 } // namespace makVrv
QFrame * myTooltipDivider
Horizontal-line divider between the title and the message text.
Definition: DtBackgroundStatusWidget.h:180
QToolButton * myIconButton
Non-owning pointer to the flat tool button displaying the icon; owned by Qt parent hierarchy...
Definition: DtBackgroundStatusWidget.h:101
QPropertyAnimation * myFadeAnimation
Animation that fades myTooltipWidget from opaque to transparent then hides it.
Definition: DtBackgroundStatusWidget.h:186
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
bool myFlickerPhase
Current flicker phase — toggled on each tick to drive alternating icon visibility.
Definition: DtBackgroundStatusWidget.h:126
Contains DLL export macros.
DtDe & myDe
The owning display engine; non-owning reference for icon loading.
Definition: DtBackgroundStatusWidget.h:120
QWidget * myCenterGroup
Center-aligned icon group widget; owned by Qt parent hierarchy.
Definition: DtBackgroundStatusWidget.h:135
QGridLayout * myOuterLayout
Outer grid layout managing the three alignment-zone groups; owned by Qt parent hierarchy.
Definition: DtBackgroundStatusWidget.h:129
DtBackgroundStatus * myStatus
Non-owning pointer to the status object.
Definition: DtBackgroundStatusWidget.h:98
Per-DE singleton manager for DtBackgroundStatus objects.
Definition: DtBackgroundStatusManager.h:35
DtBackgroundStatus * myHoveredStatus
Status whose icon is currently under the mouse cursor; nullptr if not hovering.
Definition: DtBackgroundStatusWidget.h:189
QGraphicsOpacityEffect * myOpacityEffect
Opacity effect controlling invisible (inactive) and flicker (active) appearance. Always non-null once...
Definition: DtBackgroundStatusWidget.h:105
QHBoxLayout * myCenterGroupLayout
Layout for the center icon group; owned by Qt parent hierarchy.
Definition: DtBackgroundStatusWidget.h:144
std::vector< StatusEntry > myEntries
One entry per registered status.
Definition: DtBackgroundStatusWidget.h:150
QTimer * myFlickerTimer
Timer driving icon flicker; owned by Qt parent hierarchy.
Definition: DtBackgroundStatusWidget.h:123
DtBackgroundStatusManager & myManager
Reference to the status manager (non-owning).
Definition: DtBackgroundStatusWidget.h:117
QWidget * myLeftGroup
Left-aligned icon group widget; owned by Qt parent hierarchy.
Definition: DtBackgroundStatusWidget.h:132
QHBoxLayout * myRightGroupLayout
Layout for the right icon group; owned by Qt parent hierarchy.
Definition: DtBackgroundStatusWidget.h:147
Qt widget that shows always-visible status icons in the bottom status bar.
Definition: DtBackgroundStatusWidget.h:46
QLabel * myTooltipMessageLabel
Multi-line message label inside myTooltipWidget, below the divider.
Definition: DtBackgroundStatusWidget.h:183
QHBoxLayout * myLeftGroupLayout
Layout for the left icon group; owned by Qt parent hierarchy.
Definition: DtBackgroundStatusWidget.h:141
QWidget * myRightGroup
Right-aligned icon group widget; owned by Qt parent hierarchy.
Definition: DtBackgroundStatusWidget.h:138
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
DtBackgroundStatus * myPinnedStatus
Status whose tooltip is pinned (persists without hover); nullptr if unpinned.
Definition: DtBackgroundStatusWidget.h:192
QWidget * myTooltipWidget
Floating tooltip widget; parented to this for lifetime management but displayed as a frameless top-le...
Definition: DtBackgroundStatusWidget.h:174
Thread-safe status object for VR-Vantage background operations.
Definition: DtBackgroundStatus.h:36
QLabel * myTooltipTitleLabel
Bold title label inside myTooltipWidget, centred at the top.
Definition: DtBackgroundStatusWidget.h:177
Associates a status with its corresponding icon button.
Definition: DtBackgroundStatusWidget.h:95

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)