48 QVBoxLayout* layout =
new QVBoxLayout();
52 auto header =
new HeaderWidget(
"Configure Desired Launch Files",
53 "Figure out which launch files you want to be generated.",
this);
54 layout->addWidget(header);
56 QSplitter* splitter =
new QSplitter(Qt::Horizontal,
this);
57 splitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
59 list_widget_ =
new QListWidget(
this);
60 list_widget_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
61 list_widget_->setSelectionMode(QAbstractItemView::ExtendedSelection);
62 connect(list_widget_, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
this,
63 SLOT(onNewSelectedItem(QListWidgetItem*, QListWidgetItem*)));
65 splitter->addWidget(list_widget_);
69 QListWidgetItem* item =
new QListWidgetItem(QString(lb.getTitle().c_str()), list_widget_);
70 item->setData(Qt::UserRole, QVariant(lb.getID()));
72 list_widget_->addItem(item);
75 text_widget_ =
new QLabel(
this);
76 text_widget_->setFrameShape(QFrame::StyledPanel);
77 text_widget_->setFrameShadow(QFrame::Raised);
78 text_widget_->setLineWidth(1);
79 text_widget_->setMidLineWidth(0);
80 text_widget_->setWordWrap(
true);
81 text_widget_->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
82 text_widget_->setMinimumWidth(100);
83 text_widget_->setAlignment(Qt::AlignTop);
84 splitter->addWidget(text_widget_);
85 layout->addWidget(splitter);
99 disconnect(list_widget_, SIGNAL(itemChanged(QListWidgetItem*)),
this, SLOT(changeCheckedState(QListWidgetItem*)));
100 for (
int i = 0; i < list_widget_->count(); ++i)
102 QListWidgetItem* item = list_widget_->item(i);
104 unsigned int id =
getID(item);
106 item->setCheckState(setup_step_.
getState(
id) ? Qt::Checked : Qt::Unchecked);
108 connect(list_widget_, SIGNAL(itemChanged(QListWidgetItem*)),
this, SLOT(changeCheckedState(QListWidgetItem*)));