/** * Obtain the name of the workspace selected, and set it to the algorithm's * property. * @param wsName :: The name of the workspace to publish. */ void CatalogPublishDialog::workspaceSelected(const QString &wsName) { // Prevents both a file and workspace being published at same time. storePropertyValue("FileName", ""); setPropertyValue("FileName", true); // Set the workspace property to the one the user has selected to publish. storePropertyValue("InputWorkspace", wsName); setPropertyValue("InputWorkspace", true); }
/** * Set the "FileName" property when a file is selected from the file browser. */ void CatalogPublishDialog::fileSelected() { // Reset workspace property as the input is a file. This prevents both being selected. storePropertyValue("InputWorkspace", ""); setPropertyValue("InputWorkspace", true); // Set the FileName property to the path that appears in the input field on the dialog. storePropertyValue("FileName", m_uiForm.dataSelector->getFullFilePath()); setPropertyValue("FileName", true); }
/** * The Slot to gather input from the dialog, store it in the propertyValue * and then emit the signal for valid input. Preparing for accept() to be run. */ void GetNegMuMuonicXRDDialog::parseInput() { // getting a list of strings of elements selected from periodicTableWidget QString elementsSelectedStr = m_periodicTable->getAllCheckedElementsStr(); // if no elements are selected from the PeriodicTableWidget, a pop-up appears // to the user. if (elementsSelectedStr == "") { QMessageBox::information( this, "GetNegMuMuonicXRDDialog", "No elements were selected, Please select an element from the table"); } // If elements have been selected and y-position text is non-empty then // store the inputs as the corresponding propertyValues and emit validInput // signal. if (elementsSelectedStr != "") { storePropertyValue("Elements", elementsSelectedStr); if (m_yPosition->text() != "") { storePropertyValue("YAxisPosition", m_yPosition->text()); } if (m_groupWorkspaceNameInput->text() != "") { storePropertyValue("OutputWorkspace", m_groupWorkspaceNameInput->text()); } emit validInput(); } }
/** * Set/Update the sessionID of the `Session` property when * the user selects an investigation from the combo-box. */ void CatalogPublishDialog::setSessionProperty(int index) { storePropertyValue( "Session", m_uiForm.investigationNumberCb->itemData(index, Qt::UserRole).toString()); }