#include <Option.h>

Public Member Functions | |
| virtual const std::string & | getOptionName ()=0 |
| virtual QWidget * | getWidget ()=0 |
| virtual void | applyChanges ()=0 |
Protected Member Functions | |
| virtual | ~Option () |
All option plug-ins will be displayed to the user when opening the application options dialog, ie. "Tools\Options". This interface can be implemented by a plug-in to get their custom option widgets to appear in the application options dialog. The application options dialog is modal and will instantiate all option plug-ins when shown and will destroy all option plug-ins when the dialog is closed.
Definition at line 29 of file Option.h.
| virtual Option::~Option | ( | ) | [protected, virtual] |
| virtual const std::string& Option::getOptionName | ( | ) | [pure virtual] |
Returns the name of the option.
This will be displayed to the user in a tree view, allowing them to show the widget returned by getWidget() for this option. This string can include '/', which will then create a group in the tree view. For instance, a returned string of "Windows/Workspace/Cube" would create a tree heirarchy like the following:
If the string needs to actually include a '/', it can be escaped by using '//'. When placing option plug-ins into a heirarchy please attempt to put them into the already provided application heirarchy where possible. If not possible, please create a top-level node with the name of the plug-in suite and place option plug-ins under that node.
Implemented in OptionShell.
| virtual QWidget* Option::getWidget | ( | ) | [pure virtual] |
Returns the widget that will be displayed to the user.
The widget will only be displayed when the user selects the option in the options dialog. This widget should only be instantiated once per instance of this plug-in. This widget will be owned by this plug-in and should be destroyed when the plug-in is destroyed. Please note, that the option dialog that this widget will be displayed in is resizable, so ensure the Qt layout for this widget resizes properly.
Implemented in OptionShell.
| virtual void Option::applyChanges | ( | ) | [pure virtual] |
Apply the changes that the user made in the QWidget.
The values modified by the user while the QWidget was displayed should be stored permanently. This usually means storing the values in ConfigurationSettings, but can include any method that will store the values such that the values will be retained through a stop and start of the application and the values should generally be associated with the user running the application only. The values modified by the user should NEVER be permanently stored until this method is called. This method is guaranteed to only be called once per instance of the class.
Implemented in OptionQWidgetWrapper< OptionWidget >.