#include <ExporterShell.h>

Public Member Functions | |
| ExporterShell () | |
| ~ExporterShell () | |
| bool | getInputSpecification (PlugInArgList *&pArgList) |
| bool | getOutputSpecification (PlugInArgList *&pArgList) |
| std::string | getDefaultExtensions () const |
| ValidationResultType | validate (const PlugInArgList *pArgList, std::string &errorMessage) const |
| QWidget * | getExportOptionsWidget (const PlugInArgList *pInArgList) |
Protected Member Functions | |
| void | setExtensions (const std::string &extensions) |
This class represents the shell for an exporter plug-in. Exporter developers would take this class and extend it to support their exporter specific code.
Definition at line 31 of file ExporterShell.h.
| ExporterShell::ExporterShell | ( | ) |
Creates an exporter plug-in.
The constructor sets the plug-in type to PlugInManagerServices::ExporterType().
| ExporterShell::~ExporterShell | ( | ) |
Destroys the exporter plug-in.
| bool ExporterShell::getInputSpecification | ( | PlugInArgList *& | pArgList | ) | [virtual] |
Retrieves the plug-in input parameters.
This method queries the plug-in for its input parameters that are needed to execute properly. The input arguments may be different in interactive mode and batch mode.
| pArgList | A plug-in arg list pointer that is set to a created input argument list specifying the plug-in input parameters. NULL is a valid pointer value if the plug-in does not require any input arguments. |
| Name | Type |
|---|---|
| File Descriptor | FileDescriptor |
| Progress | Progress |
Implements Executable.
| bool ExporterShell::getOutputSpecification | ( | PlugInArgList *& | pArgList | ) | [virtual] |
Retrieves the plug-in output parameters.
This method queries the plug-in for its output parameters that are created during execution. The output arguments may be different in interactive mode and batch mode.
| pArgList | A plug-in arg list pointer that is set to a created output argument list specifying the plug-in output parameters. NULL is a valid pointer value if the plug-in does not provide any output arguments. |
Implements Executable.
| std::string ExporterShell::getDefaultExtensions | ( | ) | const [virtual] |
Returns the default file extensions recognized by the exporter.
Implements Exporter.
| ValidationResultType ExporterShell::validate | ( | const PlugInArgList * | pArgList, | |
| std::string & | errorMessage | |||
| ) | const [virtual] |
Queries whether a given argument list can be successfully saved by the exporter.
This method is called for the exporter to parse the current settings in the plug-in argument list to see if it supports saving the data as currently specified. This allows exporters that do not support certain combinations of values and options to indicate as such. This method is called each time the user changes a value in the export options dialog.
| pArgList | The plug-in argument list as requested in getInputSpecification. This is populated as it would be in a call to execute. | |
| errorMessage | An error message that is populated with the reason why the exporter cannot save the given data descriptor. This message will be displayed to the user. When returning ValidationResultType::VALIDATE_INFO, a non-empty errorMessage is required. |
Implements Exporter.
| QWidget* ExporterShell::getExportOptionsWidget | ( | const PlugInArgList * | pInArgList | ) | [virtual] |
Returns a widget to display custom export option values.
This method provides an interface for which specialized export options can be displayed to the user. The method returns a Qt widget that is added to the default export options dialog. The exporter should create the widget with a NULL parent, and should destroy the widget when the exporter itself is destroyed.
Exporters should call QWidget::setWindowTitle() on the widget that is returned to set the name that appears on the tab in the export options dialog. If the window title is not set, the exporter name is displayed. If the returned widget is the only widget to display, a tab widget is not used in the dialog.
| pInArgList | The input argument list specified by Executable::getInputSpecification() and populated as if being passed to Executable::execute(). |
Implements Exporter.
| void ExporterShell::setExtensions | ( | const std::string & | extensions | ) | [protected] |
Sets the default file extensions recognized by the exporter.
| extensions | The file extensions recognized by the exporter. The string should consist of a description followed by one or more extensions separated by a space. Multiple file types may be specified with a double semicolon. Examples include "ENVI Header Files (*.hdr)", "TIFF Files (*.tif *.tiff)", and "Source Files (*.c*);;Header Files (*.h)". |