MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrDataViewComponent.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <lgrGui/lgrGui.h>
12 #include <lgrGui/lgrGuiComponent.h>
13 #include <lgrCore/lgrDataViewSet.h>
14 
16 
18 
19 #include <vlutil/vlTime.h>
20 
21 class DtMutex;
22 
23 namespace MAKLogger
24 {
25  class DtLgrGuiModel;
26  class DtProgressiveLineGraph;
27  class DtLgrPacketBreakdownDialog;
28 
30  {
31  Q_OBJECT
32  Q_PROPERTY(QColor GraphBG MEMBER myGraphBG)
33  Q_PROPERTY(QColor GraphFG MEMBER myGraphFG)
34  Q_PROPERTY(QColor UpdateColor MEMBER myUpdateColor)
35  Q_PROPERTY(QColor InteraColor MEMBER myInteraColor)
36  Q_PROPERTY(QColor CheckpColor MEMBER myCheckpColor)
37 
38  public:
39 
41  DtLgrDataViewComponent(DtLgrGuiModel& model, const QString& name);
42 
44  virtual ~DtLgrDataViewComponent();
45 
47  virtual void update();
48 
53  virtual double updateTime();
54 
56  virtual QWidget* initialize(QWidget* parent);
57 
59  virtual void activate();
60 
62  virtual void deactivate();
63 
67  virtual DtLgrZoomableWidget* zoomComponent();
68 
70  virtual void updateExportData(DtLgrDataViewSetSP set);
71 
73  virtual void addRunningData(const DtLgrDataViewSet& set);
74 
76  virtual DtLgrDataViewSetSP getExportData();
77 
80  virtual bool getRunningData(DtLgrDataViewSet& outputSet);
81 
84  virtual void setBreakdownResults(const DtLgrPacketBreakdownRecordList& records);
85 
87  virtual void reloadFile();
88 
89  virtual QWidget* graph();
90 
91  virtual void enableZoom();
92 
93 
94  public:
95 
96  // When updating last time, slice a bit off so that we don't export a partial of a time increment.
97  static DtRelativeTime theSliceLast;
98 
99  // When updating first time, pad with a very small interval to skip over any time already exported.
100  static DtRelativeTime thePadFirst;
101 
102  public slots:
103 
105  virtual void reloadFile(QString fileName);
106 
108  virtual void reloadFile(const DtLgrEditorInterface::FileDataOperations& fileOp );
109 
111  virtual void syncRunningData(DtLgrGuiModel&);
112 
114  virtual void syncExpandingData(DtLgrGuiModel&);
115 
118  virtual void showPacketBreakdown(double startSec, double stopSec);
119 
121  virtual void showPreviousBreakdown();
122 
124  virtual void showNextBreakdown();
125 
128  virtual void showNextCheckpointBreakdown();
129 
131  virtual void breakdownDialogClosed();
132 
133  protected:
134 
136  virtual void presentBreakdown();
137 
139  virtual void navigateToSpike(int index);
140 
143  virtual int nextSpikeWithCheckpoint(int fromIndex) const;
144 
145  protected:
146 
148  virtual void syncData();
149 
151  void toggleRunningData(const bool& running);
152 
154  void lastTimeChanged(const DtAbsoluteTime& lastTime);
155 
157  void jumpTimeChanged(const DtAbsoluteTime& jumpTime);
158 
160  void fileExpandingChanged(const bool& isExpanding);
161 
163  void followExportIntervalChanged(const double& interval);
164 
167  void updateCurrentSet(const DtString& exportType);
168 
170  virtual void adjustValue(unsigned long& value, const DtLgrDataViewSet::DataPoint& dataPoint);
171 
173  virtual double updateGraph( const DtLgrDataViewSet& aSet,double firstVisibleTime,
174  double lastVisibleTime);
175 
177  void cancelUpdateCurrentSet(const DtString& exportType);
178 
179  protected:
180 
182  {
183  double myStart;
184  double myStop;
185  double myMiddle;
188  unsigned long myUpdateCount;
189  unsigned long myInteractionCount;
190  };
191 
193 
196  DtMutex* myDataMutex;
197  DtMutex* myRunningMutex;
198  DtString myExporteraName;
199 
207  std::vector<BreakdownSpikeWindow> myBreakdownSpikeWindows;
209  std::vector<double> myCheckpointTimes;
213 
218 
225 
232 
234 
235  // Only safely accessed via the updateDataAcrossThread and currentDataSet functions.
241 
242  // When file is expanding, the file is exported this amount of time
244 
245  DtClock myClock;
246 
247 
248  //dark mode additions
249  QColor myGraphBG;
250  QColor myGraphFG;
254 
255 
256  protected:
257 
258  static const int Graph_Updates = 0;
259  static const int Graph_Interactions = 1;
260  static const int Graph_Checkpoints = 2;
261 
262  };
263 
264 }
265 
DtTime myNextExportTime
Definition: lgrDataViewComponent.h:233
bool myActivatedFlag
Definition: lgrDataViewComponent.h:221
Contains MAKLogger::DtLgrEditorInterface subclass of MAKLogger::DtLgrSystemInterface.
DtLgrPacketBreakdownRecordList myBreakdownResults
Records collected for the pending/last breakdown request.
Definition: lgrDataViewComponent.h:205
DtTime myExportInterval
Definition: lgrDataViewComponent.h:243
DtMutex * myRunningMutex
Definition: lgrDataViewComponent.h:197
Contains MAKLogger::DtLgrPacketBreakdownPrinter class and the MAKLogger::DtLgrPacketBreakdownRecord s...
double myMiddle
Definition: lgrDataViewComponent.h:185
QColor myInteraColor
Definition: lgrDataViewComponent.h:252
Provides the base interface for Logger Application gui components.
Definition: lgrGuiComponent.h:36
DtAbsoluteTime myJumpTime
Definition: lgrDataViewComponent.h:231
bool myRecording
Definition: lgrDataViewComponent.h:222
QColor myGraphBG
Definition: lgrDataViewComponent.h:249
QColor myGraphFG
Definition: lgrDataViewComponent.h:250
Relative Time, an elapsed duration of time, no implied measurement, could be seconds/cycles or ticks ...
Definition: absoluteTime.h:28
A widget which can be zoomed.
Definition: lgrZoomableWidget.h:26
bool myWaitingForDataFlag
Definition: lgrDataViewComponent.h:220
size_t myRunningDataIndex
Definition: lgrDataViewComponent.h:239
QColor myUpdateColor
Definition: lgrDataViewComponent.h:251
DtLgrDataViewSet * myRunningDataSet
Definition: lgrDataViewComponent.h:237
DtMutex * myBreakdownMutex
Guards myBreakdownResults across the print and GUI threads.
Definition: lgrDataViewComponent.h:203
Contains MAKLogger::DtLgrGuiComponent class.
The logger GUI&#39;s model.
Definition: lgrGuiModel.h:56
double myStart
Definition: lgrDataViewComponent.h:183
QWidget * myMainWidget
Definition: lgrDataViewComponent.h:195
The class which interfaces with the logger editor functionality.
Definition: lgrEditorInterface.h:31
DtAbsoluteTime myLastTimeChange
Definition: lgrDataViewComponent.h:228
DtAbsoluteTime myUpdateFirstTime
Definition: lgrDataViewComponent.h:226
DtLgrDataViewSet * myCompleteDataSet
Definition: lgrDataViewComponent.h:238
QColor myCheckpColor
Definition: lgrDataViewComponent.h:253
unsigned long myInteractionCount
Definition: lgrDataViewComponent.h:189
bool myIsExpanding
Definition: lgrDataViewComponent.h:240
bool myFileLoading
Definition: lgrDataViewComponent.h:223
std::vector< double > myCheckpointTimes
Times (seconds) of the checkpoint/initial-state packets currently drawn.
Definition: lgrDataViewComponent.h:209
std::shared_ptr< DtLgrDataViewSet > DtLgrDataViewSetSP
Definition: lgrDataViewSet.h:27
int myBreakdownSpikeIndex
Index of the spike currently shown in the breakdown dialog, or -1.
Definition: lgrDataViewComponent.h:217
double myStop
Definition: lgrDataViewComponent.h:184
DtLgrGuiModel * myModel
Definition: lgrDataViewComponent.h:192
DtAbsoluteTime myPreviousLastTime
Definition: lgrDataViewComponent.h:230
std::vector< DtLgrPacketBreakdownRecord > DtLgrPacketBreakdownRecordList
Definition: lgrPacketBreakdownPrinter.h:49
Definition: lgrDataViewComponent.h:29
std::vector< BreakdownSpikeWindow > myBreakdownSpikeWindows
True packet windows that produced currently visible update/interaction spikes.
Definition: lgrDataViewComponent.h:207
A modeless dialog that presents the breakdown of the packets (PDUs/Updates) contained within a select...
Definition: lgrPacketBreakdownDialog.h:35
DtMutex * myDataMutex
Definition: lgrDataViewComponent.h:196
double myBreakdownStop
Definition: lgrDataViewComponent.h:212
DtClock myClock
Definition: lgrDataViewComponent.h:245
#define DT_DLL_LGRGUI
Definition: lgrGui.h:19
DtString myBreakdownExportName
Export type name used to collect the packet breakdown for a selection.
Definition: lgrDataViewComponent.h:201
double myBreakdownStart
Bounds (seconds) of the pending breakdown request.
Definition: lgrDataViewComponent.h:211
DtString myExporteraName
Definition: lgrDataViewComponent.h:198
DtAbsoluteTime myPreviousFirstTime
Definition: lgrDataViewComponent.h:229
DtLgrDataViewSetSP myExportedDataSet
Definition: lgrDataViewComponent.h:236
Widget which draws a line graphic where the data is progressively added over time.
Definition: progressiveLineGraph.h:34
Contains MAKLogger::DtLgrDataViewSet class.
DtProgressiveLineGraph * myGraph
Definition: lgrDataViewComponent.h:194
Defines INPORT/EXPORT macros for lgrGui library.
Collection of data values sorted by time used for data views.
Definition: lgrDataViewSet.h:33
unsigned long myUpdateCount
Packet counts this cluster contributed to the histogram spike, so breakdown selection can match the b...
Definition: lgrDataViewComponent.h:188
DtAbsoluteTime myUpdateLastTime
Definition: lgrDataViewComponent.h:227
DtLgrPacketBreakdownDialog * myBreakdownDialog
The open breakdown dialog (reused across Previous/Next), or null.
Definition: lgrDataViewComponent.h:215
bool myDataOutOfSyncFlag
Definition: lgrDataViewComponent.h:219
bool myJumpPending
Definition: lgrDataViewComponent.h:224
Absolute Time, a particular measured instance in time, could be thought of as a set of relative times...
Definition: absoluteTime.h:82
Definition: lgrDataViewComponent.h:181

Document ID: Generated on Tue Nov 17 15:25:07 EST 2026 from SVN revision 298446
Copyright © 2026 MAK Technologies. All Rights Reserved (www.mak.com)