AvogadroLibs 1.98.1
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Static Public Attributes | List of all members
MoleQueueWidget Class Reference

The MoleQueueWidget class provides a widget for configuring and submitting a MoleQueue::JobObject. More...

#include <molequeuewidget.h>

Inheritance diagram for MoleQueueWidget:

Public Slots

void refreshPrograms ()
 
int submitJobRequest ()
 

Signals

void jobSubmitted (bool success)
 
void jobFinished (bool success)
 
void jobUpdated (const JobObject &job)
 

Public Member Functions

 MoleQueueWidget (QWidget *parent_=nullptr)
 
void showAndSelectProgram (const QString &programName)
 
bool submissionSuccess () const
 
QString jobState () const
 
bool jobCompleted () const
 
bool jobSuccess () const
 
int requestId () const
 
unsigned int moleQueueId () const
 
QString submissionError () const
 
bool openOutput () const
 
bool requestJobLookup ()
 Request the current state of the job identified by moleQueueId() from the server. The result will be emitted in the jobUpdated() signal.
 
void setBatchMode (bool batch)
 
bool batchMode () const
 
bool programSelected ()
 
JobObject configuredJob () const
 

Static Public Attributes

static const unsigned int InvalidMoleQueueId
 
JobObjectjobTemplate ()
 
const JobObjectjobTemplate () const
 
void setJobTemplate (const JobObject &job)
 

Detailed Description

<avogadro/molequeue/molequeuewidget.h>

Member Function Documentation

◆ jobTemplate() [1/2]

JobObject & jobTemplate ( )

A "template" MoleQueue::JobObject that is used to initialize the GUI. Should be fully configured to submit, as this is used to initialize job that will be submitted by submitJobRequest.

◆ jobTemplate() [2/2]

const JobObject & jobTemplate ( ) const

A "template" MoleQueue::JobObject that is used to initialize the GUI. Should be fully configured to submit, as this is used to initialize job that will be submitted by submitJobRequest.

◆ setJobTemplate

void setJobTemplate ( const JobObject job)
slot

A "template" MoleQueue::JobObject that is used to initialize the GUI. Should be fully configured to submit, as this is used to initialize job that will be submitted by submitJobRequest.

◆ showAndSelectProgram()

void showAndSelectProgram ( const QString &  programName)

Expand all queue nodes that contain a program that matches programName and select the first matching program node. Matches are case insensitive.

◆ submissionSuccess()

bool submissionSuccess ( ) const
Returns
True if the last submission was successful. Only valid after jobSubmitted has been emitted.

◆ jobState()

QString jobState ( ) const
Returns
True if the last submission was successful. Only valid after jobSubmitted has been emitted.

◆ jobCompleted()

bool jobCompleted ( ) const
Returns
True if the job has finished running.

◆ jobSuccess()

bool jobSuccess ( ) const
Returns
true if the job completed without error.

◆ requestId()

int requestId ( ) const
Returns
The request id associated with the last call to submitJobRequest. -1 if there was a submission error.

◆ moleQueueId()

unsigned int moleQueueId ( ) const
Returns
The MoleQueue ID associated with the last submitJobRequest() call. Only valid after jobSubmitted has been emitted.
Note
If an error occurs, InvalidMoleQueueId will be returned.

◆ submissionError()

QString submissionError ( ) const
Returns
A string describing the submission error when submissionSuccess() return false.

◆ openOutput()

bool openOutput ( ) const
Returns
True if the user has requested that the output file be opened when the calculation completes.

◆ requestJobLookup()

bool requestJobLookup ( )
Returns
True if moleQueueId() is valid and the server is connected, false if the request cannot be sent.

◆ setBatchMode()

void setBatchMode ( bool  batch)

If the widget is in 'batch mode', options that don't make sense are hidden (such as 'open output when finished').

◆ programSelected()

bool programSelected ( )
Returns
True if the user has selected a program, false otherwise.

◆ configuredJob()

JobObject configuredJob ( ) const
Returns
A JobObject with the GUI options. Any settings in jobTemplate that are not handled by the GUI are passed through untouched to the new object.

◆ refreshPrograms

void refreshPrograms ( )
slot

Query the MoleQueue server (if available) for the list of available queues and programs.

◆ submitJobRequest

int submitJobRequest ( )
slot

Submit the job returned by configuredJob() to MoleQueue.

Returns
The request id associated with the submission, or -1 on error.
Note
The result of the submission request can be checked by monitoring jobSubmitted, which will always be emitted after this slot is called.

◆ jobSubmitted

void jobSubmitted ( bool  success)
signal

Emitted after a call to submitJobRequest

Parameters
successTrue if the job has been accepted by MoleQueue.

◆ jobFinished

void jobFinished ( bool  success)
signal

Emitted after jobSubmitted is emitted and the job completes.

Parameters
successTrue if the job enters the "Finished" state. False if the job enters the "Canceled" or "Error" states.

◆ jobUpdated

void jobUpdated ( const JobObject job)
signal

Emitted after a successful call to requestJobLookup().

Parameters
jobThe result of the lookupJob() RPC query.

Member Data Documentation

◆ InvalidMoleQueueId

const unsigned int InvalidMoleQueueId
static

Indicates an invalid MoleQueue ID in the moleQueueId() result.


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