ViewWindow Class Reference

A window that displays a view. More...

#include <ViewWindow.h>

Inheritance diagram for ViewWindow:

Inheritance graph

List of all members.

Public Member Functions

virtual ViewcreateView (const std::string &viewName, const ViewType &viewType)=0
virtual ViewgetView () const =0
virtual void setWidget (QWidget *pWidget)=0
virtual QWidget * getWidget () const =0
virtual void print (bool bSetupDialog=false)=0

Static Public Member Functions

static const std::string & signalAboutToSetWidget ()
static const std::string & signalWidgetSet ()

Protected Member Functions

virtual ~ViewWindow ()


Detailed Description

A window that displays a view.

A view window is an abstract base class for windows to display a single widget that can be either a View object or a generic QWidget. Since the window contains a single widget, the current image can be printed as well.

This subclass of Subject will notify upon the following conditions:

See also:
Window

Definition at line 35 of file ViewWindow.h.


Constructor & Destructor Documentation

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

This should be destroyed by calling DesktopServices::deleteWindow.

Definition at line 128 of file ViewWindow.h.


Member Function Documentation

static const std::string& ViewWindow::signalAboutToSetWidget (  )  [static]

Emitted just before the widget is set into the window.

See also:
setWidget()

Definition at line 43 of file ViewWindow.h.

static const std::string& ViewWindow::signalWidgetSet (  )  [static]

Emitted after the widget is set into the window with boost::any<QWidget*> containing a pointer to the widget that was set.

See also:
setWidget()

Definition at line 51 of file ViewWindow.h.

virtual View* ViewWindow::createView ( const std::string &  viewName,
const ViewType viewType 
) [pure virtual]

Creates the view based on a given type.

This method creates a view and sets it as the display widget in the window. This method does nothing for SpatialDataWindow and ProductWindow objects since a view is already created by default.

Parameters:
viewName The name for the view. Depending on the view type, the name may appear in the view's title bar.
viewType The type of the view to be created.
Returns:
A pointer to the created view. NULL is returned if the view is already created or if an error occurred.
Subject Notifications:
This method will notify signalAboutToSetWidget() just before the created view is set into the window and signalWidgetSet() just after the view is set with boost::any<QWidget*> containing a pointer to the view that is set into the window.
See also:
ViewType, setWidget()

virtual View* ViewWindow::getView (  )  const [pure virtual]

Returns a pointer to the view.

Returns:
A pointer to the view displayed in the window. NULL is returned if a view has not been created, or if the window is displaying a custom widget.

virtual void ViewWindow::setWidget ( QWidget *  pWidget  )  [pure virtual]

Sets the widget to be displayed in the window.

This method sets the view window to display a custom Qt widget instead of a View. This method does nothing for SpatialDataWindow and ProductWindow objects since by default, they contain a view.

Parameters:
pWidget The Qt widget to set in the view window. Cannot be NULL.
Subject Notifications:
This method will notify signalAboutToSetWidget() just before the widget is set into the window and signalWidgetSet() just after the widget is set with boost::any<QWidget*> containing a pointer to the widget that is set into the window.

virtual QWidget* ViewWindow::getWidget (  )  const [pure virtual]

Returns the current widget in the window.

Returns:
A pointer to the widget in the view window. If a View is displayed, the widget displaying the View is returned. NULL is returned if no widget exists or the widget cannot be accessed.
See also:
setWidget()

virtual void ViewWindow::print ( bool  bSetupDialog = false  )  [pure virtual]

Sends the current image displayed in the window to the printer.

Parameters:
bSetupDialog Set this value to TRUE to display the print options dialog before printing.


Software Development Kit - Opticks 4.9.0 Build 16218