time_panel.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, Willow Garage, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #ifndef RVIZ_TIME_PANEL_H
31 #define RVIZ_TIME_PANEL_H
32 
33 #include "rviz/panel.h"
34 #include "ros/time.h"
35 
36 class QLineEdit;
37 class QComboBox;
38 class QCheckBox;
39 class QPushButton;
40 class QHBoxLayout;
41 class QWidget;
42 
43 namespace rviz
44 {
45 class VisualizationManager;
46 class Display;
47 
52 class TimePanel : public Panel
53 {
54  Q_OBJECT
55 public:
56  TimePanel(QWidget* parent = nullptr);
57 
58  void onInitialize() override;
59 
60 protected Q_SLOTS:
61 
62  void pauseToggled(bool checked);
63  void syncModeSelected(int index);
64  void syncSourceSelected(int index);
65  void experimentalToggled(bool checked);
66 
68  void update();
69 
70  void onDisplayAdded(rviz::Display* display);
71  void onDisplayRemoved(rviz::Display* display);
72 
73  void onTimeSignal(ros::Time time);
74 
75  void load(const Config& config) override;
76  void save(Config config) const override;
77 
78 protected:
80  QLineEdit* makeTimeLabel();
81 
83  void fillTimeLabel(QLineEdit* label, double time);
84 
85  QWidget* old_widget_;
87 
89 
90  QCheckBox* experimental_cb_;
91 
92  QPushButton* pause_button_;
94  QComboBox* sync_mode_selector_;
95 
96  QLineEdit* ros_time_label_;
97  QLineEdit* ros_elapsed_label_;
98  QLineEdit* wall_time_label_;
99  QLineEdit* wall_elapsed_label_;
100 };
101 
102 } // namespace rviz
103 
104 #endif
QLineEdit * wall_elapsed_label_
Definition: time_panel.h:99
QPushButton * pause_button_
Definition: time_panel.h:92
QWidget * experimental_widget_
Definition: time_panel.h:86
QString config_sync_source_
Definition: time_panel.h:88
void save(Config config) const override
Definition: time_panel.cpp:143
QComboBox * sync_source_selector_
Definition: time_panel.h:93
void fillTimeLabel(QLineEdit *label, double time)
Definition: time_panel.cpp:223
config
void pauseToggled(bool checked)
Definition: time_panel.cpp:236
QCheckBox * experimental_cb_
Definition: time_panel.h:90
QComboBox * sync_mode_selector_
Definition: time_panel.h:94
TimePanel(QWidget *parent=nullptr)
Definition: time_panel.cpp:49
void onInitialize() override
Definition: time_panel.cpp:116
Configuration data storage class.
Definition: config.h:124
QWidget * old_widget_
Definition: time_panel.h:85
QLineEdit * ros_elapsed_label_
Definition: time_panel.h:97
QLineEdit * ros_time_label_
Definition: time_panel.h:96
void experimentalToggled(bool checked)
Definition: time_panel.cpp:241
void onTimeSignal(ros::Time time)
Definition: time_panel.cpp:183
void syncSourceSelected(int index)
Definition: time_panel.cpp:260
void onDisplayAdded(rviz::Display *display)
Definition: time_panel.cpp:151
void syncModeSelected(int index)
Definition: time_panel.cpp:267
QLineEdit * makeTimeLabel()
Definition: time_panel.cpp:216
void load(const Config &config) override
Definition: time_panel.cpp:127
QLineEdit * wall_time_label_
Definition: time_panel.h:98
void onDisplayRemoved(rviz::Display *display)
Definition: time_panel.cpp:173


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat May 27 2023 02:06:25