DesktopServices Class Reference
[Services]

Interface to manage windows and to provide access to widgets in the main application window. More...

#include <DesktopServices.h>

Inheritance diagram for DesktopServices:

Inheritance graph

List of all members.

Public Member Functions

virtual QWidget * getMainWidget () const =0
virtual MenuBargetMainMenuBar () const =0
virtual WindowcreateWindow (const std::string &windowName, WindowType windowType)=0
virtual WindowgetWindow (const std::string &windowName, WindowType windowType) const =0
virtual WindowgetWindow (const std::string &uniqueId) const =0
virtual void getWindows (WindowType windowType, std::vector< Window * > &windows) const =0
virtual void getWindows (const std::string &windowType, std::vector< Window * > &windows) const =0
virtual void getWindows (std::vector< Window * > &windows) const =0
virtual unsigned int getNumWindows (WindowType windowType) const =0
virtual unsigned int getNumWindows (const std::string &windowType) const =0
virtual unsigned int getNumWindows () const =0
virtual bool deleteWindow (Window *pWindow)=0
virtual void deleteAllWindows ()=0
virtual bool setCurrentWorkspaceWindow (WorkspaceWindow *pWindow)=0
virtual WorkspaceWindowgetCurrentWorkspaceWindow () const =0
virtual bool getCurrentWorkspaceWindowName (std::string &windowName) const =0
virtual ViewgetCurrentWorkspaceWindowView () const =0
virtual void cascadeWorkspaceWindows ()=0
virtual void tileWorkspaceWindows (TilingType eType=TILE_GRID)=0
virtual bool tileWorkspaceWindows (const std::vector< WorkspaceWindow * > &windows, bool maxFirst=true, TilingType eType=TILE_GRID)=0
virtual ViewcreateView (const std::string &viewName, ViewType viewType, QWidget *pParent=0)=0
virtual PlotViewcreatePlot (const std::string &plotName, PlotType plotType, QWidget *pParent=0)=0
virtual void deleteView (View *pView)=0
virtual bool isKindOfView (const std::string &className, const std::string &viewName)=0
virtual void getViewTypes (const std::string &className, std::vector< std::string > &classList)=0
virtual bool isKindOfLayer (const std::string &className, const std::string &layerName)=0
virtual void getLayerTypes (const std::string &className, std::vector< std::string > &classList)=0
virtual ProductWindowderiveProduct (View *pView)=0
virtual PlotSetGroupcreatePlotSetGroup (QWidget *pParent=NULL)=0
virtual void deletePlotSetGroup (PlotSetGroup *pPlotSetGroup)=0
virtual PlotSetcreatePlotSet (const std::string &plotSetName, QWidget *pParent=NULL)=0
virtual void deletePlotSet (PlotSet *pPlotSet)=0
virtual PlotWidgetcreatePlotWidget (const std::string &plotName, PlotType plotType, QWidget *pParent=0)=0
virtual void deletePlotWidget (PlotWidget *pPlot)=0
virtual AxiscreateAxis (AxisPosition position, QWidget *pParent=0)=0
virtual void deleteAxis (Axis *pAxis)=0
virtual void initializeAction (QAction *pAction, const std::string &shortcutContext)=0
virtual MouseModecreateMouseMode (const std::string &modeName, const char *const mouseCursor[], const char *const cursorMask[], int iHotX=0, int iHotY=0, QAction *pAction=NULL) const =0
virtual MouseModecreateMouseMode (const std::string &modeName, const QCursor &mouseCursor, QAction *pAction=NULL) const =0
virtual void deleteMouseMode (MouseMode *pMouseMode) const =0
virtual void setPanMode (PanModeType panMode)=0
virtual PanModeType getPanMode () const =0
virtual void setAoiSelectionTool (GraphicObjectType toolType, ModeType modeType)=0
virtual void setAoiAddMode (AoiAddMode mode)=0
virtual GraphicObjectType getAoiSelectionTool () const =0
virtual ModeType getAoiSelectionMode () const =0
virtual AoiAddMode getAoiAddMode () const =0
virtual void setAnnotationObject (GraphicObjectType objectType)=0
virtual GraphicObjectType getAnnotationObject () const =0
virtual bool importFile (const std::string &importerSubtype=std::string(), Progress *pProgress=NULL)=0
virtual bool importFile (const std::string &importerSubtype, Progress *pProgress, std::vector< DataElement * > &importedElements)=0
virtual bool exportSessionItem (SessionItem *pItem, FileDescriptor *pNewFileDescriptor=NULL, Progress *pProgress=NULL)=0
virtual bool exportSessionItems (const std::vector< SessionItem * > &items, Progress *pProgress=NULL)=0
virtual bool displayHelpHome () const =0
virtual bool displayHelp (const std::string &filename) const =0
virtual void displayProperties (SessionItem *pItem) const =0
virtual void displayProperties (SessionItem *pItem, const std::vector< std::string > &displayedPages, bool bEmitSignal=true) const =0
virtual void setStatusBarMessage (const std::string &messageText) const =0
virtual void setSuppressibleMsgDlgState (const std::string &id, bool bState)=0
virtual bool getSuppressibleMsgDlgState (const std::string &id)=0
virtual void showSuppressibleMsgDlg (const std::string &dialogTitle, const std::string &dialogMsg, MessageType type, const std::string &id, QWidget *pParent=NULL)=0
virtual int showMessageBox (const std::string &caption, const std::string &text, const std::string &button0=std::string(), const std::string &button1=std::string(), const std::string &button2=std::string(), int defaultButton=0, int escapeButton=-1) const =0
virtual void addBackgroundPlugIn (PlugIn *pPlugIn, Progress *pProgress) const =0
virtual bool registerCallback (PlugInCallbackType eType, PlugInCallback *pCallback) const =0
virtual DockWindowAreaType getDockWindowArea (const DockWindow &dockWindow) const =0
virtual bool setDockWindowArea (DockWindow *pDockWindow, DockWindowAreaType dockArea)=0
virtual bool createProgressDialog (const std::string &caption, Progress *pProgress) const =0
virtual const std::vector
< std::string > & 
getAvailableSymbolNames () const =0
virtual const QImage & getSymbolImage (const std::string &symbol) const =0

Static Public Member Functions

static const std::string & signalWindowAdded ()
static const std::string & signalWindowRemoved ()
static const std::string & signalWindowActivated ()
static const std::string & signalAboutToShowPropertiesDialog ()
static const std::string & signalAboutToShowContextMenu ()
static const std::string & signalApplicationWindowClosed ()

Protected Member Functions

virtual ~DesktopServices ()


Detailed Description

Interface to manage windows and to provide access to widgets in the main application window.

This subclass of Subject will notify upon the following conditions:

Definition at line 57 of file DesktopServices.h.


Constructor & Destructor Documentation

virtual DesktopServices::~DesktopServices (  )  [protected, virtual]

This will be cleaned up during application close.

Plug-ins do not need to destroy it.

Definition at line 1278 of file DesktopServices.h.


Member Function Documentation

static const std::string& DesktopServices::signalWindowAdded (  )  [static]

Emitted with any<Window*> when a window is added to the main application window.

Definition at line 64 of file DesktopServices.h.

static const std::string& DesktopServices::signalWindowRemoved (  )  [static]

Emitted with any<Window*> when a window is removed from the main application window.

Definition at line 70 of file DesktopServices.h.

static const std::string& DesktopServices::signalWindowActivated (  )  [static]

Emitted with any<WorkspaceWindow*> when a workspace window is activated in the main application window.

Definition at line 76 of file DesktopServices.h.

static const std::string& DesktopServices::signalAboutToShowPropertiesDialog (  )  [static]

Emitted when the properties dialog is about to be displayed with boost::any<std::pair<SessionItem*, std::vector<std::string>*> > containing the session item whose properties will be displayed and a pointer to a vector to which additional properties pages can be displayed.

Definition at line 85 of file DesktopServices.h.

static const std::string& DesktopServices::signalAboutToShowContextMenu (  )  [static]

Emitted with boost::any<ContextMenu*> when the user right-clicks to invoke a context menu.

This signal provides a means by which an object can be notified when a context menu is invoked when the user clicks on any session item. To receive notification when the user clicks inside a specific session item, attach to the AboutToShowContextMenu signal of that particular session item instead.

This signal is emitted after SessionItem::getContextMenuActions() is called and before the session item's own signal is emitted and before the context menu is shown to give attached objects a chance to add or modify the context menu that will be displayed to the user.

The ContextMenu pointer value is guaranteed to be non-NULL. The session items vector in the context menu contains the plot widget and the plot view.

See also:
Context menu calling sequence

Definition at line 108 of file DesktopServices.h.

static const std::string& DesktopServices::signalApplicationWindowClosed (  )  [static]

Emitted when the main application window is closed.

The main application window is still fully created when this signal is emitted.

Definition at line 116 of file DesktopServices.h.

virtual QWidget* DesktopServices::getMainWidget (  )  const [pure virtual]

Returns a pointer to the Qt widget for the main application window.

The Qt widget for the main application window can be used as the parent widget for dialogs and other GUIs in plug-ins.

Returns:
A pointer to the Qt widget for the main application window. The widget should not be modified, but is provided for use as a parent widget in plug-in dialogs or other GUI components.

virtual MenuBar* DesktopServices::getMainMenuBar (  )  const [pure virtual]

Returns the application menu bar located at the top of the main application window.

Returns:
A pointer to the appliation menu bar.

virtual Window* DesktopServices::createWindow ( const std::string &  windowName,
WindowType  windowType 
) [pure virtual]

Creates a window of a given type.

Parameters:
windowName Name to be assigned to the new window. Depending on the window type, the name may appear in the window's title bar.
windowType Type of the window to be created.
Returns:
A pointer to the window. NULL is returned if the window already exists or an error occurred.
See also:
WindowType, getWindow()

virtual Window* DesktopServices::getWindow ( const std::string &  windowName,
WindowType  windowType 
) const [pure virtual]

Returns a pointer to the window with a given name and type.

Parameters:
windowName The window name.
windowType The window type.
Returns:
A pointer to the window or NULL if no window exists with the given name and type.
See also:
getCurrentWorkspaceWindow()

virtual Window* DesktopServices::getWindow ( const std::string &  uniqueId  )  const [pure virtual]

Returns a pointer to the window with a given unique identifier.

Parameters:
uniqueId The unique identifier.
Returns:
A pointer to the window or NULL if no window exists with the given unique identifier.

virtual void DesktopServices::getWindows ( WindowType  windowType,
std::vector< Window * > &  windows 
) const [pure virtual]

Retrieves all available windows of a given type.

Parameters:
windowType The window type.
windows A reference to a vector that will be filled with pointers to the available windows of the given window type.

virtual void DesktopServices::getWindows ( const std::string &  windowType,
std::vector< Window * > &  windows 
) const [pure virtual]

Retrieves all available windows of a given type and its subtypes.

This method retrieves all available windows of a given type and all of its subtypes. For example, passing in 'WorkspaceWindow' as the window type retrieves all available workspace windows, analysis windows, and product windows.

Parameters:
windowType A string containing the base class name of the window type for which to retrieve the windows. Cannot be empty.
windows A reference to a vector that will be filled with pointers to the available windows of the given window type and subtypes.

virtual void DesktopServices::getWindows ( std::vector< Window * > &  windows  )  const [pure virtual]

Retrieves all available windows of all types.

Parameters:
windows A reference to a vector that will be filled with pointers to all available windows of all window types.

virtual unsigned int DesktopServices::getNumWindows ( WindowType  windowType  )  const [pure virtual]

Returns the number of available windows of a given type.

Parameters:
windowType The window type for which to get the number of windows.
Returns:
The number of available windows of the given type.

virtual unsigned int DesktopServices::getNumWindows ( const std::string &  windowType  )  const [pure virtual]

Returns the number of available windows of a given type and its subtypes.

This method retrieves the number of available windows of a given type and all of its subtypes. For example, passing in 'WorkspaceWindow' as the window type retrieves the number of available workspace windows, analysis windows, and product windows.

Parameters:
windowType The window type for which to get the number of windows.
Returns:
The number of available windows of the given type.

virtual unsigned int DesktopServices::getNumWindows (  )  const [pure virtual]

Returns the total number of available windows of all types.

Returns:
The number of available windows of all types.

virtual bool DesktopServices::deleteWindow ( Window pWindow  )  [pure virtual]

Deletes the given window.

This method deletes a given window; any view or widget contained in the window is also deleted.

WARNING: Windows or Toolbars provided by the application cannot be deleted using this method, they will be cleaned up during application close.

Parameters:
pWindow The window to delete.
Returns:
TRUE if the window was sucessfully deleted, otherwise FALSE.

virtual void DesktopServices::deleteAllWindows (  )  [pure virtual]

Deletes all windows.

Warning:
Windows or toolbars provided by the application cannot be deleted using this method. They will be cleaned up when the application is closed.

virtual bool DesktopServices::setCurrentWorkspaceWindow ( WorkspaceWindow pWindow  )  [pure virtual]

Activates a workspace window.

Parameters:
pWindow The workspace window to activate. Cannot be NULL.
Returns:
TRUE if the window was successfully activated, otherwise FALSE.

virtual WorkspaceWindow* DesktopServices::getCurrentWorkspaceWindow (  )  const [pure virtual]

Gets a pointer to the currently active workspace window.

Returns:
A pointer to the active workspace window or NULL if no workspace windows exist.
See also:
getCurrentWorkspaceWindowName()

virtual bool DesktopServices::getCurrentWorkspaceWindowName ( std::string &  windowName  )  const [pure virtual]

Retrieves the name of the active workspace window.

Parameters:
windowName A string that is populated with the name of the active workspace window. The string is emptied if no workspace window exists.
Returns:
TRUE if the current workspace window name was set successfully or FALSE if no workspace window exists.
See also:
getCurrentWorkspaceWindow()

virtual View* DesktopServices::getCurrentWorkspaceWindowView (  )  const [pure virtual]

Returns the active view in the active workspace window.

This is a convenience method that calls getCurrentWorkspaceWindow() and then WorkspaceWindow::getActiveView().

Returns:
A pointer to the active View in the active workspace window. See the WorkspaceWindow::getActiveView() return value documentation for details on the returned View pointer based on the window type.
See also:
WorkspaceWindow::getActiveView()

virtual void DesktopServices::cascadeWorkspaceWindows (  )  [pure virtual]

Arranges all workspace windows in a cascading fashion.

This method arranges all workspace windows in a cascading fashion within the main application workspace area.

See also:
tileWorkspaceWindows()

virtual void DesktopServices::tileWorkspaceWindows ( TilingType  eType = TILE_GRID  )  [pure virtual]

Tiles all workspace windows within the main application workspace.

This method resizes and arranges all workspace windows to fill the entire main application workspace area. Windows are arranged in a two row grid, horizontally in one row or vertically in one column based on the TilingType parameter.

Parameters:
eType Orientation of the tiled windows
See also:
cascadeWorkspaceWindows()

virtual bool DesktopServices::tileWorkspaceWindows ( const std::vector< WorkspaceWindow * > &  windows,
bool  maxFirst = true,
TilingType  eType = TILE_GRID 
) [pure virtual]

Tiles given workspace windows within the main application workspace.

This method resizes and arranges the given workspace windows to fill the entire main application workspace area. Windows are arranged in a two row grid, horizontally in one row or vertically in one column based on the TilingType parameter. The windows are displayed in the order they are added to the vector. Workspace windows not in the given vector are sent behind the tiled windows.

Parameters:
windows The windows to tile in the main application workspace area.
maxFirst For an odd number of windows to tile, if this value is TRUE, the first window in the vector will have its height extend the full height of the workspace area. If the value is FALSE, the last window in the vector will have its height extend the full height of the workspace area. This parameter is ignored if the vector contains an even number of windows.
eType Orientation of the tiled windows.
Returns:
TRUE if the windows were successfully tiled, otherwise FALSE.
See also:
TilingType

virtual View* DesktopServices::createView ( const std::string &  viewName,
ViewType  viewType,
QWidget *  pParent = 0 
) [pure virtual]

Creates a view that is not contained in a window.

This method creates a view that is not associated with a window. The view is not managed in any way, so it should be deleted when necessary by calling the deleteView() method.

Parameters:
viewName The view name. Cannot be empty.
viewType The view type. If ViewType::PLOT_VIEW is passed in, a plot of type PlotType::CARTESIAN_PLOT is created.
pParent The Qt widget to use as the parent for the view.
Returns:
A pointer to the newly created View.
See also:
createPlot()

virtual PlotView* DesktopServices::createPlot ( const std::string &  plotName,
PlotType  plotType,
QWidget *  pParent = 0 
) [pure virtual]

Creates a plot view widget that is not contained in a window.

This method creates a plot that is not associated with a window. The plot is not owned by another object, so it should be deleted when necessary by calling the deleteView() method.

Parameters:
plotName The plot name. Cannot be empty.
plotType The plot type.
pParent The Qt widget to use as the parent for the plot view widget.
Returns:
A pointer to the newly created plot view widget.
See also:
createView()

virtual void DesktopServices::deleteView ( View pView  )  [pure virtual]

Destroys a view.

This method is intended to destroy View objects created with the createView() method. To destroy views displayed in a window, call deleteWindow() instead.

Parameters:
pView The view to delete. Cannot be NULL. If the given view is displayed in a window, the window is also destroyed.

virtual bool DesktopServices::isKindOfView ( const std::string &  className,
const std::string &  viewName 
) [pure virtual]

Queries a view to see if it is a kind of another view.

This method check type compatibility between two views. This functionality is different than TypeAwareObject::isKindOf() in that only View-derived classes are checked.

Parameters:
className The name of the View-derived class to query.
viewName The View-derived class name to check type compatibility.
Returns:
Returns true if the given view class name is a kind of the given class name; otherwise returns false.

virtual void DesktopServices::getViewTypes ( const std::string &  className,
std::vector< std::string > &  classList 
) [pure virtual]

Returns a list of inherited view class names for a given class name.

This method populates a vector with the class names of all inherited View class types. The given class name is used as the initial class for populating the vector. For example, passing in "SpatialDataView" as a class name populates a vector with the "SpatialDataView", "PerspectiveView", and "View" strings.

Parameters:
className The view class name for which to get all view element types.
classList This vector is populated with the class names of all inherited view classes and the given class name.

virtual bool DesktopServices::isKindOfLayer ( const std::string &  className,
const std::string &  layerName 
) [pure virtual]

Queries a layer to see if it is a kind of another layer.

This method checks type compatibility between two layers. This functionality is different than TypeAwareObject::isKindOf() in that only Layer-derived classes are checked.

Parameters:
className The name of the Layer-derived class to query.
layerName The Layer-derived class name to check type compatibility.
Returns:
Returns true if the given layer class name is a kind of the given class name; otherwise returns false.

virtual void DesktopServices::getLayerTypes ( const std::string &  className,
std::vector< std::string > &  classList 
) [pure virtual]

Returns a list of inherited layer class names for a given class name.

This method populates a vector with the class names of all inherited Layer class types. The given class name is used as the initial class for populating the vector. For example, passing in "RasterLayer" as a class name populates a vector with the "RasterLayer" and "Layer" strings.

Parameters:
className The layer class name for which to get all layer element types.
classList This vector is populated with the class names of all inherited layer classes and the given class name.

virtual ProductWindow* DesktopServices::deriveProduct ( View pView  )  [pure virtual]

Derive a new Product from an existing View.

This method creates a new ProductWindow and populates the view object with the specified View.

Parameters:
pView The View used to populate the new ProductWindow.
Returns:
The new ProductWindow or NULL if there was an error.

virtual PlotSetGroup* DesktopServices::createPlotSetGroup ( QWidget *  pParent = NULL  )  [pure virtual]

Creates a widget that can contain multiple plot sets.

This method creates widget that contains multiple plot sets, where an information bar is displayed along the top of the widget to manage the active plot set.

Parameters:
pParent The Qt widget to use as the parent for the plot set group widget. If NULL is passed in, the widget is not owned by another object, so it should be deleted when necessary by calling the deletePlotSetGroup() method.
Returns:
A pointer to the newly created plot set group widget.
See also:
createPlotSet(), createPlotWidget()

virtual void DesktopServices::deletePlotSetGroup ( PlotSetGroup pPlotSetGroup  )  [pure virtual]

Destroys a plot set group widget.

This method is intended to destroy plot set group widgets created with the createPlotSetGroup() method. This method should not be called if the plot set group widget has a valid parent widget, where the widget will be destroyed automatically when its parent is destroyed.

Parameters:
pPlotSetGroup The plot set group widget to delete.

virtual PlotSet* DesktopServices::createPlotSet ( const std::string &  plotSetName,
QWidget *  pParent = NULL 
) [pure virtual]

Creates a plot set widget that can contain multiple plots.

This method creates a tabbed widget that displays a plot widget on each tab. To display multiple plot set widgets within a single widget, see createPlotSetGroup() instead.

Parameters:
plotSetName The plot set name. This method does nothing if an empty string is passed in.
pParent The Qt widget to use as the parent for the plot set widget. If NULL is passed in, the widget is not owned by another object, so it should be deleted when necessary by calling the deletePlotSet() method.
Returns:
A pointer to the newly created plot set widget.
See also:
createPlotSetGroup(), createPlotWidget()

virtual void DesktopServices::deletePlotSet ( PlotSet pPlotSet  )  [pure virtual]

Destroys a plot set widget.

This method is intended to destroy plot set widgets created with the createPlotSet() method. This method should not be called if the plot set widget has a valid parent widget, where the plot set will be destroyed automatically when its parent is destroyed.

Parameters:
pPlotSet The plot set widget to delete.

virtual PlotWidget* DesktopServices::createPlotWidget ( const std::string &  plotName,
PlotType  plotType,
QWidget *  pParent = 0 
) [pure virtual]

Creates a plot widget that is not contained in a plot set.

This method creates a plot widget that is not associated with a plot set. To display multiple plot widgets within a single widget, see the createPlotSet() method instead.

Parameters:
plotName The plot name. This method does nothing if an empty string is passed in.
plotType The type of plot to create.
pParent The Qt widget to use as the parent for the plot widget. If NULL is passed in, the widget is not owned by another object, so it should be deleted when necessary by calling the deletePlotWidget() method.
Returns:
A pointer to the newly created plot widget.
See also:
createPlot()

virtual void DesktopServices::deletePlotWidget ( PlotWidget pPlot  )  [pure virtual]

Destroys a plot widget.

This method is intended to destroy plot widgets created with the createPlotWidget() method. This method should not be called if the plot widget has a valid parent widget, where the plot widget will be destroyed automatically when its parent is destroyed.

To destroy plot widgets displayed in a plot set, get the plot set containing the plot widget and call PlotSet::deletePlot() instead.

Parameters:
pPlot The plot widget to delete.
See also:
PlotWidget::getPlotSet()

virtual Axis* DesktopServices::createAxis ( AxisPosition  position,
QWidget *  pParent = 0 
) [pure virtual]

Creates an axis widget that is not contained in a PlotWidget.

Parameters:
position The position where the axis will be displayed relative to a plot view. The position defines how the tick marks are drawn and how the text is oriented.
pParent The Qt widget to use as the parent for the axis widget. The parent widget assumes ownership of the axis widget and will destroy the axis when it is destroyed. If NULL is passed in the deleteAxis() method should be called to destroy the widget.
Returns:
A pointer to the newly created Axis widget.

virtual void DesktopServices::deleteAxis ( Axis pAxis  )  [pure virtual]

Destroys an axis widget.

This method is intended to destroy axis widgets that were created with the createAxis() method. This method should not be called if the axis widget was created with a valid Qt parent widget.

Parameters:
pAxis The Axis widget to delete.

virtual void DesktopServices::initializeAction ( QAction *  pAction,
const std::string &  shortcutContext 
) [pure virtual]

Initializes the keyboard shortcut in an action.

This method initializes the keyboard shortcut in a given action from the user-defined configuration settings. If the shortcut for the action already exists in the configuration settings based on the given context, QAction::setShortcut() is called with that shortcut value. If the shortcut for the action does not exist in the configuration settings, an entry is added with the value set to the current shortcut value in the action.

Parameters:
pAction The action in which to initialize its keyboard shortcut.
shortcutContext The context name for the keyboard shortcut of the action. When the user edits keyboard shortcuts, the shortcuts are grouped according to their context string. Contexts can be nested by using a slash (/) between context levels. If the top-level context name is the same as a plug-in name, the shortcut is grouped under a single Plug-Ins context. This method does nothing if an empty string is passed in.
See also:
ToolBar::addButton(QAction*, const std::string&), MenuBar::insertCommand()

virtual MouseMode* DesktopServices::createMouseMode ( const std::string &  modeName,
const char *const   mouseCursor[],
const char *const   cursorMask[],
int  iHotX = 0,
int  iHotY = 0,
QAction *  pAction = NULL 
) const [pure virtual]

Creates the mouse mode.

This method creates a mouse mode that is available to add to a view.

Parameters:
modeName The name for the mouse mode. Mouse mode names must be unique for the view type to which they are added.
mouseCursor An icon to use for the mouse cursor in XPM format. Cursor icons can be any size, but typically cursors are 32 x 32 pixels in size or less. Currently only black and white cursors are supported.
cursorMask An icon to use as a mask for the cursor icon. The mask should act as a bit mask indicating which cursor icon pixels should be drawn and which pixels should be transparent. The size of the icon should be the same as mouseCursor.
iHotX The x-coordinate for the cursor hot spot.
iHotY The y-coordinate for the cursor hot spot.
pAction A Qt action associated with the mouse mode. When the mouse mode is added to a view, a non-NULL value will add the action to the main mouse mode action group containing the following mouse modes:
  • "LayerMode"
  • "MeasurementMode"
  • "PanMode"
  • "RotateMode"
  • "ZoomInMode"
  • "ZoomOutMode"
  • "ZoomBoxMode"
When the mouse mode is activated in the view, the action is toggled on and the other actions in the group are toggled off. So, this value should only be set if the action should be added to the action group.
Returns:
A pointer to the newly created mouse mode.
See also:
createMouseMode(const std::string&, const QCursor&, QAction*) const, MouseMode, deleteMouseMode(), View::addMouseMode(), View::setMouseMode()

virtual MouseMode* DesktopServices::createMouseMode ( const std::string &  modeName,
const QCursor &  mouseCursor,
QAction *  pAction = NULL 
) const [pure virtual]

Creates the mouse mode.

This overloaded method serves as a convenience to create a mouse mode that is available to add to a view.

Parameters:
modeName The name for the mouse mode. Mouse mode names must be unique for the view type to which they are added.
mouseCursor The cursor that should be displayed when the mouse mode is active. Cursors can be any size, but typically they are 32 x 32 pixels in size or less. Currently only black and white cursors are supported.
pAction A Qt action associated with the mouse mode. When the mouse mode is added to a view, a non-NULL value will add the action to the main mouse mode action group containing the following mouse modes:
  • "LayerMode"
  • "MeasurementMode"
  • "PanMode"
  • "RotateMode"
  • "ZoomInMode"
  • "ZoomOutMode"
  • "ZoomBoxMode"
When the mouse mode is activated in the view, the action is toggled on and the other actions in the group are toggled off. So, this value should only be set if the action should be added to the action group.
Returns:
A pointer to the newly created mouse mode.
See also:
MouseMode, deleteMouseMode(), View::addMouseMode(), View::setMouseMode()

virtual void DesktopServices::deleteMouseMode ( MouseMode pMouseMode  )  const [pure virtual]

Deletes a mouse mode.

This method deletes a mouse mode. The mode should have already been removed from all applicable views. The MouseMode pointer is invalid after calling this method.

WARNING: Mouse modes provided by the application cannot be deleted using this method, they will be cleaned up during application close.

Parameters:
pMouseMode The mouse mode to delete.
See also:
MouseMode

virtual void DesktopServices::setPanMode ( PanModeType  panMode  )  [pure virtual]

Sets the application pan mode.

This method sets the pan mode for the entire application. All views in all windows use this pan mode when panning through the view.

Parameters:
panMode The pan mode.
See also:
PanMode

virtual PanModeType DesktopServices::getPanMode (  )  const [pure virtual]

Returns the application pan mode.

Returns:
The pan mode.

virtual void DesktopServices::setAoiSelectionTool ( GraphicObjectType  toolType,
ModeType  modeType 
) [pure virtual]

Sets the current AOI pixel selection tool on the AOI toolbar.

This method sets the current object that is created when the user adds a new object to an AOI layer and the drawing mode that is used when the user edits the layer with the mouse. The given object type and drawing mode are set into the current AOI layer of the current view and into each AOI layer that is activated in any view. To set the graphic object type and drawing mode in the layer separately from the AOI toolbar, call GraphicLayer::setCurrentGraphicObjectType() or AoiLayer::setMode() instead.

Parameters:
toolType The new pixel selection tool.
modeType The new pixel selection mode.
Deprecated:
This method is deprecated, and may be removed in a future version. Use AoiToolBar::setSelectionTool() instead.

virtual void DesktopServices::setAoiAddMode ( AoiAddMode  mode  )  [pure virtual]

Sets the current AOI add mode on the AOI toolbar.

Parameters:
mode The new add mode.
Deprecated:
This method is deprecated, and may be removed in a future version. Use AoiToolBar::setAddMode() instead.

virtual GraphicObjectType DesktopServices::getAoiSelectionTool (  )  const [pure virtual]

Returns the current AOI pixel selection tool on the AOI toolbar.

Returns:
The current pixel selection tool.
Deprecated:
This method is deprecated, and may be removed in a future version. Use AoiToolBar::getSelectionTool() instead.

virtual ModeType DesktopServices::getAoiSelectionMode (  )  const [pure virtual]

Returns the current AOI pixel selection mode on the AOI toolbar.

Returns:
The current pixel selection mode.
Deprecated:
This method is deprecated, and may be removed in a future version. Use AoiToolBar::getSelectionMode() instead.

virtual AoiAddMode DesktopServices::getAoiAddMode (  )  const [pure virtual]

Returns the current AOI add mode on the AOI toolbar.

Returns:
The current add mode.
Deprecated:
This method is deprecated, and may be removed in a future version. Use AoiToolBar::getAddMode() instead.

virtual void DesktopServices::setAnnotationObject ( GraphicObjectType  objectType  )  [pure virtual]

Sets the current annotation object on the Annotation toolbar.

This method sets the current object that is created when the user adds a new object to an annotation layer. The given object is set into the current annotation layer of the current view and into each annotation layer that is activated in any view. To set the graphic object in the layer separately from the Annotation toolbar, call GraphicLayer::setCurrentGraphicObjectType() instead.

Parameters:
objectType The new annotation object.

virtual GraphicObjectType DesktopServices::getAnnotationObject (  )  const [pure virtual]

Retrieves the current annotation object on the Annotation toolbar.

Returns:
The current annotation object.

virtual bool DesktopServices::importFile ( const std::string &  importerSubtype = std::string(),
Progress pProgress = NULL 
) [pure virtual]

Loads data from a file.

This method is used to open any type of data from a file. A file selection dialog appears for the user to select a desired file and importer. If a valid importer subtype is given, only the importers of that subtype are available to the user; otherwise all importers are available.

Parameters:
importerSubtype The importer subtype for which to set the available importer in the file selection dialog. Passing in an empty string allows all importers to be available.
pProgress The progress object to use when importing the data. If NULL is passed in, a new progress object is created.
Returns:
Returns true if at least one or more data sets was successfully loaded from the file.
See also:
importFile(const std::string&, Progress*, std::vector<DataElement*>&)

virtual bool DesktopServices::importFile ( const std::string &  importerSubtype,
Progress pProgress,
std::vector< DataElement * > &  importedElements 
) [pure virtual]

Loads data from a file.

This method is used to open any type of data from a file. A file selection dialog appears for the user to select a desired file and importer. If a valid importer subtype is given, only the importers of that subtype are available to the user; otherwise all importers are available.

Parameters:
importerSubtype The importer subtype for which to set the available importer in the file selection dialog. Passing in an empty string allows all importers to be available.
pProgress The progress object to use when importing the data. If NULL is passed in, a new progress object is created.
importedElements A vector that will be populated with the data elements that were successfully imported from the user selected file. This vector will be empty if the user cancels the import operation or no data elements were successfully imported.
Returns:
Returns true if at least one or more data sets was successfully loaded from the file.
See also:
importFile(const std::string&, Progress*)

virtual bool DesktopServices::exportSessionItem ( SessionItem pItem,
FileDescriptor pNewFileDescriptor = NULL,
Progress pProgress = NULL 
) [pure virtual]

Saves a session item to disk.

This method is used to save data from a given session item to disk. A file selection dialog is invoked for the user to select an exporter and a filename in which the data will be saved.

Parameters:
pItem The session item to export.
pNewFileDescriptor The FileDescriptor to use for export. If NULL is passed in, a default FileDescriptor is created.
pProgress The progress object to use when exporting the session item. If NULL is passed in, a new progress object is created.
Returns:
Returns true if the session item was successfully saved to disk; otherwise returns false.

virtual bool DesktopServices::exportSessionItems ( const std::vector< SessionItem * > &  items,
Progress pProgress = NULL 
) [pure virtual]

Saves multiple session items to disk.

This method is used to save data from multiple session items to disk. A dialog is invoked for the user to select a directory in which the data will be saved, the exporter, and the default file extension for the new files.

Each session item is saved to a separate file with a default name based on the session item name.

Parameters:
items The session items to export. Each session item in the vector must be of the same type returned by TypeAwareObject::getObjectType().
pProgress The progress object to use when exporting the session items. If NULL is passed in, a new progress object is created.
Returns:
Returns true if at least one session item was successfully saved to disk. Returns false if no session items were successfully saved or if the given session items are not all of the same type.
See also:
SessionItem::getName()

virtual bool DesktopServices::displayHelpHome (  )  const [pure virtual]

Displays the main application online help page.

Returns:
TRUE if the browser was successfully launched with the main help page displayed, otherwise FALSE.

virtual bool DesktopServices::displayHelp ( const std::string &  filename  )  const [pure virtual]

Displays a given help file.

This method displays the given HTML help file by launching the default browser. A specific target within the file can be displayed by appending the # operator followed by the target name.

Parameters:
filename The existing HTML help file.
Returns:
TRUE if the browser was successfully launched with the file displayed, otherwise FALSE.

virtual void DesktopServices::displayProperties ( SessionItem pItem  )  const [pure virtual]

Invokes the properties dialog for a given session item.

Parameters:
pItem The session item for which to display its properties. This method does nothing if NULL is passed in.
Subject Notifications:
This method emits the signalAboutToShowPropertiesDialog() signal just before the properties dialog is about to be displayed.
See also:
displayProperties(SessionItem*, const std::vector<std::string>&, bool) const

virtual void DesktopServices::displayProperties ( SessionItem pItem,
const std::vector< std::string > &  displayedPages,
bool  bEmitSignal = true 
) const [pure virtual]

Invokes the properties dialog containing only certain page widgets for a given session item.

This method provides a means to hide default properties page widgets for the given session item. Only the properties pages given in the vector will be displayed in the properties dialog.

Parameters:
pItem The session item for which to display its properties. This method does nothing if NULL is passed in.
displayedPages The names of Properties plug-in page widgets to display in the properties dialog.
bEmitSignal Set this parameter to true to emit the signalAboutToShowPropertiesDialog() signal just before the dialog is shown. Set the parameter to false to not emit the signal and prevent other objects from adding pages not contained in displayedPages.
Subject Notifications:
This method emits the signalAboutToShowPropertiesDialog() signal just before the properties dialog is about to be displayed if the bEmitSignal parameter is set to true.
See also:
displayProperties(SessionItem*) const

virtual void DesktopServices::setStatusBarMessage ( const std::string &  messageText  )  const [pure virtual]

Displays a message on the main application status bar.

This method displays a message on the status bar for five seconds. Any message currently displayed in the status bar is replaced.

Parameters:
messageText The message to display. Can be empty.

virtual void DesktopServices::setSuppressibleMsgDlgState ( const std::string &  id,
bool  bState 
) [pure virtual]

Sets the state of the check box inside a suppressible message dialog.

The check box state is stored in ConfigurationSettings.

Please see How to create a suppressible message dialog for more details.

Parameters:
id The suppressible message dialog key that will be passed into ConfigurationSettings::getSetting() to set the dialog's check box state.
bState The state of the check box inside the suppressible message dialog.
See also:
getSuppressibleMsgDlgState(), showSuppressibleMsgDlg(), SuppressibleMsgDlg

virtual bool DesktopServices::getSuppressibleMsgDlgState ( const std::string &  id  )  [pure virtual]

Gets the state of the check box inside a suppressible message dialog.

Please see How to create a suppressible message dialog for more details.

Parameters:
id This ID will be used to get the suppressible message dialog check box state from ConfigurationSettings::getSetting().
Returns:
This method will return true if the state of the check box inside the suppressible message dialog is checked, meaning that the dialog will not be shown again. If the dialog check box is not checked, then the method will return false.
See also:
setSuppressibleMsgDlgState(), showSuppressibleMsgDlg(), SuppressibleMsgDlg

virtual void DesktopServices::showSuppressibleMsgDlg ( const std::string &  dialogTitle,
const std::string &  dialogMsg,
MessageType  type,
const std::string &  id,
QWidget *  pParent = NULL 
) [pure virtual]

Displays a suppressible message dialog that the user can disable by clicking on the check box inside the dialog.

This method will display a suppressible message dialog based on its ID as long as its "don't show this again" check box has not been checked. While this method shows the dialog, it's the dialog itself that handles both showing and reading of the "don't show this again" check box state. The icon that will be shown next to the message in the dialog will depend on the message type.

Each suppressible message dialog must have its own unique ID. This ID will be passed into ConfigurationSettings::getSetting() in order to get the dialog's current check box state.

If a plug-in developer wanted to give the user more control on when the message dialog gets displayed, the developer will have to write an option plug-in himself. For a example on how this would be done, take a look at the OptionsSuppressibleMsgDlg class located in PlugInSamplerQt.

Please see How to create a suppressible message dialog for more details.

Parameters:
dialogTitle The text that will appear on the suppressible message dialog title bar.
dialogMsg The text that will be displayed inside the suppressible message dialog.
type The type of message.
id The message dialog ID that will be used to get the check box state from ConfigurationSettings::getSetting().
pParent The message box parent. If pParent is NULL, the main application window will be the parent.
See also:
getSuppressibleMsgDlgState(), setSuppressibleMsgDlgState(), SuppressibleMsgDlg

virtual int DesktopServices::showMessageBox ( const std::string &  caption,
const std::string &  text,
const std::string &  button0 = std::string(),
const std::string &  button1 = std::string(),
const std::string &  button2 = std::string(),
int  defaultButton = 0,
int  escapeButton = -1 
) const [pure virtual]

Displays a message box to the user.

In interactive mode, this method displays a QMessageBox to the user. It will not return until the user presses one of the buttons on the message box. In batch mode, this method writes the caption and text to standard out and returns the default button value.

Parameters:
caption The text to put on the window title bar
text The message text for the dialog
button0 The label for the first button. If this string is empty, the button will not be displayed.
button1 The label for the second button. If this string is empty, the button will not be displayed.
button2 The label for the third button. If this string is empty, the button will not be displayed.
defaultButton The button that will be selected if the user simply presses the 'Enter' key. If this value does not correspond to any button, the 'Enter' key will be ignored.
escapeButton The button that will be selected if the user simply presses the 'Escape' key. If this value does not correspond to any button, pressing the 'Escape' key will cause the dialog to be dismissed and the value specified will be returned.
Returns:
The number of the button the user selected.

virtual void DesktopServices::addBackgroundPlugIn ( PlugIn pPlugIn,
Progress pProgress 
) const [pure virtual]

Adds a new background plug-in to the Background Plug-In Window.

This method adds an item to the background plug-in window that allows the user to view progress and abort the plug-in if possible. The method should be called after executing a background plug-in in interactive mode.

Parameters:
pPlugIn The background plug-in to add to the Background Plug-In Window.
pProgress The (thread-safe) Progress object that the plug-in uses.

virtual bool DesktopServices::registerCallback ( PlugInCallbackType  eType,
PlugInCallback pCallback 
) const [pure virtual]

Registers a callback to the core.

Valid callback types are enumerated in TypesFile.h. Currently, only callbacks signaling background processing are supported.

Parameters:
eType The type of callback to register.
pCallback The callback being registered. The application assumes ownership of the callback object and deletes it after executing the callback. The plug-in should not attempt to delete the callback object itself.
Returns:
Returns true if the callback was registered properly; returns false if there was an error registering or if an invalid callback type was specified.
See also:
PlugInCallbackType, Executable::isBackground()

virtual DockWindowAreaType DesktopServices::getDockWindowArea ( const DockWindow dockWindow  )  const [pure virtual]

Query the dock location of the specified DockWindow.

Parameters:
dockWindow The DockWindow whose location is being queried
Returns:
the location of the DockWindow

virtual bool DesktopServices::setDockWindowArea ( DockWindow pDockWindow,
DockWindowAreaType  dockArea 
) [pure virtual]

Sets a DockWindow to the given dock area.

Parameters:
pDockWindow DockWindow to move.
dockArea Area to dock with.
Returns:
True if the operation was successful, false otherwise.

virtual bool DesktopServices::createProgressDialog ( const std::string &  caption,
Progress pProgress 
) const [pure virtual]

Attach a Progress object to an appropriate dialog.

Parameters:
caption A caption for the view.
pProgress The Progress object to attach.
Returns:
True if successful, false otherwise.

virtual const std::vector<std::string>& DesktopServices::getAvailableSymbolNames (  )  const [pure virtual]

Get a list of all available symbols for MultipointObjects.

The list is formed from all supported files within the Annotation directory. Only CGM files are currently supported.

Returns:
A vector of strings containing the names of available symbols.

virtual const QImage& DesktopServices::getSymbolImage ( const std::string &  symbol  )  const [pure virtual]

Get a QImage of the given symbol, for use with MultipointObjects.

Parameters:
symbol The name of the symbol to get the image of. This name should be contained in the vector gotten from getAvailableSymbolNames().
Returns:
A QImage containing the drawn symbol.


Software Development Kit - Opticks 4.9.0 Build 16218