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 
67  void update();
68 
69  void onDisplayAdded(rviz::Display* display);
70  void onDisplayRemoved(rviz::Display* display);
71 
72  void onTimeSignal(ros::Time time);
73 
74  void load(const Config& config) override;
75  void save(Config config) const override;
76 
77 protected:
79  QLineEdit* makeTimeLabel();
80 
82  void fillTimeLabel(QLineEdit* label, double time);
83 
85 
86  QPushButton* pause_button_;
88  QComboBox* sync_mode_selector_;
89 
90  QLineEdit* ros_time_label_;
91  QLineEdit* ros_elapsed_label_;
92  QLineEdit* wall_time_label_;
93  QLineEdit* wall_elapsed_label_;
94 };
95 
96 } // namespace rviz
97 
98 #endif
rviz::TimePanel::pauseToggled
void pauseToggled(bool checked)
Definition: time_panel.cpp:222
rviz::Panel
Definition: panel.h:41
rviz::TimePanel::sync_mode_selector_
QComboBox * sync_mode_selector_
Definition: time_panel.h:88
rviz::TimePanel::fillTimeLabel
void fillTimeLabel(QLineEdit *label, double time)
Definition: time_panel.cpp:209
rviz::TimePanel::wall_elapsed_label_
QLineEdit * wall_elapsed_label_
Definition: time_panel.h:93
time.h
rviz::TimePanel::save
void save(Config config) const override
Definition: time_panel.cpp:132
rviz::TimePanel::sync_source_selector_
QComboBox * sync_source_selector_
Definition: time_panel.h:87
rviz::TimePanel::ros_time_label_
QLineEdit * ros_time_label_
Definition: time_panel.h:90
rviz::TimePanel::onInitialize
void onInitialize() override
Definition: time_panel.cpp:109
rviz::Display
Definition: display.h:63
rviz::TimePanel::ros_elapsed_label_
QLineEdit * ros_elapsed_label_
Definition: time_panel.h:91
rviz::TimePanel::TimePanel
TimePanel(QWidget *parent=nullptr)
Definition: time_panel.cpp:49
rviz::TimePanel
Definition: time_panel.h:52
rviz
Definition: add_display_dialog.cpp:54
rviz::TimePanel::onTimeSignal
void onTimeSignal(ros::Time time)
Definition: time_panel.cpp:169
rviz::TimePanel::onDisplayAdded
void onDisplayAdded(rviz::Display *display)
Definition: time_panel.cpp:139
rviz::TimePanel::makeTimeLabel
QLineEdit * makeTimeLabel()
Definition: time_panel.cpp:202
rviz::TimePanel::update
void update()
Definition: time_panel.cpp:214
rviz::TimePanel::wall_time_label_
QLineEdit * wall_time_label_
Definition: time_panel.h:92
ros::Time
rviz::TimePanel::syncSourceSelected
void syncSourceSelected(int index)
Definition: time_panel.cpp:227
rviz::TimePanel::load
void load(const Config &config) override
Definition: time_panel.cpp:120
rviz::TimePanel::onDisplayRemoved
void onDisplayRemoved(rviz::Display *display)
Definition: time_panel.cpp:159
rviz::TimePanel::syncModeSelected
void syncModeSelected(int index)
Definition: time_panel.cpp:234
rviz::TimePanel::pause_button_
QPushButton * pause_button_
Definition: time_panel.h:86
config
config
rviz::TimePanel::config_sync_source_
QString config_sync_source_
Definition: time_panel.h:84
rviz::Config
Configuration data storage class.
Definition: config.h:124
panel.h


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:03