Loading...
Searching...
No Matches
MoleQueueDialog Class Reference

The MoleQueueDialog class provides a thin wrapper around MoleQueueWidget for standalone use. More...

`#include <molequeuedialog.h>`

Inheritance diagram for MoleQueueDialog:

## Public Types

enum | SubmitOption { WaitForSubmissionResponse = 0x1 , SelectProgramFromTemplate = 0x2 }
| Options controlling job submission behavior in the submitJob method. More...
enum | SubmitStatus { SubmissionSuccessful = 0 , SubmissionFailed , SubmissionAttempted , SubmissionAborted , JobFailed , JobFinished }
| Return values from submitJob indicating result. More...

## Public Slots

void | done (int r) override

## Public Member Functions

| MoleQueueDialog (QWidget *parent_=nullptr)
MoleQueueWidget & | widget ()
const MoleQueueWidget & | widget () const

## Static Public Member Functions

static SubmitStatus | submitJob (QWidget *parent_, const QString &caption, JobObject &jobTemplate, SubmitOptions options, unsigned int *moleQueueId=nullptr, int *submissionRequestId=nullptr)
static bool | promptForJobOptions (QWidget *windowParent, const QString &caption, JobObject &jobTemplate)

## Detailed Description

<avogadro/molequeue/molequeuedialog.h>

See also
  MoleQueueWidget MoleQueueManager

## Member Enumeration Documentation

## SubmitOption

enum SubmitOption

Enumerator
WaitForSubmissionResponse | 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.
SelectProgramFromTemplate | 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.

## SubmitStatus

enum SubmitStatus

Enumerator
SubmissionSuccessful | The job was accepted by MoleQueue. This can only be returned when WaitForSubmissionResponse IS set as an option.
SubmissionFailed | 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.
SubmissionAttempted | The job was submitted to MoleQueue. This can only be returned when WaitForSubmissionResponse is NOT set as an option.
SubmissionAborted | The user canceled the submission.
JobFailed | 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).
JobFinished | 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.

## Member Function Documentation

## submitJob()

SubmitStatus submitJob | ( | QWidget * | parent_,
|  | const QString & | caption,
|  | JobObject & | jobTemplate,
|  | SubmitOptions | options,
|  | unsigned int * | moleQueueId = nullptr,
|  | int * | submissionRequestId = nullptr )

static

Show a job configuration dialog and let the user submit the job to MoleQueue.

Parameters

  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.

Returns
  A SubmitStatus enum value indicating the result of the submission.

## promptForJobOptions()

bool promptForJobOptions | ( | QWidget * | windowParent,
|  | const QString & | caption,
|  | JobObject & | jobTemplate )

static

Show a job configuration dialog and collect the user's selected options.

Parameters

  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.

Returns
  True on success, false otherwise.

## widget() [1/2]

MoleQueueWidget & widget | ( |  | ) |

Returns
  A reference to the internal MoleQueueWidget instance.

## widget() [2/2]

const MoleQueueWidget & widget | ( |  | ) | const

Returns
  A reference to the internal MoleQueueWidget instance.

The documentation for this class was generated from the following file:

- molequeuedialog.h