#include <BasicChoiceWizardPane.hpp>
|
QButtonGroup * | _buttonGroup |
|
QList< QRadioButton * > | _buttons |
|
QLayout * | _choiceLayout |
|
string | _defaultLibraryPath |
|
bool | _dirty |
|
string | _error |
|
QList< QLabel * > | _labels |
|
QLabel * | _libraryLabel |
|
string | _libraryPath |
|
bool | _openExisting |
|
string | _schemaName |
|
vector< string > | _schemaNames |
|
vector< string > | _schemaTitles |
|
A BasicChoiceWizardPane instance displays the user interface for the question "what do you want
to do" at the start of the wizard guidance process, and it passes the selection on to the target object. The pane also offers a button to select the path to the SMILE schema library, and a button to revert to the default built-in schema library path. The currently selected schema library path is persistent across invocations of the application.
◆ BasicChoiceWizardPane()
BasicChoiceWizardPane::BasicChoiceWizardPane |
( |
bool |
initialOpenExisting, |
|
|
string |
initialSchemaName, |
|
|
bool |
dirty, |
|
|
QObject * |
target |
|
) |
| |
|
explicit |
The default (and only) constructor creates and initializes the GUI for this pane. The first two arguments specify the choice that will be selected when the pane is initially displayed. If the schema name does not match any of the possible choices, no choices will be selected. The third argument indicates the dirty state of the current simulation item hierarchy. The last argument specifies the object that will be notified of changes in the selection through invocation of the object's setBasicChoice() slot.
◆ basicChoiceWasChanged
void BasicChoiceWizardPane::basicChoiceWasChanged |
( |
bool |
openExisting, |
|
|
string |
libraryPath, |
|
|
string |
schemaName |
|
) |
| |
|
signal |
This signal is emitted after the basic choice was changed.
◆ findDefaultLibraryPath()
void BasicChoiceWizardPane::findDefaultLibraryPath |
( |
| ) |
|
|
private |
This function determines the absolute path to the built-in schema library, if it is found, or the empty string otherwise. The function searches relative to the application's executable for the directories used by the build system on various host systems.
◆ loadPersistentLibraryPath()
void BasicChoiceWizardPane::loadPersistentLibraryPath |
( |
| ) |
|
|
private |
This function loads the current schema library path from persistent application preferences. If the application preference does not yet exist (perhaps because the application is being run for the first time), current schema library path is set to the empty string.
◆ loadSchemaInfo()
void BasicChoiceWizardPane::loadSchemaInfo |
( |
| ) |
|
|
private |
This function retrieves information about the current schema library, including the names and user-friendly descriptions of all schemas in the library (or an error message if something went wrong).
◆ selectLibrary
void BasicChoiceWizardPane::selectLibrary |
( |
| ) |
|
|
slot |
This function allows the user to select a new directory containing the SMILE schema library in reaction to a user click on the corresponding push button. The function stores the new library path in the persistent application settings, and then then calls the loadSchemaInfo() and updateChoiceInterface() functions to update the internal schema information and the user interface accordingly.
◆ setBasicChoice
void BasicChoiceWizardPane::setBasicChoice |
( |
QAbstractButton * |
button | ) |
|
|
slot |
This function updates the basic choice in reaction to a user click on one of the radio buttons. If the current hierarchy is dirty, and the new choice differs from the previous one, the function asks for confirmation from the user before actually updating the choice. If the new choice is the same as the previous one, the function does nothing.
◆ setDefaultLibrary
void BasicChoiceWizardPane::setDefaultLibrary |
( |
| ) |
|
|
slot |
This function sets the SMILE schema library path to the built-in path, assuming it exists, in reaction to a user click on the corresponding push button. The function stores the new library path in the persistent application settings, and then calls the loadSchemaInfo() and updateChoiceInterface() functions to update the internal schema information and the user interface accordingly.
◆ storePersistentLibraryPath()
void BasicChoiceWizardPane::storePersistentLibraryPath |
( |
| ) |
|
|
private |
This function stores the current schema library path to persistent application preferences.
◆ updateChoiceInterface()
void BasicChoiceWizardPane::updateChoiceInterface |
( |
| ) |
|
|
private |
This function updates the user interface after a new schema library info was loaded. It updates the libary path text field, and creates new basic choice radio buttons, inserting them into the basic choice layout and button group.
The documentation for this class was generated from the following file:
- BasicChoiceWizardPane.hpp