|
AvogadroLibs 1.103.0
|
The InterfaceWidget class provides a user interface for running external scripts. More...
#include <interfacewidget.h>
Public Member Functions | |
| InterfaceWidget (const QString &scriptFilePath, QWidget *parent_=nullptr) | |
| void | setInterfaceScript (const QString &scriptFilePath) |
| const QtGui::InterfaceScript & | interfaceScript () 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) |
| QWidget * | createTableWidget (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) |
| void | setTableOption (const QString &name, const QJsonValue &value) |
| Protected Attributes inherited from JsonWidget | |
| QtGui::Molecule * | m_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 |
<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-line
|
explicit |
Construct a widget that dynamically generates a GUI to configure the script specified by scriptFilePath.
| void setInterfaceScript | ( | const QString & | scriptFilePath | ) |
Use the script pointed to by scriptFilePath.
| scriptFilePath | Absolute path to script. |
| const QtGui::InterfaceScript & interfaceScript | ( | ) | const |
Access to the underlying input script object.