MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
assistantPlot.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2011 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <rtiMsConfig.h>
13 
14 #include <vlutil/vlMachineTypes.h>
15 
16 #include <QtCore/QDateTime>
17 
18 #include <qwt_scale_engine.h>
19 #include <qwt_scale_draw.h>
20 #include <qwt_legend.h>
21 #include <qwt_plot.h>
22 
23 class QwtSymbol;
24 class QwtPlotCurve;
25 
27 
31 {
32  Q_OBJECT
33 
34 public:
35 
38  static DtAssistantPlot* create( const QString& unitLabel = QString() );
39 
43  static DtAssistantPlot* create( LegendPosition legendPos,
44  const QString& unitLabel = QString() );
45 
50  virtual void initialize( bool showLegend, const QString& unitLabel );
51 
53  virtual ~DtAssistantPlot();
54 
56  virtual void setShowTimeLabels( bool show );
57 
59  virtual void setLockUpdates( bool lock );
60 
65  virtual DtAssistantPlotSeries* createPlotSeries( const QColor& color,
66  unsigned seriesId, Qt::PenStyle style, const QString& dispName = QString() );
67 
70  virtual DtAssistantPlotSeries* findSeries( unsigned seriesId );
71 
72  virtual QwtLegend* createLegend();
73 
80  virtual void updateSeries( unsigned seriesId, double t, double val );
81 
86  virtual void updateAxisScaling();
87 
90  virtual void updateAxisScalingIfNeeded();
91 
92  virtual float getMaxVal();
93 
94  virtual float getMaxVal( unsigned seriesId );
95 
96  virtual float getMinVal();
97 
98  virtual float getMinVal( unsigned seriesId );
99 
100  virtual void setBaseTime( double baseTime );
101 
102  virtual void setSeriesEnabled( unsigned seriesId, bool enabled );
103 
104  virtual void setSeriesEnabled( QwtPlotItem* item, bool enabled );
105 
106  virtual void clear();
107 
108 protected:
109 
114  DtAssistantPlot( const QString& unitLabel = QString() );
115 
120  DtAssistantPlot( LegendPosition legendPos, const QString& unitLabel = QString() );
121 
122  virtual void connectToSignals();
123 
128  virtual QPen createPen( const QColor& color,
129  Qt::PenStyle style = Qt::SolidLine, qreal width = 0 );
130 
131 protected:
132 
136  {
137  public:
138 
141  TimeScaleDraw();
142 
148  virtual void setBaseTime( MAKRti::DtU64 baseTime );
149 
151  virtual QwtText label( double val ) const;
152 
153  private:
154 
155  //QDateTime baseTime;
156  MAKRti::DtU64 myBaseTime;
157 
158  };
159 
161  typedef std::map<unsigned,DtAssistantPlotSeries*> SeriesMap;
162 
164  typedef std::map<unsigned,float> SeriesMaxValMap;
166 
168 
170  float myMaxVal;
171 
173  float myMinVal;
174 
175  LegendPosition myLegendPosition;
176 
181 
182 
184 
185  static const float theScaleFactor;
186  static const float theIntervalFactor;
188 
189 };
190 
bool myDirtyPlotFlag
Definition: assistantPlot.h:180
Custom QwtScaleDraw for displaying x axis values as times.
Definition: assistantPlot.h:135
LegendPosition myLegendPosition
Definition: assistantPlot.h:175
bool myLockUpdatesFlag
Definition: assistantPlot.h:179
std::map< unsigned, float > SeriesMaxValMap
Definition: assistantPlot.h:164
bool myDirtyMaxValFlag
Definition: assistantPlot.h:177
bool myDirtyMinValFlag
Definition: assistantPlot.h:178
A QwtPlot Widget customized for use in plotting GPS accuracies.
Definition: assistantPlot.h:30
SeriesMaxValMap SeriesMinValMap
Definition: assistantPlot.h:165
static const float theScaleFactor
Constants used in scaling y axis.
Definition: assistantPlot.h:185
A custom QwtPlotCurve that can self-update and toggle.
Definition: assistantPlotSeries.h:24
MAKRti::DtU64 myBaseTime
Definition: assistantPlot.h:156
SeriesMap mySeries
Definition: assistantPlot.h:167
std::map< unsigned, DtAssistantPlotSeries * > SeriesMap
Definition: assistantPlot.h:161
static const float theIntervalFactor
Constants used in scaling y axis.
Definition: assistantPlot.h:186
#define DT_DLL_ASSISTANTAPP
Definition: rtiMsConfig.h:151
SeriesMinValMap myMinVals
Definition: assistantPlot.h:172
float myMaxVal
Definition: assistantPlot.h:170
SeriesMaxValMap myMaxVals
Definition: assistantPlot.h:169
float myMinVal
Definition: assistantPlot.h:173

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)