24 #include <ArmarXGui/gui-plugins/StatechartEditorPlugin/view/dialogs/ui_StatechartEditorConfigDialog.h>
26 #include <QPushButton>
30 ui(new Ui_StatechartEditorConfigDialog())
33 QPushButton* okButton = ui->buttonBox->button(QDialogButtonBox::Ok);
34 okButton->setEnabled(
false);
38 QListWidgetItem* item =
new QListWidgetItem(QString::fromUtf8(p->getName().data()));
39 profileMap.insert(std::make_pair(item, p));
41 ui->listWidgetProfiles->addItem(item);
44 connect(ui->listWidgetProfiles, SIGNAL(itemSelectionChanged()), SLOT(itemSelectionChanged()));
54 QList<QListWidgetItem*> selected = ui->listWidgetProfiles->selectedItems();
56 if (selected.size() == 0)
62 return profileMap.at(selected.at(0));
68 return ui->checkBoxOpenAllStates->isChecked();
71 void armarx::StatechartEditorConfigDialog::itemSelectionChanged()
73 QPushButton* okButton = ui->buttonBox->button(QDialogButtonBox::Ok);
74 okButton->setEnabled(ui->listWidgetProfiles->selectedItems().size() > 0);
78 void armarx::StatechartEditorConfigDialog::on_listWidgetProfiles_doubleClicked(
const QModelIndex&
index)