10#include <QDesktopWidget>
13namespace MantidWidgets {
25 std::vector<std::string> selectedSessions;
26 for (
int row = 0; row <
m_uiForm.selectedCatalogs->count(); ++row) {
27 if (
m_uiForm.selectedCatalogs->item(row)->isSelected()) {
28 selectedSessions.emplace_back(
m_uiForm.selectedCatalogs->item(row)->data(Qt::UserRole).toString().toStdString());
31 return selectedSessions;
41 for (
unsigned row = 0; row < session.size(); ++row) {
43 if (!
m_uiForm.selectedCatalogs->item(row)) {
44 QListWidgetItem *item =
new QListWidgetItem(QString::fromStdString(session.at(row)->getFacility()));
46 item->setData(Qt::UserRole, QVariant(QString::fromStdString(session.at(row)->getSessionId())));
49 item->setData(Qt::ToolTipRole, QVariant(QString::fromStdString(
"The soap-endpoint for this catalog is: " +
50 session.at(row)->getSoapEndpoint())));
52 item->setCheckState(Qt::Checked);
53 m_uiForm.selectedCatalogs->insertItem(row, item);
54 m_uiForm.selectedCatalogs->item(row)->setSelected(
true);
58 m_uiForm.selectedCatalogs->setFocus();
69 connect(
m_uiForm.updateBtn, SIGNAL(clicked()),
this, SLOT(close()));
70 connect(
m_uiForm.cancelBtn, SIGNAL(clicked()),
this, SLOT(close()));
73 connect(
m_uiForm.selectedCatalogs, SIGNAL(itemClicked(QListWidgetItem *)),
this,
77 this->setGeometry(QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, this->window()->size(),
78 QDesktopWidget().availableGeometry()));
85 if (item->isSelected())
86 item->setCheckState(Qt::Checked);
87 if (!item->isSelected())
88 item->setCheckState(Qt::Unchecked);
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...