#include <PropertiesShell.h>

Public Member Functions | |
| PropertiesShell () | |
| virtual | ~PropertiesShell () |
| QWidget * | getWidget () |
| const std::string & | getPropertiesName () const |
| bool | initialize (SessionItem *pSessionItem) |
Protected Member Functions | |
| virtual QWidget * | createWidget ()=0 |
| void | setPropertiesName (const std::string &name) |
| SessionItem * | getSessionItem () const |
This class provides a default implementation of the Properties plug-in interface. If a properties plug-in needs to implement a QWidget, try subclassing PropertiesQWidgetWrapper instead of PropertiesShell. However, if the properties plug-in should simply wrap an existing QWidget, subclass PropertiesShell.
Definition at line 28 of file PropertiesShell.h.
| PropertiesShell::PropertiesShell | ( | ) |
Creates the properties plug-in.
The constructor sets the plug-in type to PlugInManagerServices::PropertiesType().
| virtual PropertiesShell::~PropertiesShell | ( | ) | [virtual] |
Destroys the properties plug-in.
| QWidget* PropertiesShell::getWidget | ( | ) | [virtual] |
Returns the widget that will be displayed to the user.
The widget will be displayed when the user selects the applicable tab in the properties dialog. It is only instantiated once per instance of this plug-in. The widget will be owned by the plug-in and should be destroyed when the plug-in is destroyed. Please note, that the properties dialog in which the widget will be displayed in is resizable, so ensure that the Qt layout for the widget resizes properly.
Implements Properties.
| const std::string& PropertiesShell::getPropertiesName | ( | ) | const [virtual] |
Returns the name of the properties.
This method is called by the properties dialog to get the name to display on the tab containing the widget returned by getWidget().
Implements Properties.
| bool PropertiesShell::initialize | ( | SessionItem * | pSessionItem | ) | [virtual] |
Initializes the widget to the properties of a given session item.
This method is called by the properties dialog for the widget to initialize its child widgets based on the current state of the given session item.
This method is guaranteed to only be called once per instance of the class.
| pSessionItem | The session item for which to initialize the widget's values. |
true if the widget was successfully initialized from the given session item; otherwise returns false. If this method returns false, the widget is not added to the properties dialog.
true. Implements Properties.
Reimplemented in PropertiesQWidgetWrapper< PropertiesWidget >.
| virtual QWidget* PropertiesShell::createWidget | ( | ) | [protected, pure virtual] |
Creates the properties widget.
This method must be implemented in subclasses to create the QWidget. Upon creation, the widget should be populated with default values. Initialization of the widget will occur in initialize(), which is called after this method.
This method is guaranteed to be called only once per instance of this plug-in.
Implemented in PropertiesQWidgetWrapper< PropertiesWidget >.
| void PropertiesShell::setPropertiesName | ( | const std::string & | name | ) | [protected] |
Sets the properties name that will be returned from getPropertiesName().
| name | The properties name that will appear on a tab in the properties dialog. |
| SessionItem* PropertiesShell::getSessionItem | ( | ) | const [protected] |
Returns the session item for which the widget is initialized.
This method provides a means to retrieve the session item to which the widget is initialized. The returned pointer can be used when appying changes back to the session item.