AvogadroLibs 1.100.0
Loading...
Searching...
No Matches
InputGeneratorWidget Class Reference

The InputGeneratorWidget class provides a user interface for configuring, saving, editing, and running input files produced by InputGenerator scripts. More...

#include <inputgeneratorwidget.h>

Inheritance diagram for InputGeneratorWidget:
JsonWidget

Public Member Functions

 InputGeneratorWidget (QWidget *parent_=nullptr)
void setInputGeneratorScript (const QString &scriptFilePath)
Public Member Functions inherited from JsonWidget
 JsonWidget (QWidget *parent_=nullptr)
QJsonObject collectOptions () const
void applyOptions (const QJsonObject &opts)
bool isEmpty () const
const InputGeneratorinputGenerator () const
bool batchMode () const
bool configureBatchJob (BatchJob &batch) const
void setMolecule (QtGui::Molecule *mol) override
void setBatchMode (bool m)
void closeClicked ()
 closeClicked is emitted when the close button is clicked.
void openJobOutput (const JobObject &job)
void showEvent (QShowEvent *e) override
void updateOptions () override

Additional Inherited Members

Protected Member Functions inherited from JsonWidget
QString lookupOptionType (const QString &name) const
bool optionString (const QString &option, QString &value) const
 Search for an option named option and convert its value to a string.
QString generateJobTitle () const
void buildOptionGui ()
void combinedOptionRow (const QString &label1, const QString &label2, const QString &tr1, const QString &tr2, QJsonObject &options, bool bothLabels=false)
void addOptionRow (const QString &key, const QString &label, const QJsonValue &option)
QWidget * createOptionWidget (const QJsonValue &option)
QWidget * createStringListWidget (const QJsonObject &obj)
QWidget * createStringWidget (const QJsonObject &obj)
QWidget * createFilePathWidget (const QJsonObject &obj)
QWidget * createIntegerWidget (const QJsonObject &obj)
QWidget * createFloatWidget (const QJsonObject &obj)
QWidget * createBooleanWidget (const QJsonObject &obj)
QWidget * createTextWidget (const QJsonObject &obj)
void setOptionDefaults ()
void setOption (const QString &name, const QJsonValue &defaultValue)
void setStringListOption (const QString &name, const QJsonValue &value)
void setStringOption (const QString &name, const QJsonValue &value)
void setFilePathOption (const QString &name, const QJsonValue &value)
void setIntegerOption (const QString &name, const QJsonValue &value)
void setFloatOption (const QString &name, const QJsonValue &value)
void setBooleanOption (const QString &name, const QJsonValue &value)
void setTextOption (const QString &name, const QJsonValue &value)
Protected Attributes inherited from JsonWidget
QtGui::Moleculem_molecule
QJsonObject m_options
QJsonObject m_optionCache
QList< QTextEdit * > m_dirtyTextEdits
bool m_empty
bool m_batchMode
QFormLayout * m_currentLayout
QWidget * m_centralWidget
QMap< QString, QWidget * > m_widgets
QMap< QString, QTextEdit * > m_textEdits

Detailed Description

<avogadro/molequeue/inputgeneratorwidget.h>

See also
InputGenerator InputGeneratorDialog

The InputGeneratorWidget creates a GUI to represent the options given by an input generator script, and has some utilities for job submission through MoleQueue.

By default, the widget will configure input files for a single molecule, which can be either written to disk or submitted for processing with MoleQueue.

By enabling batch mode (setBatchMode()), the current molecule is used to configure a calculation for submission to MoleQueue, and the parameters are saved. These may be used to configure and submit jobs for other molecules.

Constructor & Destructor Documentation

◆ InputGeneratorWidget()

InputGeneratorWidget ( QWidget * parent_ = nullptr)
explicit

Construct a widget that dynamically generates a GUI to configure the InputGenerator script specified by scriptFilePath.

Member Function Documentation

◆ setInputGeneratorScript()

void setInputGeneratorScript ( const QString & scriptFilePath)

Use the input generator script pointed to by scriptFilePath.

Parameters
scriptFilePathAbsolute path to generator script.

◆ inputGenerator()

const InputGenerator & inputGenerator ( ) const

Access to the underlying input generator object.

◆ batchMode()

bool batchMode ( ) const
Returns
True if the widget is in batch mode. See the class documentation for details. Default is false.

◆ configureBatchJob()

bool configureBatchJob ( BatchJob & batch) const

Collect the current calculation parameters and prompt for MoleQueue options. Both option sets are stored in batch.

◆ setMolecule()

void setMolecule ( QtGui::Molecule * mol)
overridevirtual

Access to the underlying input generator object.

Reimplemented from JsonWidget.

◆ setBatchMode

void setBatchMode ( bool m)
slot

Enable/disable 'template mode'. See the class documentation for details. Default is off.

◆ openJobOutput

void openJobOutput ( const JobObject & job)
signal

Emitted when the user requests that a job's output be loaded in Avogadro.

◆ showEvent()

void showEvent ( QShowEvent * e)
overrideprotected

Reimplemented to update preview text. Hidden dialogs will wait until they are reshown to update the text to prevent overwriting any modified buffers.

◆ updateOptions()

void updateOptions ( )
overrideprotectedvirtual

Access to the underlying input generator object.

Reimplemented from JsonWidget.


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