Class Avogadro::QtGui::InterfaceWidget

class Avogadro::QtGui::InterfaceWidget : public QWidget

The InterfaceWidget class provides a user interface for running external scripts.



InterfaceWidget creates a GUI to represent the options given by an script, turning JSON from the script into a form and passing the results back to the script via command-line


Public Functions

explicit InterfaceWidget(const QString &scriptFilePath, QWidget *parent_ = nullptr)

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

~InterfaceWidget() override
void setInterfaceScript(const QString &scriptFilePath)

Use the script pointed to by scriptFilePath.


scriptFilePath – Absolute path to script.

void setMolecule(QtGui::Molecule *mol)

Set the molecule used in the simulation.

inline const QtGui::InterfaceScript &interfaceScript() const

Access to the underlying input generator object.

QJsonObject collectOptions() const

Collect all of the user-specified options into a JSON object, to be sent to the generator script.

void applyOptions(const QJsonObject &opts)

Apply the options in the passed QJsonObject to the GUI. Any widgets changed by this method will have their signals blocked while modifying their values.

inline bool isEmpty() const