VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
performanceMonitorWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
10 #include <vrvCoreQt/DtPage.h>
11 #include <QtWidgets/QWidget>
12 
13 #include <set>
14 
15 class QCloseEvent;
16 class QHideEvent;
17 class QShowEvent;
18 class QVBoxLayout;
19 class QTimer;
20 class DtSimulationAddress;
21 
22 namespace makVrv
23 {
24  class DtDe;
25 }
26 
27 namespace makVrf
28 {
29  class DtPerformanceMonitorWidgetLogic;
30  class DtPerformanceMonitorGraph;
31  class DtPerformanceBar;
32 
35  : public makVrv::DtPage
37  {
38  Q_OBJECT
39  Q_PROPERTY(QColor BeginFrameColor MEMBER myBeginFrameColor USER true)
40  Q_PROPERTY(QColor NetworkTickColor MEMBER myNetworkTickColor USER true)
41  Q_PROPERTY(QColor ObjectTickColor MEMBER myObjectTickColor USER true)
42  Q_PROPERTY(QColor AdvanceFrameColor MEMBER myAdvanceFrameColor USER true)
43  Q_PROPERTY(QColor SimulationFrameColor MEMBER mySimulationFrameColor USER true)
44 
45  public:
46 
48  virtual ~DtPerformanceMonitorWidget();
49 
51  virtual QIcon icon();
52 
55  virtual makVrv::DtQIconConfigurations qIconConfigurations() const;
56 
58  virtual QString title();
59 
61  virtual const std::string& pageClassName() const;
62 
63  public:
65  virtual void removeAllBackends();
66 
68  virtual void addBackend(const QString&);
69 
71  virtual void removeBackend(const QString&);
72 
74  virtual void update();
75 
76  virtual void objectCountsChanged();
77 
78  virtual void setLatency(const QString&, double latency);
79  virtual double latency(const QString&) const;
80 
82  virtual void setPingTimeInterval(int);
83 
84  virtual void pingServer(const QString&);
85 
86  protected:
87 
90 
92  DtPerformanceMonitorWidget( makVrv::DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0);
93 
95  virtual void activate();
96 
98  virtual void deactivate();
99 
100  virtual void displayModeChanged();
101 
102  protected slots:
103  virtual void pingServers();
104  virtual void checkLatency();
105 
106  protected:
107 
109  virtual void setupUi(QWidget* p);
110 
111  virtual void slot_postInitialize();
112 
115  virtual void setContainerVisible( bool visible );
116 
117  virtual void closeEvent(QCloseEvent*);
118  virtual void showEvent(QShowEvent*);
119  virtual void hideEvent(QHideEvent*);
120  virtual void performanceUpdated(const QString&, const DtVrfBackendState&);
121 
122  protected:
123  std::string myClassName;
124  std::map<QString, DtPerformanceBar*> myPerformanceBars;
125  QTimer* myPingTimer;
126  QTimer* myLatencyTimer;
127  int myPingTimeInterval;
128  std::set<std::string> myWaitingForPing;
129  std::map<QString, bool> myTickingPublishersDuringObjectTick;
130 
131  QColor myBeginFrameColor;
132  QColor myNetworkTickColor;
133  QColor myObjectTickColor;
134  QColor myAdvanceFrameColor;
135  QColor mySimulationFrameColor;
136  int myCombineKey;
137 
138  public:
140  DtPerformanceMonitorGraph* myPerformanceGraph;
141  QVBoxLayout* myMainLayout;
142  static QColor thePerformanceMonitorLineColor;
143  };
144 
147  class DT_DLL_VRFGUICOMMONQT DtPerformanceMonitorWidgetCreator : public makVrv::DtPageCreator
148  {
149  public:
150 
152  DtPerformanceMonitorWidgetCreator(makVrv::DtDe& de);
153 
155  virtual ~DtPerformanceMonitorWidgetCreator();
156 
160  virtual std::string pageClassName() const;
161 
163  virtual makVrv::DtPage* create(QWidget* parent = 0, Qt::WindowFlags f = 0);
164  };
165 
166 }
Definition: vrfBackendState.h:69
Contains makVrv::DtPage class.
A widget class for putting simulation Time buttons on that are tied to existing menu items...
Definition: performanceMonitorWidget.h:34
Abstract interface for the back end slection list widget.
Definition: performanceMonitorWidgetInterface.h:15
The page is a single widget component which is viewed in a page collection.
Definition: DtPage.h:30
#define DT_DLL_VRFGUICOMMONQT
Definition: vrfGuiCommonQt.h:20
The creator class needed to be used to create a DtPerformanceMonitorWidget.
Definition: performanceMonitorWidget.h:147
Definition: performanceMonitorWidgetLogic.h:28
Definition: performanceMonitorGraph.h:261
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:72
Definition: performanceMonitorGraph.h:160

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)