31 #include <QVBoxLayout>
32 #include <QScrollArea>
40 QVBoxLayout * verticalLayout1 =
new QVBoxLayout(
this);
41 QScrollArea * scrollArea =
new QScrollArea(
this);
42 scrollArea->setWidgetResizable(
true);
43 QWidget * scrollAreaWidgetContent =
new QWidget();
44 scrollAreaWidgetContent->setObjectName(
"area");
45 QVBoxLayout * layout2 =
new QVBoxLayout(scrollAreaWidgetContent);
46 scrollAreaWidgetContent->setLayout(layout2);
47 scrollArea->setWidget(scrollAreaWidgetContent);
49 QCheckBox *
selectAll =
new QCheckBox(
"Select all",
this);
52 verticalLayout1->addWidget(scrollArea);
73 QWidget * area = this->findChild<QWidget*>(
"area");
74 QVBoxLayout * layout = (QVBoxLayout *)area->layout();
75 QList<QCheckBox*> checkboxes = area->findChildren<QCheckBox*>();
76 while(checkboxes.size() && checkboxes.size() > (
int)
_poses.size())
78 delete *checkboxes.begin();
79 checkboxes.erase(checkboxes.begin());
85 if(
i >= checkboxes.size())
87 checkboxes.push_back(
new QCheckBox(area));
90 checkboxes[
i]->setText(QString(
"%1 (%2)").arg(
iter->first).arg(
iter->second.prettyPrint().c_str()));
91 checkboxes[
i]->setChecked(
_mask.at(
iter->first));
94 connect(checkboxes[
i], SIGNAL(stateChanged(
int)),
this, SLOT(
signalVisibility()));
95 layout->addWidget(checkboxes[
i]);
107 if(this->isVisible())
115 std::map<int, Transform> poses;
128 QCheckBox *
check = qobject_cast<QCheckBox*>(sender());
129 _mask.at(
check->text().split(
'(').first().toInt()) =
check->isChecked();
135 QWidget * area = this->findChild<QWidget*>(
"area");
136 QList<QCheckBox*> checkboxes = area->findChildren<QCheckBox*>();
137 for(
int i = 0;
i<checkboxes.size(); ++
i)
139 checkboxes[
i]->setChecked(checked);