57 : QWidget(parent), long_name_(long_name), short_name_(short_name)
60 QVBoxLayout* layout =
new QVBoxLayout();
63 title_ =
new QLabel(
"",
this);
64 QFont group_title_font(QFont().defaultFamily(), 12, QFont::Bold);
65 title_->setFont(group_title_font);
69 QHBoxLayout* hlayout =
new QHBoxLayout();
72 QVBoxLayout* column1 =
new QVBoxLayout();
83 connect(
data_table_->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this,
84 SLOT(previewSelectedLeft(QItemSelection, QItemSelection)));
87 QStringList data_header_list;
88 data_header_list.append(QString(
" Names").prepend(
short_name_));
89 data_table_->setHorizontalHeaderLabels(data_header_list);
90 data_table_->horizontalHeader()->setDefaultAlignment(Qt::AlignHCenter);
93 hlayout->addLayout(column1);
96 QVBoxLayout* column2 =
new QVBoxLayout();
97 column2->setSizeConstraint(QLayout::SetFixedSize);
100 QPushButton* btn_right =
new QPushButton(
">",
this);
101 btn_right->setMaximumSize(25, 80);
102 connect(btn_right, SIGNAL(clicked()),
this, SLOT(selectDataButtonClicked()));
103 column2->addWidget(btn_right);
106 QPushButton* btn_left =
new QPushButton(
"<",
this);
107 btn_left->setMaximumSize(25, 80);
108 connect(btn_left, SIGNAL(clicked()),
this, SLOT(deselectDataButtonClicked()));
109 column2->addWidget(btn_left);
112 hlayout->addLayout(column2);
115 QVBoxLayout* column3 =
new QVBoxLayout();
126 connect(
selected_data_table_->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this,
127 SLOT(previewSelectedRight(QItemSelection, QItemSelection)));
133 hlayout->addLayout(column3);
136 layout->addLayout(hlayout);
141 QHBoxLayout* controls_layout =
new QHBoxLayout();
142 controls_layout->setContentsMargins(0, 25, 0, 15);
145 controls_layout->addItem(
new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
148 QPushButton* btn_save =
new QPushButton(
"&Save",
this);
150 connect(btn_save, SIGNAL(clicked()),
this, SIGNAL(
doneEditing()));
151 controls_layout->addWidget(btn_save);
152 controls_layout->setAlignment(btn_save, Qt::AlignRight);
155 QPushButton* btn_cancel =
new QPushButton(
"&Cancel",
this);
157 connect(btn_cancel, SIGNAL(clicked()),
this, SIGNAL(
cancelEditing()));
158 controls_layout->addWidget(btn_cancel);
159 controls_layout->setAlignment(btn_cancel, Qt::AlignRight);
162 layout->addLayout(controls_layout);
207 table->setUpdatesEnabled(
false);
208 table->setDisabled(
true);
209 table->clearContents();
212 table->setRowCount(items.size());
216 for (
const std::string& item : items)
220 if (item ==
"ASSUMED_FIXED_ROOT_JOINT")
224 QTableWidgetItem* data_name =
new QTableWidgetItem(item.c_str());
225 data_name->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
228 table->setItem(row, 0, data_name);
234 table->setRowCount(row);
237 table->setUpdatesEnabled(
true);
238 table->setDisabled(
false);