Avogadro::QtGui::InterfaceWidget#
-
class InterfaceWidget : public JsonWidget#
The InterfaceWidget class provides a user interface for running external scripts.
<avogadro/qtgui/interfacewidget.h>
The
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-lineSee also
Unnamed Group
-
inline QtGui::InterfaceScript &interfaceScript()#
Access to the underlying input script object.
-
inline const QtGui::InterfaceScript &interfaceScript() const#
Access to the underlying input script object.
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. Pass an empty string to create without loading a script (configure via interfaceScript() then call reloadOptions()).
-
~InterfaceWidget() override#
-
void setInterfaceScript(const QString &scriptFilePath)#
Use the script pointed to by scriptFilePath.
- Parameters:
scriptFilePath – Absolute path to script.
-
void reloadOptions()#
Re-fetch options from the underlying script and rebuild the GUI. Call this after configuring the interpreter (e.g. for package mode).
-
inline QtGui::InterfaceScript &interfaceScript()#