17 #ifndef GAZEBO_GUI_PLOT_PLOTCANVAS_HH_
18 #define GAZEBO_GUI_PLOT_PLOTCANVAS_HH_
24 #include <ignition/math/Vector2.hh>
36 class IncrementalPlot;
37 class PlotCanvasPrivate;
54 public:
void SetVariableLabel(
const unsigned int _id,
55 const std::string &_label);
61 public:
unsigned int AddVariable(
const std::string &_variable,
62 const unsigned int _plotId = EmptyPlot);
69 public:
void RemoveVariable(
const unsigned int _id,
70 const unsigned int _plotId = EmptyPlot);
74 public:
unsigned int AddPlot();
78 public:
void RemovePlot(
const unsigned int _plotId);
82 public:
unsigned int PlotCount()
const;
87 public:
unsigned int VariableCount(
const unsigned int _plotId)
const;
91 public:
void Restart();
94 public:
void Update();
99 public:
unsigned int PlotByVariable(
const unsigned int _variableId)
const;
103 public: std::vector<IncrementalPlot *> Plots()
const;
111 public:
void Clear();
116 public:
void SetDeleteCanvasEnabled(
const bool _enable);
122 public:
virtual bool eventFilter(QObject *_o, QEvent *_event);
126 public: std::string Title()
const;
131 public:
void Export(
const std::string &_dirName,
137 private:
void ExportPDF(
const std::string &_dirName)
const;
142 private:
void ExportCSV(
const std::string &_dirName)
const;
150 private:
void AddVariable(
const unsigned int _id,
151 const std::string &_variable,
152 const unsigned int _plotId = EmptyPlot);
157 private:
void UpdateAxisLabel();
160 Q_SIGNALS:
void CanvasDeleted();
164 private slots:
void OnAddVariable(
const std::string &_variable);
171 private slots:
void OnAddVariable(
const unsigned int _id,
172 const std::string &_variable,
const unsigned int _targetId);
178 private slots:
void OnRemoveVariable(
const unsigned int _id,
179 const unsigned int _targetId);
185 private slots:
void OnMoveVariable(
const unsigned int _id,
186 const unsigned int _targetId);
191 private slots:
void OnSetVariableLabel(
const unsigned int _id,
192 const std::string &_label);
195 private slots:
void OnClearCanvas();
198 private slots:
void OnDeleteCanvas();
201 private slots:
void OnShowGrid();
204 private slots:
void OnShowHoverLine();
211 private: std::unique_ptr<PlotCanvasPrivate> dataPtr;
FileType
Supported file types.
Definition: ExportDialog.hh:34
Plot canvas.
Definition: PlotCanvas.hh:40
std::weak_ptr< PlotCurve > PlotCurveWeakPtr
Definition: PlottingTypes.hh:41
default namespace for gazebo
static const unsigned int EmptyPlot
Empty plot used to indicate non-existent plot.
Definition: PlotCanvas.hh:207
Plot Curve data.
Definition: PlotCurve.hh:41