![]() |
MAK Data Logger API Documentation for DIS
|
Widget which draws a line graphic where the data is progressively added over time. More...
Inheritance diagram for MAKLogger::DtProgressiveLineGraph:
Collaboration diagram for MAKLogger::DtProgressiveLineGraph:Public Types | |
| typedef std::set< std::pair < double, int > > | PercentValueMap |
Public Slots | |
| void | moveUp (int steps) |
| void | moveDown (int steps) |
| void | scrollBarMoved (int action) |
Public Slots inherited from MAKLogger::DtLgrZoomableWidget | |
Signals | |
| void | wheelMoved (int) |
Signals inherited from MAKLogger::DtLgrZoomableWidget | |
| void | offsetsChanged (float left, float right) |
Public Member Functions | |
| DtProgressiveLineGraph (int rangeMin, int rangeMax, bool autoScale, QWidget *parent) | |
| CTOR for creating the graph. More... | |
| virtual | ~DtProgressiveLineGraph () |
| DTOR for graph. More... | |
| void | setModel (DtLgrGuiModel *myModel) |
| Set the model, this is required for a number of features such as drawing a cursor. More... | |
| int | verticalMargin () const |
| Get the vertical margin. More... | |
| void | setMargins (int horizontalMargin, int verticalMargin) |
| set the Graph margins. More... | |
| void | addSet (int set, QPen pen, int initial, bool valueCentered=false) |
| Add a set with a color and initial value. More... | |
| void | insertValue (int set, double percent, int value) |
| Insert a value into the middle of the graph. More... | |
| virtual void | resetAllValues (int value) |
| Clear all sets and insert the initial value. More... | |
| virtual void | resetValues (int set, int value) |
| Clear the values and insert the initial value. More... | |
| virtual void | clearValues (int set) |
| Clear the values. More... | |
| virtual void | clearAllValues () |
| Clear all sets. More... | |
| virtual void | offsetPercentages (double percentOffset) |
| Offset the percentages of all the values. More... | |
| virtual void | offsetPercentages (int set, double percentOffset) |
| Offset the percentages of a set of values. More... | |
| virtual void | setRange (int min, int max) |
| Sets the minimum and maximum range of the points. More... | |
| virtual int | rangeMinimum () const |
| Get the Range minimum and maximum. More... | |
| virtual int | rangeMaximum () const |
| virtual bool | autoScale () const |
| Get whether auto scaling is used. More... | |
| virtual void | setAutoScale (bool value) |
| Set whether auto scaling is used. More... | |
| virtual void | setNegativeReflection (bool positive) |
| Set whether the scale is a reflect negative scale. More... | |
| virtual void | useBackgroundGradient (bool useIt) |
| Set if the background gradient is used. More... | |
| virtual bool | usesBackgroundGradient () const |
| Get if the background gradient is used. More... | |
| virtual void | useAlphaBlending (bool useIt) |
| Set whether to use alpha blending. More... | |
| virtual bool | usesAlphaBlending () const |
| Get whether alpha blending is used. More... | |
| void | useBasicGui (bool basic) |
| Set whether to use basic render settings. More... | |
| virtual void | drawAsVerticalLines (bool useVerticalLines) |
| Set whether vertical line samples are used instead of connected samples. More... | |
| virtual bool | usesVerticalLines () const |
| Get whether vertical line samples are used instead of connected samples. More... | |
| virtual void | setOffsets (float left, float right) |
| Override base implementation. More... | |
| void | forceUpdate (bool widgetUpdate) |
| Force a redraw and optionally a widget update. More... | |
| bool | updateNeeded () const |
| Check to see if an update has been forced. More... | |
| virtual void | testForUpdate (DtLgrGuiModel &model) |
| Override test for update. More... | |
| virtual void | enableZoom () |
| Enable/disable Zoom functionality for this graph. More... | |
| virtual void | disableZoom () |
| virtual void | initializeZoomSlider () |
| Initializes Zoom slider and sets geometry. More... | |
| virtual void | syncZoomSlider () |
| Resizes Zoom slider on resize events. Hides slider when disabled. More... | |
| virtual void | setZoomed (bool zoom) |
| Set when in a zoomed state. More... | |
| virtual bool | isZoomed () |
| Returns true is graph is in a zoomed state. More... | |
| virtual bool | isMoveValid (int slideAmount) |
Public Member Functions inherited from MAKLogger::DtLgrZoomableWidget | |
| DtLgrZoomableWidget (QWidget *parent) | |
| CTOR. More... | |
| virtual | ~DtLgrZoomableWidget () |
| DTOR. More... | |
| QRectF | scaledViewport (QRect orignalViewport, QPoint margins) const |
| Scale a viewport using the scaled settings and the provided margins. More... | |
| void | drawCursor (QPainter &painter, double firstVisibleTime, double lastVisibleTime, double cursorTime, int xOffset, bool active) |
| Draw A cursor. More... | |
| QRect | cursorBounds (double firstVisibleTime, double lastVisibleTime, double cursorTime, int xOffset) |
| Get the cursor bounds. More... | |
| double | firstVisibleTime (double firstTime, double lastTime) const |
| Get the first visible time, based upon the scale. More... | |
| double | firstVisibleTime (DtLgrGuiModel &model) const |
| Get the first visible time via the models display time. More... | |
| double | lastVisibleTime (double firstTime, double lastTime) const |
| Get the last visible time, based upon the scale. More... | |
| double | lastVisibleTime (DtLgrGuiModel &model) const |
| Get the last visible time via the models display time. More... | |
| float | leftOffset () const |
| Get the left offset (percent 0-100.0), inline for performance reasons. More... | |
| float | rightOffset () const |
| Get the right offset (percent 0-100.0), inline for performance reasons. More... | |
| float | horizontalMargin () const |
| get the horizontal margin. More... | |
| void | setHorizontalMargin (float margin) |
| set the horizontal margin. More... | |
| void | setDrawTimes (DtLgrGuiModel &model) |
Protected Types | |
| typedef std::map< int, Set * > | SetMap |
Protected Member Functions | |
| virtual double | firstTime () const |
| Get the current time. More... | |
| virtual double | lastTime () const |
| Get the current time. More... | |
| virtual double | currentTime () const |
| Get the current time. More... | |
| virtual void | resizeEvent (QResizeEvent *e) |
| Resize event needed to resize back buffer. More... | |
| virtual void | paintEvent (QPaintEvent *) |
| Draw the widget. More... | |
| virtual void | draw (QPainter &painter, const QRect &rect) |
| Draw the control. More... | |
| virtual void | paintBackground (QPainter &painter) |
| Paint background. More... | |
| virtual int | getSeparation () const |
| Get the line separation count. More... | |
| virtual void | paintLines (QPainter &, Set &set) |
| Function to draw the lines in the foreground color. More... | |
| virtual int | desiredRange () const |
| Get the desired Range. More... | |
| void | paintVerticalLines (PercentValueMap &set, QRectF svp, int rangeHeight, QPainter &painter, QPen pen, bool centered) |
| Draw the graph as vertical lines. More... | |
| void | paintConnectedLines (PercentValueMap &set, QRectF svp, int rangeHeight, QPainter &painter, QPen pen) |
| Draw the graph as a connected line. More... | |
| int | desiredMinimum () const |
| Get the desired minimum. More... | |
| virtual void | wheelEvent (QWheelEvent *event) |
| Catch mouse wheel movements. More... | |
| virtual void | validateAndSetZoomedGraphRanges (int zoomedMax, int zoomedMin) |
| Set new graph ranges based on mouse wheel movements. More... | |
| virtual void | slideZoomedRangeDown (int slideAmount) |
| Move graph ranges up/down based on slider movement. More... | |
| virtual void | slideZoomedRangeUp (int slideAmount) |
| virtual void | setScrollBarRange () |
| Set scroll bar range to reflect zoomed range. More... | |
| virtual void | calibrateScrollBarPosition (int jumpsToMax) |
| Calibrate the slider position after mouse wheel movement. More... | |
Protected Attributes | |
| int | myInitialMinimumRange |
| int | myInitialMaximumRange |
| int | myMinimumRange |
| int | myMaximumRange |
| int | myInitialZoomedMaxRange |
| int | myInitialZoomedMinRange |
| int | mySliderPosition |
| int | myVerticalMargin |
| bool | myAutoScale |
| bool | myActive |
| SetMap | mySets |
| bool | myUseGradient |
| bool | myUseAlphaBlending |
| QLinearGradient * | myLinearGradient |
| bool | myGraphNeedsUpdating |
| bool | myUseVerticalLines |
| bool | myNegativeReflection |
| QPolygon * | myPointCache |
| QPixmap * | myLineBuffer |
| bool | myUseCachedGraph |
| DtLgrVerticalRangeSlider * | myRangeWidget |
| bool | myIsZoomed |
| bool | myZoomEnabled |
| DtLgrGuiModel * | myModel |
| double | myDrawnRange |
Protected Attributes inherited from MAKLogger::DtLgrZoomableWidget | |
| float | myLeftOffset |
| float | myRightOffset |
| float | myHorizontalMargin |
| double | myDrawnFirstVisibleTime |
| double | myDrawnLastVisibleTime |
| double | myDrawnCurrentVisibleTime |
Widget which draws a line graphic where the data is progressively added over time.
| typedef std::set<std::pair<double,int> > MAKLogger::DtProgressiveLineGraph::PercentValueMap |
|
protected |
| MAKLogger::DtProgressiveLineGraph::DtProgressiveLineGraph | ( | int | rangeMin, |
| int | rangeMax, | ||
| bool | autoScale, | ||
| QWidget * | parent | ||
| ) |
CTOR for creating the graph.
|
virtual |
DTOR for graph.
| void MAKLogger::DtProgressiveLineGraph::addSet | ( | int | set, |
| QPen | pen, | ||
| int | initial, | ||
| bool | valueCentered = false |
||
| ) |
Add a set with a color and initial value.
|
virtual |
Get whether auto scaling is used.
Auto scale will change the range dynamically as points are added.
|
protectedvirtual |
Calibrate the slider position after mouse wheel movement.
|
virtual |
Clear all sets.
|
virtual |
Clear the values.
|
protectedvirtual |
Get the current time.
|
protected |
Get the desired minimum.
|
protectedvirtual |
Get the desired Range.
|
virtual |
|
protectedvirtual |
Draw the control.
|
virtual |
Set whether vertical line samples are used instead of connected samples.
|
virtual |
Enable/disable Zoom functionality for this graph.
|
protectedvirtual |
Get the current time.
| void MAKLogger::DtProgressiveLineGraph::forceUpdate | ( | bool | widgetUpdate | ) |
Force a redraw and optionally a widget update.
|
protectedvirtual |
Get the line separation count.
|
virtual |
Initializes Zoom slider and sets geometry.
| void MAKLogger::DtProgressiveLineGraph::insertValue | ( | int | set, |
| double | percent, | ||
| int | value | ||
| ) |
Insert a value into the middle of the graph.
|
virtual |
|
virtual |
Returns true is graph is in a zoomed state.
|
protectedvirtual |
Get the current time.
|
slot |
|
slot |
|
virtual |
Offset the percentages of all the values.
Any value with a negative percentage or a percentage > 100 will be dropped.
|
virtual |
Offset the percentages of a set of values.
Any value with a negative percentage or a percentage > 100 will be dropped.
|
protectedvirtual |
Paint background.
|
protected |
Draw the graph as a connected line.
|
protectedvirtual |
Draw the widget.
|
protectedvirtual |
Function to draw the lines in the foreground color.
|
protected |
Draw the graph as vertical lines.
|
virtual |
|
virtual |
Get the Range minimum and maximum.
|
virtual |
Clear all sets and insert the initial value.
|
virtual |
Clear the values and insert the initial value.
|
protectedvirtual |
Resize event needed to resize back buffer.
|
slot |
|
virtual |
Set whether auto scaling is used.
Auto scale will change the range dynamically as points are added.
| void MAKLogger::DtProgressiveLineGraph::setMargins | ( | int | horizontalMargin, |
| int | verticalMargin | ||
| ) |
set the Graph margins.
| void MAKLogger::DtProgressiveLineGraph::setModel | ( | DtLgrGuiModel * | myModel | ) |
Set the model, this is required for a number of features such as drawing a cursor.
|
virtual |
Set whether the scale is a reflect negative scale.
|
virtual |
Override base implementation.
Reimplemented from MAKLogger::DtLgrZoomableWidget.
|
virtual |
Sets the minimum and maximum range of the points.
As points are scaled clipped to the min and max. when drawn.
|
protectedvirtual |
Set scroll bar range to reflect zoomed range.
|
virtual |
Set when in a zoomed state.
|
protectedvirtual |
Move graph ranges up/down based on slider movement.
|
protectedvirtual |
|
virtual |
Resizes Zoom slider on resize events. Hides slider when disabled.
|
virtual |
Override test for update.
Reimplemented from MAKLogger::DtLgrZoomableWidget.
| bool MAKLogger::DtProgressiveLineGraph::updateNeeded | ( | ) | const |
Check to see if an update has been forced.
|
virtual |
Set whether to use alpha blending.
|
virtual |
Set if the background gradient is used.
| void MAKLogger::DtProgressiveLineGraph::useBasicGui | ( | bool | basic | ) |
Set whether to use basic render settings.
|
virtual |
Get whether alpha blending is used.
|
virtual |
Get if the background gradient is used.
|
virtual |
Get whether vertical line samples are used instead of connected samples.
|
protectedvirtual |
Set new graph ranges based on mouse wheel movements.
| int MAKLogger::DtProgressiveLineGraph::verticalMargin | ( | ) | const |
Get the vertical margin.
|
protectedvirtual |
Catch mouse wheel movements.
|
signal |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |