56 : QWidget(parent), rviz_panel_(rviz_panel)
59 QVBoxLayout* layout =
new QVBoxLayout();
62 title_ =
new QLabel(
"",
this);
63 QFont group_title_font(QFont().defaultFamily(), 12, QFont::Bold);
64 title_->setFont(group_title_font);
70 connect(
link_tree_, SIGNAL(itemSelectionChanged()),
this, SLOT(itemSelected()));
74 QGridLayout* form_grid =
new QGridLayout();
75 form_grid->setContentsMargins(20, 20, 20, 20);
78 QLabel* base_link_label =
new QLabel(
"Base Link",
this);
79 form_grid->addWidget(base_link_label, 0, 0, Qt::AlignRight);
85 QPushButton* btn_base_link =
new QPushButton(
"Choose Selected",
this);
86 connect(btn_base_link, SIGNAL(clicked()),
this, SLOT(baseLinkTreeClick()));
87 form_grid->addWidget(btn_base_link, 0, 2, Qt::AlignLeft);
90 QLabel* tip_link_label =
new QLabel(
"Tip Link",
this);
91 form_grid->addWidget(tip_link_label, 1, 0, Qt::AlignRight);
97 QPushButton* btn_tip_link =
new QPushButton(
"Choose Selected",
this);
98 connect(btn_tip_link, SIGNAL(clicked()),
this, SLOT(tipLinkTreeClick()));
99 form_grid->addWidget(btn_tip_link, 1, 2, Qt::AlignLeft);
102 layout->addLayout(form_grid);
105 QHBoxLayout* controls_layout =
new QHBoxLayout();
108 QLabel* expand_controls =
new QLabel(
this);
109 expand_controls->setText(
"<a href='expand'>Expand All</a> <a href='contract'>Collapse All</a>");
110 connect(expand_controls, SIGNAL(linkActivated(
const QString)),
this, SLOT(alterTree(
const QString)));
111 controls_layout->addWidget(expand_controls);
114 controls_layout->addItem(
new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
117 QPushButton* btn_save =
new QPushButton(
"&Save",
this);
118 btn_save->setMaximumWidth(200);
119 connect(btn_save, SIGNAL(clicked()),
this, SIGNAL(
doneEditing()));
120 controls_layout->addWidget(btn_save);
121 controls_layout->setAlignment(btn_save, Qt::AlignRight);
124 QPushButton* btn_cancel =
new QPushButton(
"&Cancel",
this);
125 btn_cancel->setMaximumWidth(200);
126 connect(btn_cancel, SIGNAL(clicked()),
this, SIGNAL(
cancelEditing()));
127 controls_layout->addWidget(btn_cancel);
128 controls_layout->setAlignment(btn_cancel, Qt::AlignRight);
131 layout->addLayout(controls_layout);
137 kinematic_chain_loaded_ =
false;