#include <OptionShell.h>

Public Member Functions | |
| OptionShell () | |
| virtual | ~OptionShell () |
| QWidget * | getWidget () |
| const std::string & | getOptionName () |
Protected Member Functions | |
| virtual QWidget * | createOptionsWidget ()=0 |
| virtual QWidget * | getStoredWidget () |
| void | setOptionName (const std::string &name) |
This class provides a default implementation of the Option plug-in interfaces.
This class should generally NOT be subclassed directly, instead try using OptionQWidgetWrapper.
Definition at line 30 of file OptionShell.h.
| OptionShell::OptionShell | ( | ) |
Creates the option plug-in.
The constructor sets the plug-in type to PlugInManagerServices::OptionType().
| virtual OptionShell::~OptionShell | ( | ) | [virtual] |
Destroys the option plug-in.
| QWidget* OptionShell::getWidget | ( | ) | [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.
Implements Option.
| const std::string& OptionShell::getOptionName | ( | ) | [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.
Implements Option.
| virtual QWidget* OptionShell::createOptionsWidget | ( | ) | [protected, pure virtual] |
This method should be implemented in subclasses and can directly new the QWidget* and initialize it.
It guaranteed to called at most once per instance of this plug-in.
Implemented in OptionQWidgetWrapper< OptionWidget >.
| virtual QWidget* OptionShell::getStoredWidget | ( | ) | [protected, virtual] |
Returns the currently stored QWidget*.
If getWidget() has not yet been called NULL will be returned. Otherwise, the value of createOptionsWidget() will have been stored and that value is returned.
| void OptionShell::setOptionName | ( | const std::string & | name | ) | [protected] |
Sets the option name that will be returned from getOptionName().
| name | the option name. Please see Option::getOptionName() for how the string is interpreted. |