AvogadroLibs  1.93.0
Public Member Functions | List of all members
InterfaceWidget Class Reference

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

#include <interfacewidget.h>

Inheritance diagram for InterfaceWidget:

Public Member Functions

 InterfaceWidget (const QString &scriptFilePath, QWidget *parent_=0)
 
void setInterfaceScript (const QString &scriptFilePath)
 
void setMolecule (QtGui::Molecule *mol)
 
const QtGui::InterfaceScriptinterfaceScript () const
 
QJsonObject collectOptions () const
 
void applyOptions (const QJsonObject &opts)
 
bool isEmpty () const
 

Detailed Description

<avogadro/qtgui/interfacewidget.h>

See also
InterfaceScript

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-line

Constructor & Destructor Documentation

◆ InterfaceWidget()

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

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

Member Function Documentation

◆ setInterfaceScript()

void setInterfaceScript ( const QString &  scriptFilePath)

Use the script pointed to by scriptFilePath.

Parameters
scriptFilePathAbsolute path to script.

◆ setMolecule()

void setMolecule ( QtGui::Molecule mol)

Set the molecule used in the simulation.

◆ interfaceScript()

const QtGui::InterfaceScript& interfaceScript ( ) const

Access to the underlying input generator object.

◆ collectOptions()

QJsonObject collectOptions ( ) const

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

◆ applyOptions()

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.


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