PlotWindow.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef GAZEBO_GUI_PLOT_PLOTWINDOW_HH_
18 #define GAZEBO_GUI_PLOT_PLOTWINDOW_HH_
19 
20 #include <list>
21 #include <memory>
22 
23 #include "gazebo/gui/qt.h"
24 #include "gazebo/util/system.hh"
25 
26 namespace gazebo
27 {
28  namespace gui
29  {
30  // Forward declare private data class
31  class PlotWindowPrivate;
32 
33  class PlotCanvas;
34 
36  class GZ_GUI_VISIBLE PlotWindow : public QWidget
37  {
38  Q_OBJECT
39 
42  public: PlotWindow(QWidget *_parent = nullptr);
43 
45  public: virtual ~PlotWindow();
46 
48  public: PlotCanvas *AddCanvas();
49 
52  public: std::list<PlotCanvas *> Plots();
53 
56  public: void RemoveCanvas(PlotCanvas *_canvas);
57 
60  public: unsigned int CanvasCount() const;
61 
63  public: void Clear();
64 
67  public: void Restart();
68 
72  private: void UpdateCanvas();
73 
75  private slots: void Update();
76 
78  private slots: void OnExport();
79 
81  private slots: void OnAddCanvas();
82 
84  private slots: void OnRemoveCanvas();
85 
87  private slots: void TogglePause();
88 
91  private: std::unique_ptr<PlotWindowPrivate> dataPtr;
92  };
93  }
94 }
95 #endif
Plot canvas.
Definition: PlotCanvas.hh:40
Plot window.
Definition: PlotWindow.hh:36