VR-Exchange 2.2 API Documentation
frameratePlot.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2013 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <namespace.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 #include <map>
24 
25 class QwtSymbol;
26 class QwtPlotCurve;
27 
28 namespace MAKVrExchange
29 {
30 
31  class DtFrameratePlotSeries;
32 
35  class DT_DLL_LIBPORTALAPP DtFrameratePlot : public QwtPlot
36  { Q_OBJECT;
37  public:
38 
40  static DtFrameratePlot* create();
41 
44  static DtFrameratePlot* create( LegendPosition legendPos );
45 
47  virtual ~DtFrameratePlot();
48 
53  virtual void initialize( bool showLegend );
54 
56  virtual void setShowTimeLabels( bool show );
57 
59  virtual void setLockUpdates( bool lock );
60 
66  virtual DtFrameratePlotSeries* createPlotSeries( unsigned int seriesId,
67  const QColor& color, Qt::PenStyle style, const QString& dispName = QString() );
68 
73  virtual DtFrameratePlotSeries* createPlotSeries( unsigned int seriesId,
74  const QPen& pen, const QString& dispName = QString() );
75 
78  virtual bool removeSeries( unsigned int seriesId );
79 
82  virtual DtFrameratePlotSeries* findSeries( unsigned int seriesId );
83 
85  virtual QwtLegend* createLegend();
86 
91  virtual void setFixedXAxisLength( double xAxisLength );
92 
94  virtual double fixedXAxisLength() const;
95 
104  virtual void setLazyMinMaxEnabled( bool enabled );
105 
107  virtual bool lazyMinMaxEnabled() const;
108 
115  virtual void updateSeries( unsigned int seriesId, double t, double val );
116 
119  virtual void updateAxisScaling();
120 
125  virtual void updateAxisScaling( double t );
126 
131  virtual double getMaxVal() const;
132 
137  virtual double getMinVal() const;
138 
143  virtual void setSeriesEnabled( unsigned int seriesId, bool enabled );
144 
149  virtual void setSeriesEnabled( QwtPlotItem* item, bool enabled );
150 
152  virtual void clear();
153 
156  virtual QSize sizeHint() const;
157 
158  signals:
159 
162  void seriesEnabledStateChanged( unsigned int seriesId, bool enabled );
163 
164  protected:
165 
169  DtFrameratePlot();
170 
174  DtFrameratePlot( LegendPosition legendPos );
175 
178  virtual void recomputeMinMax() const;
179 
184  virtual QPen createPen( const QColor& color,
185  Qt::PenStyle style = Qt::SolidLine, int width = 0 );
186 
187  protected:
188 
190  typedef std::map<unsigned int,DtFrameratePlotSeries*> SeriesMap;
192 
193  LegendPosition myLegendPosition;
194 
196 
197  mutable double myMaxVal;
198  mutable double myMinVal;
199 
201  mutable bool myDirtyMinMaxFlag;
202  mutable bool myLockUpdatesFlag;
203  mutable bool myDirtyPlotFlag;
204 
206  static const float theScaleFactor;
207 
208  };
209 
210 }

Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)