26 #include <ArmarXGui/gui-plugins/SystemStateMonitorPlugin/ui_ArmarXManagerRepositoryDialog.h>
28 #include <ArmarXCore/interface/core/ArmarXManagerInterface.h>
35 #include <QInputDialog>
36 #include <QStandardItem>
37 #include <QItemSelectionModel>
38 #include <QPersistentModelIndex>
39 #include <QMessageBox>
51 this->managerRepositoryModel = managerRepositoryModel->
clone();
52 this->monitoredManagerModel = monitoredManagerModel->
clone();
68 ui->managerRepository->setModel(managerRepositoryModel);
69 ui->monitoredManagers->setModel(monitoredManagerModel);
71 connect(ui->addNewManager, SIGNAL(clicked()),
this, SLOT(
addNewManager()));
72 connect(ui->cancelOkBox, SIGNAL(accepted()),
this, SLOT(accept()));
73 connect(ui->cancelOkBox, SIGNAL(rejected()),
this, SLOT(reject()));
79 connect(ui->scanButton, SIGNAL(clicked()),
this, SLOT(
scanForManagers()));
81 connect(ui->clearButton, SIGNAL(clicked()),
this, SLOT(
clearRepository()));
87 QStringList::ConstIterator it = managers.begin();
90 brush.setColor(QColor(78, 238, 148));
91 brush.setStyle(Qt::SolidPattern);
93 while (it != managers.end())
106 managerRepositoryModel->appendRow(item);
110 item->setBackground(brush);
120 QString managerName = QInputDialog::getText(parent,
121 tr(
"New ArmarXManager"),
124 tr(
"SampleApplicationManager"),
138 QMessageBox::information(parent,
140 managerName +
" manager already in repository",
150 ui->managerRepository->selectionModel(),
151 managerRepositoryModel);
158 ui->monitoredManagers->selectionModel(),
159 managerRepositoryModel);
171 managerRepositoryModel->clear();
177 return managerRepositoryModel;
183 return monitoredManagerModel;
189 managerRepositoryModel->
deleteSelection(ui->managerRepository->selectionModel());