AvogadroLibs 1.99.0
Loading...
Searching...
No Matches
InterfaceWidget Class Reference

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

#include <interfacewidget.h>

Inheritance diagram for InterfaceWidget:
JsonWidget

Public Member Functions

 InterfaceWidget (const QString &scriptFilePath, QWidget *parent_=nullptr)
void setInterfaceScript (const QString &scriptFilePath)
const QtGui::InterfaceScriptinterfaceScript () const
Public Member Functions inherited from JsonWidget
 JsonWidget (QWidget *parent_=nullptr)
virtual void setMolecule (QtGui::Molecule *mol)
QJsonObject collectOptions () const
void applyOptions (const QJsonObject &opts)
bool isEmpty () const

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
virtual void updateOptions ()
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/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_ = nullptr )
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.

◆ interfaceScript()

const QtGui::InterfaceScript & interfaceScript ( ) const

Access to the underlying input script object.


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