#include <Properties.h>

Public Member Functions | |
| virtual QWidget * | getWidget ()=0 |
| virtual const std::string & | getPropertiesName () const =0 |
| virtual bool | initialize (SessionItem *pSessionItem)=0 |
| virtual bool | applyChanges ()=0 |
Protected Member Functions | |
| virtual | ~Properties () |
Properties plug-ins will be displayed to the user when opening the application properties dialog. This interface can be implemented by a plug-in to get its custom properties widgets to appear in the application properties dialog. The application properties dialog is modal and will instantiate all properties plug-ins when shown and will destroy all properties plug-ins when the dialog is closed.
Definition at line 30 of file Properties.h.
| virtual Properties::~Properties | ( | ) | [protected, virtual] |
Since the Properties interface is usually used in conjunction with the PlugIn interface, this should be destroyed by casting to the PlugIn interface and calling PlugInManagerServices::destroyPlugIn().
Reimplemented in Nitf::Properties.
Definition at line 111 of file Properties.h.
| virtual QWidget* Properties::getWidget | ( | ) | [pure 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.
Implemented in PropertiesShell, and Nitf::PropertiesQWidgetWrapper< PropertiesWidget >.
| virtual const std::string& Properties::getPropertiesName | ( | ) | const [pure 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().
Implemented in PropertiesShell, and Nitf::PropertiesQWidgetWrapper< PropertiesWidget >.
| virtual bool Properties::initialize | ( | SessionItem * | pSessionItem | ) | [pure 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. Implemented in PropertiesShell, PropertiesQWidgetWrapper< PropertiesWidget >, and Nitf::PropertiesQWidgetWrapper< PropertiesWidget >.
| virtual bool Properties::applyChanges | ( | ) | [pure virtual] |
Applies the changes that the user made in the widget.
This method is called when the user clicks the OK or Apply buttons in the properties dialog. It applies the changes in the widget by calling applyChanges() on the templated class. The applyChanges() method of the templated class should return true if all changes were successfully applied to the object. It should also return true if no updates need to be made.
The values modified by the user while the QWidget is displayed should be applied to the session item for which the widget was initialized in the initialize() method.
true if the changes were successfully applied to the session item or if no changes need to be made. If false is returned, the widget will be activated in the properties dialog if necessary and the dialog will not be closed if the OK button was clicked. Implemented in PropertiesQWidgetWrapper< PropertiesWidget >, and Nitf::PropertiesQWidgetWrapper< PropertiesWidget >.