33 #include <QPushButton> 34 #include <QHBoxLayout> 35 #include <QButtonGroup> 59 experimental_cb_->setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum) );
70 sync_mode_selector_->setToolTip(
"Allows you to synchronize the ROS time and Tf transforms to a given source.");
78 QHBoxLayout* experimental_layout =
new QHBoxLayout(
this);
80 experimental_layout->addWidget(
new QLabel(
"Synchronization:" ));
82 experimental_layout->addWidget(
new QLabel(
"Source:" ));
84 experimental_layout->addSpacing(20);
85 experimental_layout->setContentsMargins( 0, 0, 20, 0 );
89 QHBoxLayout* old_layout =
new QHBoxLayout(
this);
90 old_layout->addWidget(
new QLabel(
"ROS Elapsed:" ));
92 old_layout->addWidget(
new QLabel(
"Wall Time:" ));
94 old_layout->addWidget(
new QLabel(
"Wall Elapsed:" ));
96 old_layout->setContentsMargins( 0, 0, 20, 0 );
99 QHBoxLayout* layout =
new QHBoxLayout(
this);
102 layout->addWidget(
new QLabel(
"ROS Time:" ));
105 layout->addStretch(100);
108 layout->addStretch();
109 layout->setContentsMargins( 11, 5, 11, 5 );
132 if( config.
mapGetInt(
"SyncMode", &sync_mode ))
138 bool experimental =
false;
139 config.
mapGetBool(
"Experimental", &experimental );
160 for(
int i = 0; i < display_group->
numDisplays(); i++ )
174 QString name = display->
getName();
184 QString name = display->
getName();
213 QLineEdit* label =
new QLineEdit;
214 label->setReadOnly(
true );
220 label->setText( QString::number( time,
'f', 2 ));
QLineEdit * wall_elapsed_label_
TimePanel(QWidget *parent=0)
virtual void save(Config config) const
QPushButton * pause_button_
QWidget * experimental_widget_
QString config_sync_source_
VisualizationManager * vis_manager_
QComboBox * sync_source_selector_
virtual void onInitialize()
void fillTimeLabel(QLineEdit *label, double time)
virtual void load(const Config &config)
void pauseToggled(bool checked)
QCheckBox * experimental_cb_
virtual int numDisplays() const
Return the number of child Displays.
QComboBox * sync_mode_selector_
FrameManager * getFrameManager() const
Return the FrameManager instance.
bool mapGetString(const QString &key, QString *value_out) const
Convenience function for looking up a named string.
void mapSetValue(const QString &key, QVariant value)
Set a named child to the given value.
Configuration data storage class.
double getWallClock()
Return the wall clock time, in seconds since 1970.
QLineEdit * ros_elapsed_label_
QLineEdit * ros_time_label_
double getROSTimeElapsed()
Return the ROS time in seconds since the last reset.
void experimentalToggled(bool checked)
A Display object which stores other Displays as children.
bool mapGetBool(const QString &key, bool *value_out) const
Convenience function for looking up a named boolean.
void syncSourceSelected(int index)
double getROSTime()
Return the ROS time, in seconds.
void setPause(bool pause)
Enable/disable pause mode.
virtual Display * getDisplayAt(int index) const
Return the index-th Display in this group, or NULL if the index is invalid.
bool mapGetInt(const QString &key, int *value_out) const
Convenience function for looking up a named integer.
void onDisplayAdded(rviz::Display *display)
void syncModeSelected(int index)
QLineEdit * makeTimeLabel()
void syncTime(ros::Time time)
Synchronize with given time.
double getWallClockElapsed()
Return the wall clock time in seconds since the last reset.
void setSyncMode(SyncMode mode)
Set synchronization mode (off/exact/approximate)
void notifyConfigChanged()
Notify this VisualizationManager that something about its display configuration has changed...
virtual void save(Config config) const
Override to save configuration data. This version saves the name and class ID of the panel...
QLineEdit * wall_time_label_
virtual void load(const Config &config)
Override to load configuration data. This version loads the name of the panel.
void onTimeSignal(rviz::Display *display, ros::Time time)
virtual QString getName() const
Return the name of this Property as a QString.
virtual DisplayGroup * getRootDisplayGroup() const
void onDisplayRemoved(rviz::Display *display)