class Avogadro::MoleQueue::MoleQueueDialog : public QDialog#
Options controlling job submission behavior in the submitJob method.
Keep the dialog open until MoleQueue replies to the submission request. If a submission error occurs, the user will have to opportunity to fix it.
Use the program in the template job to initialize the queue/program view. All queues containing a matching program will be expanded, and the first match will be selected. To match, an existing program must contain the template program string, and comparisons are case insensitive.
- enumerator WaitForSubmissionResponse#
Return values from submitJob indicating result.
The job was accepted by MoleQueue. This can only be returned when WaitForSubmissionResponse IS set as an option.
The job was not submitted to MoleQueue, likely due to a disconnected server. This can only be returned when WaitForSubmissionResponse IS NOT set as an option.
The job was submitted to MoleQueue. This can only be returned when WaitForSubmissionResponse is NOT set as an option.
The user canceled the submission.
The user requested that the job output be opened when finished, but the job did not finish successfully (the job was either canceled or failed).
The user requested that the job output be opened when finished, and the job completed without error. The jobTemplate argument of submitJob will be overwritten with the current job details, fetched from the server after the job enters the “Finished” state.
- enumerator SubmissionSuccessful#
void done(int r) override#
Public Static Functions
static SubmitStatus submitJob(QWidget *parent_, const QString &caption, JobObject &jobTemplate, SubmitOptions options, unsigned int *moleQueueId = nullptr, int *submissionRequestId = nullptr)#
Show a job configuration dialog and let the user submit the job to MoleQueue.
parent_ – The parent widget for parenting/layout purposes.
caption – The dialog title.
jobTemplate – A template job, used to initialize GUI options. If the user requests that the job output is opened and the job finishes successfully, this will be overwritten with the current job details, and JobFinished is returned.
options – Bitwise combination of flags that control dialog behavior.
moleQueueId – If not nullptr, the variable referenced by this pointer will be overwritten by the MoleQueue Id of the submitted job when the option WaitForSubmissionResponse is set. If an error occurs or the required option is not set, this value will be set to MoleQueueWidget::InvalidMoleQueueId.
submissionRequestId – If not nullptr, the variable referenced by this pointer will be overwritten by the submitJob JSON-RPC 2.0 request id. If an error occurs, this value will be set to -1.
A SubmitStatus enum value indicating the result of the submission.
static bool promptForJobOptions(QWidget *windowParent, const QString &caption, JobObject &jobTemplate)#
Show a job configuration dialog and collect the user’s selected options.
windowParent – The parent of the dialog window.
caption – Title of the dialog window.
jobTemplate – JobObject with initial options. Will be overwritten with the configured job options.
True on success, false otherwise.
- enum SubmitOption#