VR-Exchange 2.10 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pStatisticsViewComponent.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2017 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portalApp/dllExport.h>
13 
15 
16 #include <QtCore/QObject>
17 #include <QWidget>
18 
19 class QMenu;
20 class QPushButton;
21 
22 namespace MAKVrExchange
23 {
24 
25  class DtFrameratePlot;
26  class DtPortalConnection;
27  class DtSeriesColorRecord;
28  class DtPlotColorSettings;
29  class DtPlotterLegendDialog;
30  class DtPortalAppInitializer;
31 
35  { Q_OBJECT;
36  public:
37 
40 
42  virtual ~DtStatisticsViewComponent();
43 
46  virtual void setInitializer( DtPortalAppInitializer* originalInit );
47 
49  virtual void toggleShowStatistics( bool show );
50 
53  virtual void toggleLegend( bool show );
54 
55  signals:
56 
57  // Indicates that the legend was shown or hidden
58  void legendVisibilityChanged( bool show );
59 
60  protected:
61 
64  void initView();
65 
68  void connectToSignals();
69 
72  void initializeColors();
73 
76  static void portalMessageCb( const DtPortalMessage& msg, void* usr );
77 
79  virtual void receivePortalMessage( const DtPortalMessage& msg );
80 
83  virtual void initPortalMessageFields();
84 
87  virtual void plotPortalMessageCounts();
88 
91  static void abnormalRemovalCb( const DtAbnormalBrokerExitMessage& msg, void* usr );
92 
95  static void removeBrokerCb( const DtBrokerExitingMessage& msg, void* usr );
96 
98  virtual void processBrokerRemoval( const DtString& broker );
99 
102  static void statisticsReportCb( const DtStatisticsReportMessage& msg, void* usr );
103 
105  virtual void receiveStatisticsReport( const DtStatisticsReportMessage& message );
106 
108  virtual DtU32 getSeriesId( DtU32 brokerId, const DtString& fieldName );
109 
111  virtual bool lookupSeriesBrokerField( unsigned int seriesId,
112  DtString& brokerName, DtString& fieldName );
113 
116  virtual void saveSeriesRecord( const DtSeriesColorRecord& rec );
117 
119  virtual void getSeriesRecord( const DtString& brokername,
120  const DtString& fieldname, DtSeriesColorRecord& rec );
121 
122  protected slots:
123 
125  virtual void tick();
126 
129  virtual void toggleLegend();
130 
132  virtual void onContextMenuRequested( const QPoint& where );
133 
135  virtual void onSeriesToggled( const DtString& brokerName,
136  const DtString& fieldName, bool enabled );
137 
139  virtual void onSeriesStyleChanged( const DtString& brokerName,
140  const DtString& fieldName, unsigned int style );
141 
143  virtual void onSeriesColorChanged( const DtString& brokerName,
144  const DtString& fieldName, int r, int g, int b );
145 
148  virtual void onLegendDialogClosed();
149 
150  private:
151 
154 
157 
158  protected:
159 
163  {
167  };
168 
173  typedef std::map<DtString,unsigned int> FieldIdMap;
174 
177  typedef std::map<DtU32,FieldIdMap> BrokerFieldIdMap;
179 
182  typedef std::map<unsigned int,DtU32> FieldBrokerMap;
184 
187  typedef std::map<DtU32,BrokerInfoStruct> BrokerInfoMap;
189 
193 
194  float myNextHue;
198 
199  unsigned int myPortalObjectCount;
205 
208 
211  QPushButton* myLegendButton;
213  QTimer* myTimer;
214 
215  };
216 
217 }
Stores general information about a broker&#39;s plotted series.
Definition: pStatisticsViewComponent.h:162
DtU32 myNextSeriesId
Definition: pStatisticsViewComponent.h:197
int myNextStyle
Definition: pStatisticsViewComponent.h:195
QWidget * myParent
Definition: pStatisticsViewComponent.h:192
QMenu * myLegendContextMenu
Definition: pStatisticsViewComponent.h:212
std::map< DtString, unsigned int > FieldIdMap
Maps a field name to its series id.
Definition: pStatisticsViewComponent.h:173
DtPlotterLegendDialog * myLegendDialog
Definition: pStatisticsViewComponent.h:209
bool myStatisticsShownFlag
Definition: pStatisticsViewComponent.h:204
DtTime myLastMessageReportTime
Definition: pStatisticsViewComponent.h:203
QTimer * myTimer
Definition: pStatisticsViewComponent.h:213
A view component which plots broker statistics.
Definition: pStatisticsViewComponent.h:34
std::map< DtU32, BrokerInfoStruct > BrokerInfoMap
Definition: pStatisticsViewComponent.h:187
std::map< unsigned int, DtU32 > FieldBrokerMap
Definition: pStatisticsViewComponent.h:182
float myNextHue
Definition: pStatisticsViewComponent.h:194
Contains the DtStatisticsReportMessage class declaration.
The base class for all messages passed through the portal.
Definition: pMessage.h:67
DtPortalConnection * myPConn
Definition: pStatisticsViewComponent.h:207
unsigned int myPortalControlMessageCount
Definition: pStatisticsViewComponent.h:201
unsigned int myPortalInteractionCount
Definition: pStatisticsViewComponent.h:200
DtPortalAppInitializer instances are used to parse the mtl file/command line arguments, and store the parameters.
Definition: portalAppInitializer.h:31
DtTime myVisibleTimeRange
Definition: pStatisticsViewComponent.h:206
DtFrameratePlot * myFpsPlot
Definition: pStatisticsViewComponent.h:210
PortalControlMessageTemplate is used to create new DtPortalControlMessage types.
Definition: pControlMessage.h:71
DtPlotColorSettings * myPlotColorSettings
Definition: pStatisticsViewComponent.h:190
BrokerFieldIdMap myBrokerFieldIdMap
Definition: pStatisticsViewComponent.h:178
#define DT_DLL_LIBPORTALAPP
Definition: include/portalApp/dllExport.h:20
A QwtPlot Widget customized for plotting broker framerates.
Definition: frameratePlot.h:35
float myHueInterval
Definition: pStatisticsViewComponent.h:196
DtStatisticsReportMessage lastMessage
Definition: pStatisticsViewComponent.h:164
Used by brokers to report timing statistics.
Definition: statisticsReportMessage.h:21
DtPortalAppInitializer * myInitializer
Definition: pStatisticsViewComponent.h:191
unsigned int myPortalOtherMessageCount
Definition: pStatisticsViewComponent.h:202
Definition: plotColorSettings.h:20
Connects a broker to the Portal Data Exchange.
Definition: pConnection.h:49
unsigned int myPortalObjectCount
Definition: pStatisticsViewComponent.h:199
DtTime lastUpdateTime
Definition: pStatisticsViewComponent.h:165
BrokerInfoMap myBrokerInfoMap
Definition: pStatisticsViewComponent.h:188
QPushButton * myLegendButton
Definition: pStatisticsViewComponent.h:211
Record for storing color/style information about a broker series.
Definition: seriesColorRecord.h:21
FieldBrokerMap myFieldBrokerMap
Definition: pStatisticsViewComponent.h:183
A dialog for customizing plot series display settings.
Definition: plotterLegendDialog.h:36
DtTime reportingIntervalChangeTime
Definition: pStatisticsViewComponent.h:166
std::map< DtU32, FieldIdMap > BrokerFieldIdMap
Definition: pStatisticsViewComponent.h:177

Document ID: Generated on Mon May 25 18:45:12 EDT 2026 from SVN revision 289111
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)