17#ifndef GAZEBO_GUI_PLOT_INCREMENTALPLOT_HH_
18#define GAZEBO_GUI_PLOT_INCREMENTALPLOT_HH_
24#include <ignition/math/Vector2.hh>
43 class IncrementalPlotPrivate;
82 const ignition::math::Vector2d &_pt);
88 const std::vector<ignition::math::Vector2d> &_pts);
127 const std::string &_label);
152 public: std::vector<PlotCurveWeakPtr>
Curves()
const;
172 private: std::unique_ptr<IncrementalPlotPrivate> dataPtr;
common
Definition FuelModelDatabase.hh:37
gui
Definition KeyEventHandler.hh:29
default namespace for gazebo
A Time class, can be used to hold wall- or sim-time.
Definition Time.hh:48
A plotting widget that handles incremental addition of data.
Definition IncrementalPlot.hh:47
void SetPeriod(const common::Time &_time)
Set the period over which to plot.
PlotCurveWeakPtr Curve(const std::string &_label) const
Find a plot curve by name.
std::vector< PlotCurveWeakPtr > Curves() const
Get all curves in this plot.
void ShowAxisLabel(const PlotAxis _axis, const bool _show)
Set whether to show the axis label.
void dropEvent(QDropEvent *_evt)
Used to accept drop events.
virtual ~IncrementalPlot()
Destructor.
void AttachCurve(PlotCurveWeakPtr _curve)
Attach a curve to this plot.
void AddPoints(const unsigned int _id, const std::vector< ignition::math::Vector2d > &_pts)
Add new points to a curve.
void AddPoint(const unsigned int _id, const ignition::math::Vector2d &_pt)
Add a new point to a curve.
void VariableAdded(const std::string &_name)
Qt signal emitted when a variable pill is added.
PlotAxis
Axis enum.
Definition IncrementalPlot.hh:52
@ Y_RIGHT_AXIS
right y axis
Definition IncrementalPlot.hh:63
@ X_TOP_AXIS
top x axis
Definition IncrementalPlot.hh:57
@ X_BOTTOM_AXIS
bottom x axis
Definition IncrementalPlot.hh:54
@ Y_LEFT_AXIS
left y axis
Definition IncrementalPlot.hh:60
void ShowGrid(const bool _show)
Set whether to show the grid lines.
bool IsShowGrid() const
Get whether the grid lines are shown.
PlotCurvePtr DetachCurve(const unsigned int _id)
Detach a curve from this plot.
IncrementalPlot(QWidget *_parent=nullptr)
Constructor.
void ShowHoverLine(const bool _show)
Set whether to show the hover line.
void Clear()
Clear all points from the plot.
virtual QSize sizeHint() const
Give QT a size hint.
void RemoveCurve(const unsigned int _id)
Remove a curve by id.
void SetCurveLabel(const unsigned int _id, const std::string &_label)
Set a new label for the given curve.
void Update()
Update all the curves in the plot.
void dragEnterEvent(QDragEnterEvent *_evt)
Used to accept drag enter events.
PlotCurveWeakPtr Curve(const unsigned int _id) const
Find a plot curve by id.
PlotCurveWeakPtr AddCurve(const std::string &_label)
Add a named curve.
bool IsShowHoverLine() const
Get whether the hover line is shown.
std::weak_ptr< PlotCurve > PlotCurveWeakPtr
Definition PlottingTypes.hh:41
std::shared_ptr< PlotCurve > PlotCurvePtr
Definition PlottingTypes.hh:37
Forward declarations for the common classes.
Definition Animation.hh:27