DockWindow Class Reference

Settings, characteristics, and features for docking windows. More...

#include <DockWindow.h>

Inheritance diagram for DockWindow:

Inheritance graph

List of all members.

Public Member Functions

virtual void setIcon (const QIcon &icon)=0
virtual std::list
< ContextMenuAction
getContextMenuActions () const =0
virtual void dock ()=0
virtual void undock ()=0
virtual void show ()=0
virtual void hide ()=0
virtual bool isShown () const =0

Static Public Member Functions

static const std::string & signalDocked ()
static const std::string & signalUndocked ()
static const std::string & signalShown ()
static const std::string & signalHidden ()
static const std::string & signalAboutToShowContextMenu ()

Protected Member Functions

virtual ~DockWindow ()


Detailed Description

Settings, characteristics, and features for docking windows.

This class defines all of the services available to dock windows. A dock window can attach to an edge of the main application window,or can float independently on the desktop. When the user right-clicks in the window's context, a context menu is invoked allowing the user to change the display characteristics of the window. The window also contains a button to hide itself.

This subclass of Subject will notify upon the following conditions:

See also:
ViewWindow

Definition at line 34 of file DockWindow.h.


Constructor & Destructor Documentation

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

This should be destroyed by calling DesktopServices::deleteWindow.

Definition at line 172 of file DockWindow.h.


Member Function Documentation

static const std::string& DockWindow::signalDocked (  )  [static]

Emitted when the window is docked.

Definition at line 40 of file DockWindow.h.

static const std::string& DockWindow::signalUndocked (  )  [static]

Emitted when the window is undocked.

Definition at line 45 of file DockWindow.h.

static const std::string& DockWindow::signalShown (  )  [static]

Emitted when the window is shown.

Definition at line 50 of file DockWindow.h.

static const std::string& DockWindow::signalHidden (  )  [static]

Emitted when the window is hidden.

Definition at line 55 of file DockWindow.h.

static const std::string& DockWindow::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 by the user clicking inside a dock window. To receive notification for when a context menu is invoked when the user clicks on any session item, attach to the DesktopServices::signalAboutToShowContextMenu() signal instead.

This signal is emitted after getContextMenuActions() is called and after the DesktopServices::signalAboutToShowContextMenu() signal is emitted, but 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 dock window.

See also:
Context menu calling sequence

Definition at line 78 of file DockWindow.h.

virtual void DockWindow::setIcon ( const QIcon &  icon  )  [pure virtual]

Associates an icon with the dock window.

The icon associated with the dock window will appear in the session explorer.

Parameters:
icon The icon to associate with the dock window.
See also:
getIcon()

virtual std::list<ContextMenuAction> DockWindow::getContextMenuActions (  )  const [pure virtual]

Returns the context menu actions available for this session item.

Returns:
The list of context menu actions that should be displayed when the user right-clicks on a widget displaying or containing the session item.
See also:
ContextMenuAction

Default Implementation:
The default implementation returns the context menu actions listed here. The default actions can be removed or additional actions can be added by attaching to the signalAboutToShowContextMenu() signal.

Implements SessionItem.

Implemented in SessionExplorer.

virtual void DockWindow::dock (  )  [pure virtual]

Attaches the view to the edge of the main application window.

A docked window is fixed to an adge of the application window and can be resized in one direction only. The title bar is replaced by a gripper bar with small buttons to hide the window or maximize available space if other views are docked along the same wdge of the application window. A docked window cannot be minimized or maximized.

Subject Notifications:
This method will notify signalModified() if the window was successfully docked from a previously undocked state.
See also:
undock()

virtual void DockWindow::undock (  )  [pure virtual]

Floats a docked window over the desktop.

This method detaches a docked window from the main application window and floats it over the desktop. The title bar reappears, and the window can be minimized and maximized.

Subject Notifications:
This method will notify signalModified() if the window was successfully undocked from a previously docked state.
See also:
dock()

virtual void DockWindow::show (  )  [pure virtual]

Shows the dock window.

This method displays the dock window in its former state, docked or floating. If the dock window is already displayed, this method does nothing.

Subject Notifications:
This method will notify signalModified() if the window was successfully displayed from a previously hidden state.
See also:
hide()

virtual void DockWindow::hide (  )  [pure virtual]

Hides the dock window.

This method hides the dock window but does not delete it. A hidden dock window can be displayed again from the main application right-click menu. If the dock window is already hidden, this method does nothing.

Subject Notifications:
This method will notify signalModified() if the window was successfully hidden from a previously visible state.
See also:
show()

virtual bool DockWindow::isShown (  )  const [pure virtual]

Returns the current visiblity state of the dock window.

Returns:
Returns true if the dock window is shown or false if the dock window is hidden.


Software Development Kit - Opticks 4.9.0 Build 16218