MAK Data Logger API Documentation for HLA
 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-2012 VT MAK
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 
17 #include <vlutil/vlTime.h>
18 
19 class DtMutex;
20 
21 namespace MAKLogger
22 {
23  class DtLgrGuiModel;
24  class DtProgressiveLineGraph;
25 
27  {
28  Q_OBJECT
29  Q_PROPERTY(QColor GraphBG MEMBER myGraphBG)
30  Q_PROPERTY(QColor GraphFG MEMBER myGraphFG)
31  Q_PROPERTY(QColor UpdateColor MEMBER myUpdateColor)
32  Q_PROPERTY(QColor InteraColor MEMBER myInteraColor)
33  Q_PROPERTY(QColor CheckpColor MEMBER myCheckpColor)
34 
35  public:
36 
38  DtLgrDataViewComponent(DtLgrGuiModel& model, const QString& name);
39 
41  virtual ~DtLgrDataViewComponent();
42 
44  virtual void update();
45 
50  virtual double updateTime();
51 
53  virtual QWidget* initialize(QWidget* parent);
54 
56  virtual void activate();
57 
59  virtual void deactivate();
60 
64  virtual DtLgrZoomableWidget* zoomComponent();
65 
67  virtual void updateExportData(DtLgrDataViewSetSP set);
68 
70  virtual void addRunningData(const DtLgrDataViewSet& set);
71 
73  virtual DtLgrDataViewSetSP getExportData();
74 
77  virtual bool getRunningData(DtLgrDataViewSet& outputSet);
78 
80  virtual void reloadFile();
81 
82  virtual QWidget* graph();
83 
84  virtual void enableZoom();
85 
86 
87  public:
88 
89  // When updating last time, slice a bit off so that we don't export a partial of a time increment.
90  static DtRelativeTime theSliceLast;
91 
92  // When updating first time, pad with a very small interval to skip over any time already exported.
93  static DtRelativeTime thePadFirst;
94 
95  public slots:
96 
98  virtual void reloadFile(QString fileName);
99 
101  virtual void reloadFile(const DtLgrEditorInterface::FileDataOperations& fileOp );
102 
104  virtual void syncRunningData(DtLgrGuiModel&);
105 
107  virtual void syncExpandingData(DtLgrGuiModel&);
108 
109  protected:
110 
112  virtual void syncData();
113 
115  void toggleRunningData(const bool& running);
116 
118  void lastTimeChanged(const DtAbsoluteTime& lastTime);
119 
121  void jumpTimeChanged(const DtAbsoluteTime& jumpTime);
122 
124  void fileExpandingChanged(const bool& isExpanding);
125 
127  void followExportIntervalChanged(const double& interval);
128 
131  void updateCurrentSet(const DtString& exportType);
132 
134  virtual void adjustValue(unsigned long& value, const DtLgrDataViewSet::DataPoint& dataPoint);
135 
137  virtual double updateGraph( const DtLgrDataViewSet& aSet,double firstVisibleTime,
138  double lastVisibleTime);
139 
141  void cancelUpdateCurrentSet(const DtString& exportType);
142 
143  protected:
144 
145  DtLgrGuiModel* myModel;
146 
148  QWidget* myMainWidget;
149  DtMutex* myDataMutex;
150  DtMutex* myRunningMutex;
151  DtString myExporteraName;
152 
153  bool myDataOutOfSyncFlag;
154  bool myWaitingForDataFlag;
155  bool myActivatedFlag;
156  bool myRecording;
157  bool myFileLoading;
158  bool myJumpPending;
159 
160  DtAbsoluteTime myUpdateFirstTime;
161  DtAbsoluteTime myUpdateLastTime;
162  DtAbsoluteTime myLastTimeChange;
163  DtAbsoluteTime myPreviousFirstTime;
164  DtAbsoluteTime myPreviousLastTime;
165  DtAbsoluteTime myJumpTime;
166 
167  DtTime myNextExportTime;
168 
169  // Only safely accessed via the updateDataAcrossThread and currentDataSet functions.
170  DtLgrDataViewSetSP myExportedDataSet;
171  DtLgrDataViewSet* myRunningDataSet;
172  DtLgrDataViewSet* myCompleteDataSet;
173  size_t myRunningDataIndex;
174  bool myIsExpanding;
175 
176  // When file is expanding, the file is exported this amount of time
177  DtTime myExportInterval;
178 
179  DtClock myClock;
180 
181 
182  //dark mode additions
183  QColor myGraphBG;
184  QColor myGraphFG;
185  QColor myUpdateColor;
186  QColor myInteraColor;
187  QColor myCheckpColor;
188 
189 
190  protected:
191 
192  static const int Graph_Updates = 0;
193  static const int Graph_Interactions = 1;
194  static const int Graph_Checkpoints = 2;
195 
196  };
197 
198 }
199 
Contains MAKLogger::DtLgrEditorInterface subclass of MAKLogger::DtLgrSystemInterface.
Provides the base interface for Logger Application gui components.
Definition: lgrGuiComponent.h:36
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
Contains MAKLogger::DtLgrGuiComponent class.
The logger GUI&#39;s model.
Definition: lgrGuiModel.h:56
The class which interfaces with the logger editor functionality.
Definition: lgrEditorInterface.h:31
DtBoost::shared_ptr< DtLgrDataViewSet > DtLgrDataViewSetSP
Definition: lgrDataViewSet.h:24
Definition: lgrDataViewComponent.h:26
#define DT_DLL_LGRGUI
Definition: lgrGui.h:19
Widget which draws a line graphic where the data is progressively added over time.
Definition: progressiveLineGraph.h:32
Contains MAKLogger::DtLgrDataViewSet class.
Defines INPORT/EXPORT macros for lgrGui library.
Collection of data values sorted by time used for data views.
Definition: lgrDataViewSet.h:30
Absolute Time, a particular measured instance in time, could be thought of as a set of relative times...
Definition: absoluteTime.h:82

Document ID: Generated on Thu Jul 14 15:45:33 EDT 2022 from SVN revision 244827
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)