WebLVC 1.8 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 <portalApp/dllExport.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 
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 }
bool myLockUpdatesFlag
Definition: frameratePlot.h:202
std::map< unsigned int, DtFrameratePlotSeries * > SeriesMap
Definition: frameratePlot.h:190
bool myEnableLazyMinMaxFlag
Definition: frameratePlot.h:200
A custom QwtPlotCurve that can self-update and toggle.
Definition: frameratePlotSeries.h:28
static const float theScaleFactor
Constant used for scaling y axis.
Definition: frameratePlot.h:206
double myFixedXAxisLength
Definition: frameratePlot.h:195
#define DT_DLL_LIBPORTALAPP
Definition: include/portalApp/dllExport.h:20
A QwtPlot Widget customized for plotting broker framerates.
Definition: frameratePlot.h:35
LegendPosition myLegendPosition
Definition: frameratePlot.h:193
SeriesMap mySeries
Definition: frameratePlot.h:191
double myMinVal
Definition: frameratePlot.h:198
bool myDirtyMinMaxFlag
Definition: frameratePlot.h:201
bool myDirtyPlotFlag
Definition: frameratePlot.h:203
double myMaxVal
Definition: frameratePlot.h:197

Document ID: Generated on Wed Mar 12 15:05:17 EDT 2025 from SVN revision 274272
Copyright © 2005-2025 MAK Technologies. All Rights Reserved (www.mak.com)