#include <PlugInShell.h>

Public Member Functions | |
| PlugInShell () | |
| virtual | ~PlugInShell () |
| const std::string & | getId () const |
| bool | isValidSessionSaveItem () const |
| const QIcon & | getIcon () const |
| const std::string & | getName () const |
| const std::string & | getDisplayName (bool fullName=false) const |
| const std::string & | getDisplayText () const |
| std::list< ContextMenuAction > | getContextMenuActions () const |
| bool | hasFilenameDisplay () const |
| std::vector< std::string > | getPropertiesPages () const |
| bool | serialize (SessionItemSerializer &serializer) const |
| bool | deserialize (SessionItemDeserializer &deserializer) |
| virtual bool | setId (const SessionItemId &id) |
| std::string | getVersion () const |
| bool | isProduction () const |
| std::string | getCreator () const |
| std::string | getCopyright () const |
| std::map< std::string, std::string > | getDependencyCopyright () const |
| std::string | getDescription () const |
| std::string | getShortDescription () const |
| std::string | getDescriptorId () const |
| std::string | getType () const |
| std::string | getSubtype () const |
| bool | areMultipleInstancesAllowed () const |
Protected Member Functions | |
| void | setName (const std::string &name) |
| void | setValidSessionSaveItem (bool isValid) |
| void | setDisplayName (const std::string &displayName) |
| void | setDisplayText (const std::string &displayText) |
| void | addContextMenuAction (const ContextMenuAction &menuAction) |
| void | setContextMenuActions (const std::list< ContextMenuAction > &actions) |
| void | setFilenameDisplay (bool bFilenameDisplay) |
| void | addPropertiesPage (const std::string &plugInName) |
| void | removePropertiesPage (const std::string &plugInName) |
| void | setPropertiesPages (const std::vector< std::string > &plugInNames) |
| void | setVersion (const std::string &version) |
| void | setProductionStatus (bool productionStatus) |
| void | setCreator (const std::string &creator) |
| void | setCopyright (const std::string ©right) |
| void | addDependencyCopyright (const std::string &dependencyName, const std::string ©right) |
| void | setDescription (const std::string &description) |
| void | setShortDescription (const std::string &shortDescription) |
| void | setDescriptorId (const std::string &id) |
| void | setType (const std::string &type) |
| void | setSubtype (const std::string &subtype) |
| void | allowMultipleInstances (bool bMultipleInstances) |
This class provides a default implementation of the PlugIn interfaces and serves as an optional base class for specialized plug-in shell classes and/or custom plug-ins.
Definition at line 60 of file PlugInShell.h.
| PlugInShell::PlugInShell | ( | ) |
Creates the plug-in.
The constructor initializes the plug-in as follows:
| virtual PlugInShell::~PlugInShell | ( | ) | [virtual] |
Destroys the plug-in.
| const std::string& PlugInShell::getId | ( | ) | const [virtual] |
Returns a unique ID for the session item.
The session item ID is automatically assigned when the item is created. It is unique for all session items in the current session.
Implements SessionItem.
| bool PlugInShell::isValidSessionSaveItem | ( | ) | const [virtual] |
Retrieves session save validity.
Method returns whether or not the item will be included when saving a session.
true if the item will be saved in a session, or false otherwise. Implements SessionItem.
| const QIcon& PlugInShell::getIcon | ( | ) | const [virtual] |
Returns the icon associated with the session item.
Implements SessionItem.
| const std::string& PlugInShell::getName | ( | ) | const [virtual] |
Returns the session item name.
The session item name is the full name of the session item. This can be a longer name that is used to help uniquely identify the item. To get the name that is displayed to the user, call getDisplayName() instead.
Implements SessionItem.
| const std::string& PlugInShell::getDisplayName | ( | bool | fullName = false |
) | const [virtual] |
Returns the session item name that should be displayed to the user.
The display name can be used to present a shorter name to the user such as a filename that does not include the full path. To get the full name of the session item, call getName() instead.
| fullName | If set to true and no display name has been set, then the full session item name is returned instead. |
true, then the full item name is returned, which is equivalent to calling getName(). Implements SessionItem.
| const std::string& PlugInShell::getDisplayText | ( | ) | const [virtual] |
Returns the additional text about the session item that can be displayed to the user.
Implements SessionItem.
| std::list<ContextMenuAction> PlugInShell::getContextMenuActions | ( | ) | const [virtual] |
Returns the context menu actions available for this session item.
Implements SessionItem.
| bool PlugInShell::hasFilenameDisplay | ( | ) | const [virtual] |
Returns whether the display name and display text are automatically updated when a filename is set as the item name.
If this method returns true and the item name is updated to a filename, the display name is automatically set to the base filename and extension without the full path. The display text is automatically set to the full path and filename, which is the same value as the item name returned by getName().
If this method returns true and the item name is updated to a name that is not a filename, the display name and display text are set to empty text.
If this method returns false, the display name and display text are not affected when the item name is updated.
true if the display name and display text are automatically updated when a filename is set as the item name; otherwise returns false. By default, this method returns true when a SessionItem is first created.Implements SessionItem.
| std::vector<std::string> PlugInShell::getPropertiesPages | ( | ) | const [virtual] |
Returns the Properties plug-in names whose widgets should comprise the available tabs of the properties dialog for this session item.
Implements SessionItem.
| bool PlugInShell::serialize | ( | SessionItemSerializer & | serializer | ) | const [virtual] |
Saves the SessionItem as part of a full session save.
This method will normally only be called by the SessionManager during a session save. Every concrete type that inherits from SessionItem should provide its own implementation for this method. If a SessionItem needs to be recreated on session load, but does not have any state information that it needs to save, it should call serialize(NULL,0) on the serializer. If a SessionItem does not need to be created on session load, it should simply return true from this method. This method will only be called on session items that exist at the time of session serialization.
| serializer | The object to use to save the item as part of the current session. |
Implements SessionItem.
Reimplemented in DockWindowShell, and RasterPagerShell.
| bool PlugInShell::deserialize | ( | SessionItemDeserializer & | deserializer | ) | [virtual] |
Restores the SessionItem from a saved session.
This method will normally only be called by the SessionManager during a session restore operation. Every concrete type that inherits from SessionItem should provide its own implementation for this method.
| deserializer | The object to use to restore the item from a saved session |
Implements SessionItem.
Reimplemented in DockWindowShell.
| virtual bool PlugInShell::setId | ( | const SessionItemId & | id | ) | [virtual] |
Sets the id of the session item.
This method will set the id of the item. It will only work if getId has not yet been called.
| id | The new id for the SessionItem. |
true if the id was successfully set, or false otherwise. Implements PlugIn.
| std::string PlugInShell::getVersion | ( | ) | const [virtual] |
Returns the plug-in version.
This method returns the plug-in version as a string. For example, "1.1.1" is a valid version string.
Implements PlugIn.
| bool PlugInShell::isProduction | ( | ) | const [virtual] |
Returns the plug-in production status.
This method returns the plug-in production status as a bool.
Implements PlugIn.
| std::string PlugInShell::getCreator | ( | ) | const [virtual] |
Returns the name of the organization that created the plug-in.
This method returns the string name of the organization responsible for creating the plug-in. For example, "Ball Aerospace & Technologies Corp." is a valid creator string.
Implements PlugIn.
| std::string PlugInShell::getCopyright | ( | ) | const [virtual] |
Returns the full copyright information for the plug-in.
Implements PlugIn.
| std::map<std::string, std::string> PlugInShell::getDependencyCopyright | ( | ) | const [virtual] |
Returns copyright information for plug-in dependencies.
This information will appear in the About box. If information for a given dependency name already exists, it will not be replaced. The copyright message may be formatted with HTML markup.
Implements PlugIn.
| std::string PlugInShell::getDescription | ( | ) | const [virtual] |
Returns a text description for the plug-in.
This method returns the full textual description for a plug-in. The description string is of arbitrary length.
Implements PlugIn.
| std::string PlugInShell::getShortDescription | ( | ) | const [virtual] |
Returns a short description for the plug-in.
This method returns a short 50-charater or less description about the plug-in. This short description is used for brief descriptive table entries in the GUI.
Implements PlugIn.
Reimplemented in Nitf::TreParserShell.
| std::string PlugInShell::getDescriptorId | ( | ) | const [virtual] |
Returns a unique id for the type of plug-in.
This method returns a unique id for the plug-in class. This string should be formatted as a UUID. This value must be the same between instances of the application.
Implements PlugIn.
| std::string PlugInShell::getType | ( | ) | const [virtual] |
Returns the plug-in type.
Default plug-in types include the following:
Implements PlugIn.
| std::string PlugInShell::getSubtype | ( | ) | const [virtual] |
Returns the plug-in subtype.
Plug-ins can optionally define a subtype to further distinguish between multiple kinds of plug-ins with the same type, typically importers and exporters. The subtype is used internally to populate file selection dialogs so that they contain only a subset of plug-ins of a given type. Default plug-in subtypes include the following:
Implements PlugIn.
| bool PlugInShell::areMultipleInstancesAllowed | ( | ) | const [virtual] |
Queries whether multiple instances of the plug-in can be instantiated simultaneously.
If multiple instances of a plug-in are allowed, the plug-in should have no static variables and can have instance-independent input and output files.
Implements PlugIn.
| void PlugInShell::setName | ( | const std::string & | name | ) | [protected] |
| void PlugInShell::setValidSessionSaveItem | ( | bool | isValid | ) | [protected] |
Sets session save validity.
Method sets whether or not the item will be included when saving a session.
| isValid | Session save validity of the item. |
| void PlugInShell::setDisplayName | ( | const std::string & | displayName | ) | [protected] |
Sets the session item name that should be displayed to the user.
The display name can optionally be used to present a shorter name to the user. If the display name is not set, the full session item name may be displayed to the user instead.
| displayName | The name that should be displayed to the user for this session item. |
| void PlugInShell::setDisplayText | ( | const std::string & | displayText | ) | [protected] |
Sets additional text about the session item to be displayed to the user.
The display text is an optional means by which additional information about this session item can be displayed to the user.
| displayText | The text string containing additional information about this session item to display to the user. |
| void PlugInShell::addContextMenuAction | ( | const ContextMenuAction & | menuAction | ) | [protected] |
Adds a single context menu action to the list of available actions for this session item.
This method adds an action to the list of available actions that are avaiable when the user right-clicks on a widget that displays or contains the session item. This method is typically called with an action that should be available regardless of the current state of the session or the item.
| menuAction | A context menu action that should be displayed when the user right-clicks on a widget that displays or contains the session item. |
| void PlugInShell::setContextMenuActions | ( | const std::list< ContextMenuAction > & | actions | ) | [protected] |
Sets available context menu actions for this session item.
This method sets actions that are available to the user when right-clicking on a widget that displays or contains the session item. This method is typically called with actions that should be available regardless of the current state of the session or the item.
| actions | A list of context menu actions that should be displayed when the user right-clicks on a widget that displays or contains the session item. |
| void PlugInShell::setFilenameDisplay | ( | bool | bFilenameDisplay | ) | [protected] |
Sets whether the display name and display text are automatically updated when a filename is set as the item name.
| bFilenameDisplay | If this parameter is true, the display name and display text will automatically be updated when setName() is called with a filename. If this parameter is false, the display name and display text are not affected when setName() is called. |
| void PlugInShell::addPropertiesPage | ( | const std::string & | plugInName | ) | [protected] |
Adds a Properties plug-in name to the vector of available properties pages for this session item.
This method adds the name of a single Properties plug-in to the vector of available properties plug-ins whose widgets are displayed to the user in the properties dialog for this session item.
| plugInName | The Properties plug-in name to add to the vector of pages that should be displayed in the properties dialog for this session item. |
| void PlugInShell::removePropertiesPage | ( | const std::string & | plugInName | ) | [protected] |
Removes a Properties plug-in name from the vector of available properties pages for this session item.
This method removed the name of a single Properties plug-in from the vector of available properties plug-ins whose widgets are displayed to the user in the properties dialog for this session item.
| plugInName | The Properties plug-in name to remove from the vector of pages that should be displayed in the properties dialog for this session item. |
| void PlugInShell::setPropertiesPages | ( | const std::vector< std::string > & | plugInNames | ) | [protected] |
Sets the available properties pages for this session item.
This method sets the names of all Properties plug-ins whose widgets are displayed to the user in the properties dialog for this session item.
| plugInNames | A vector of Properties plug-in names whose widgets should be displayed in the properties dialog for this item. |
| void PlugInShell::setVersion | ( | const std::string & | version | ) | [protected] |
Sets the plug-in version.
This method sets the plug-in version as a string. For example, "1.1.1" is a valid version string.
| version | The plug-in version. |
| void PlugInShell::setProductionStatus | ( | bool | productionStatus | ) | [protected] |
Sets the plug-in production status.
This method sets the plug-in production status as a bool.
| productionStatus | Is the plug-in a production plug-in? |
| void PlugInShell::setCreator | ( | const std::string & | creator | ) | [protected] |
Sets the name of the organization that created the plug-in.
This method sets the string name of the organization responsible for creating the plug-in. For example, "Ball Aerospace & Technologies Corp." is a valid creator string.
| creator | The organization that created the plug-in. |
| void PlugInShell::setCopyright | ( | const std::string & | copyright | ) | [protected] |
Sets the full copyright information for the plug-in.
| copyright | The copyright information for the plug-in. |
| void PlugInShell::addDependencyCopyright | ( | const std::string & | dependencyName, | |
| const std::string & | copyright | |||
| ) | [protected] |
Adds a dependency copyright message.
| dependencyName | The name identifying the dependency. For example: 'libtiff' or 'qt'. | |
| copyright | The verbatim copyright message for the dependency. The copyright message may be formatted with HTML markup. |
| void PlugInShell::setDescription | ( | const std::string & | description | ) | [protected] |
Sets a text description for the plug-in.
This method sets the full textual description for a plug-in. The description string can be of arbitrary length.
| description | The full plug-in description. |
| void PlugInShell::setShortDescription | ( | const std::string & | shortDescription | ) | [protected] |
Sets a short description for the plug-in.
This method sets a short 50-charater or less description about the plug-in. This short description is used for brief descriptive table entries in the GUI.
| shortDescription | The short plug-in description. |
| void PlugInShell::setDescriptorId | ( | const std::string & | id | ) | [protected] |
Sets unique for the plug-in descriptor.
This method sets a unique id for the plug-in class. This string should be formatted as a UUID. This value must be the same between instances of the application.
| id | The unique id for the descriptor. |
| void PlugInShell::setType | ( | const std::string & | type | ) | [protected] |
Sets the plug-in type.
Default plug-in types include the following:
| type | The plug-in type. |
| void PlugInShell::setSubtype | ( | const std::string & | subtype | ) | [protected] |
Sets the plug-in subtype.
Plug-ins can optionally define a subtype to further distinguish between multiple kinds of plug-ins with the same type, typically importers and exporters. The subtype is used internally to populate file selection dialogs so that they contain only a subset of plug-ins of a given type. Default plug-in subtypes include the following:
| subtype | The plug-in subtype. |
| void PlugInShell::allowMultipleInstances | ( | bool | bMultipleInstances | ) | [protected] |
Sets whether multiple instances of the plug-in can be instantiated simultaneously.
| bMultipleInstances | Set this value to true if the multiple instances of the plug-in can be created and executed simultaneously, otherwise false. |