A plotting widget that handles incremental addition of data.
More...
#include <IncrementalPlot.hh>
Inherits QwtPlot.
|
void | VariableAdded (const std::string &_name) |
| Qt signal emitted when a variable pill is added. More...
|
|
A plotting widget that handles incremental addition of data.
◆ PlotAxis
Axis enum.
Enumerator |
---|
X_BOTTOM_AXIS | bottom x axis
|
X_TOP_AXIS | top x axis
|
Y_LEFT_AXIS | left y axis
|
Y_RIGHT_AXIS | right y axis
|
◆ IncrementalPlot()
Constructor.
- Parameters
-
[in] | _parent | Pointer to a parent widget |
◆ ~IncrementalPlot()
◆ AddCurve()
Add a named curve.
- Parameters
-
[in] | _label | Name of the curve. |
- Returns
- A pointer to the new curve.
◆ AddPoint()
void AddPoint |
( |
const unsigned int |
_id, |
|
|
const ignition::math::Vector2d & |
_pt |
|
) |
| |
Add a new point to a curve.
- Parameters
-
[in] | _id | Unique id of the curve |
[in] | _pt | Point to add. |
◆ AddPoints()
void AddPoints |
( |
const unsigned int |
_id, |
|
|
const std::vector< ignition::math::Vector2d > & |
_pts |
|
) |
| |
Add new points to a curve.
- Parameters
-
[in] | _id | Unique id of the curve |
[in] | _pt | Points to add. |
◆ AttachCurve()
Attach a curve to this plot.
- Parameters
-
[in] | _plotCurve | The curve to attach to the plot. |
◆ Clear()
Clear all points from the plot.
◆ Curve() [1/2]
Find a plot curve by name.
- Parameters
-
[in] | _label | Name of the curve to look for. |
- Returns
- Plot curve if found, nullptr otherwise.
◆ Curve() [2/2]
Find a plot curve by id.
- Parameters
-
[in] | _id | Unique id of the plot curve. |
- Returns
- Plot curve if found, nullptr otherwise.
◆ Curves()
Get all curves in this plot.
- Returns
- A list of curves in this plot.
◆ DetachCurve()
Detach a curve from this plot.
- Parameters
-
[in] | _id | Unique id of the plot curve to detach. |
- Returns
- Pointer to the plot curve
◆ dragEnterEvent()
void dragEnterEvent |
( |
QDragEnterEvent * |
_evt | ) |
|
|
protected |
Used to accept drag enter events.
- Parameters
-
◆ dropEvent()
void dropEvent |
( |
QDropEvent * |
_evt | ) |
|
|
protected |
Used to accept drop events.
- Parameters
-
◆ IsShowGrid()
bool IsShowGrid |
( |
| ) |
const |
Get whether the grid lines are shown.
- Returns
- True if the grid lines are visible.
◆ IsShowHoverLine()
bool IsShowHoverLine |
( |
| ) |
const |
Get whether the hover line is shown.
- Returns
- True if the hover line is visible.
◆ RemoveCurve()
void RemoveCurve |
( |
const unsigned int |
_id | ) |
|
Remove a curve by id.
- Parameters
-
[in] | _id | Unique id of the curve. |
◆ SetCurveLabel()
void SetCurveLabel |
( |
const unsigned int |
_id, |
|
|
const std::string & |
_label |
|
) |
| |
Set a new label for the given curve.
- Parameters
-
[in] | _id | Unique id of the plot curve |
[in] | _label | New label to set the plot curve to. |
◆ SetPeriod()
Set the period over which to plot.
- Parameters
-
[in] | _time | Period duration in seconds. |
◆ ShowAxisLabel()
void ShowAxisLabel |
( |
const PlotAxis |
_axis, |
|
|
const bool |
_show |
|
) |
| |
Set whether to show the axis label.
- Parameters
-
[in] | _axis | Plot axis: X_BOTTOM_AXIS or Y_LEFT_AXIS. |
[in] | _show | True to show the label, false to hide it. |
◆ ShowGrid()
void ShowGrid |
( |
const bool |
_show | ) |
|
Set whether to show the grid lines.
- Parameters
-
[in] | _show | True to show grid lines. |
◆ ShowHoverLine()
void ShowHoverLine |
( |
const bool |
_show | ) |
|
Set whether to show the hover line.
- Parameters
-
[in] | _show | True to show hover line. |
◆ sizeHint()
virtual QSize sizeHint |
( |
| ) |
const |
|
virtual |
Give QT a size hint.
- Returns
- Default size of the plot.
◆ Update()
Update all the curves in the plot.
◆ VariableAdded
void VariableAdded |
( |
const std::string & |
_name | ) |
|
|
signal |
Qt signal emitted when a variable pill is added.
- Parameters
-
[in] | _name | Name of variable pill added. |
The documentation for this class was generated from the following file: