ProductView Class Reference

A view for custom product generation. More...

#include <ProductView.h>

Inheritance diagram for ProductView:

Inheritance graph

List of all members.

Public Member Functions

virtual void setPaperSize (double dWidth, double dHeight)=0
virtual void getPaperSize (double &dWidth, double &dHeight) const =0
virtual void setPaperColor (const ColorType &paperColor)=0
virtual ColorType getPaperColor () const =0
virtual void setDpi (unsigned int dpi)=0
virtual unsigned int getDpi () const =0
virtual bool loadTemplate (const std::string &filename)=0
virtual bool saveTemplate (const std::string &filename) const =0
virtual AnnotationLayergetLayoutLayer () const =0
virtual ClassificationLayergetClassificationLayer () const =0
virtual void setActiveLayer (GraphicLayer *pLayer)=0
virtual GraphicLayergetActiveLayer () const =0
virtual bool setActiveEditObject (GraphicObject *pObject)=0
virtual GraphicObjectgetActiveEditObject () const =0
virtual bool setActiveEditView (View *pView)=0
virtual ViewgetActiveEditView () const =0

Static Public Member Functions

static const FilenamegetSettingTemplateFile ()
static bool hasSettingTemplateFile ()
static void setSettingTemplateFile (Filename *pNewValue, bool setIfSame=false)
static std::string getSettingTemplateFileKey ()
static const FilenamegetSettingTemplatePath ()
static bool hasSettingTemplatePath ()
static void setSettingTemplatePath (Filename *pNewValue, bool setIfSame=false)
static std::string getSettingTemplatePathKey ()
static PositionType getSettingClassificationMarkingPositions ()
static bool hasSettingClassificationMarkingPositions ()
static void setSettingClassificationMarkingPositions (PositionType newValue, bool setIfSame=false)
static std::string getSettingClassificationMarkingPositionsKey ()
static const std::string & signalPaperSizeChanged ()
static const std::string & signalPaperColorChanged ()
static const std::string & signalDpiChanged ()
static const std::string & signalLayerActivated ()

Protected Member Functions

virtual ~ProductView ()


Detailed Description

A view for custom product generation.

The product view provides a means by which custom output products can be created. The view contains an annotation layer called the layout layer that is displayed on a sheet of paper. Annotation objects can be added to the layout layer to create a finished product. View objects are often used in the layout layer to display data or results. Because views can be modified separately, the product view contains an active edit view. The active edit view object is identified in the layout layer with selection handles. The view also contains a classification layer to specify classification markings for the product.

The product view defines the following mouse modes, where the name given is the name populated by MouseMode::getName():

This subclass of Subject will notify upon the following conditions:

See also:
AnnotationLayer, ClassificationLayer

Definition at line 52 of file ProductView.h.


Constructor & Destructor Documentation

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

This should be destroyed by calling DesktopServices::deleteView.

Definition at line 434 of file ProductView.h.


Member Function Documentation

static const Filename* ProductView::getSettingTemplateFile (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a NULL value will be returned.

Please see Settings Macros for more details

Returns:
the current value for this setting or NULL if not found.

Definition at line 63 of file ProductView.h.

static bool ProductView::hasSettingTemplateFile (  )  [static]

Returns true if this setting exists in ConfigurationSettings.

It may still be NULL however.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 70 of file ProductView.h.

static void ProductView::setSettingTemplateFile ( Filename pNewValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
pNewValue the new value for this setting. If NULL, the value will not be set.
setIfSame If true, the value will be set into ConfigurationSettings even if the pNewValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the pNewValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the pNewValue is unique to the user.

Definition at line 86 of file ProductView.h.

static std::string ProductView::getSettingTemplateFileKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 94 of file ProductView.h.

static const Filename* ProductView::getSettingTemplatePath (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a NULL value will be returned.

Please see Settings Macros for more details

Returns:
the current value for this setting or NULL if not found.

Definition at line 103 of file ProductView.h.

static bool ProductView::hasSettingTemplatePath (  )  [static]

Returns true if this setting exists in ConfigurationSettings.

It may still be NULL however.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 110 of file ProductView.h.

static void ProductView::setSettingTemplatePath ( Filename pNewValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
pNewValue the new value for this setting. If NULL, the value will not be set.
setIfSame If true, the value will be set into ConfigurationSettings even if the pNewValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the pNewValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the pNewValue is unique to the user.

Definition at line 126 of file ProductView.h.

static std::string ProductView::getSettingTemplatePathKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 134 of file ProductView.h.

static PositionType ProductView::getSettingClassificationMarkingPositions (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 145 of file ProductView.h.

static bool ProductView::hasSettingClassificationMarkingPositions (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 152 of file ProductView.h.

static void ProductView::setSettingClassificationMarkingPositions ( PositionType  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 168 of file ProductView.h.

static std::string ProductView::getSettingClassificationMarkingPositionsKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 176 of file ProductView.h.

static const std::string& ProductView::signalPaperSizeChanged (  )  [static]

Emitted with boost::any<std::pair<double,double> > when the paper size is changed.

Definition at line 182 of file ProductView.h.

static const std::string& ProductView::signalPaperColorChanged (  )  [static]

Emitted with boost::any<ColorType> when the paper color is changed.

Definition at line 187 of file ProductView.h.

static const std::string& ProductView::signalDpiChanged (  )  [static]

Emitted with boost::any<unsigned int> when the paper dpi changes.

Definition at line 192 of file ProductView.h.

static const std::string& ProductView::signalLayerActivated (  )  [static]

Emitted with boost::any<Layer*> when a layer is activated.

Definition at line 197 of file ProductView.h.

virtual void ProductView::setPaperSize ( double  dWidth,
double  dHeight 
) [pure virtual]

Sets the paper size.

This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.

Parameters:
dWidth The new width of the displayed paper in inches.
dHeight The new height of the displayed paper in inches.
Subject Notifications:
This method will notify signalPaperSizeChanged with any<std::pair<double,double> >.

virtual void ProductView::getPaperSize ( double &  dWidth,
double &  dHeight 
) const [pure virtual]

Retrieves the paper size.

Parameters:
dWidth Populated with the width of the displayed paper in inches.
dHeight Populated with the height of the displayed paper in inches.

virtual void ProductView::setPaperColor ( const ColorType paperColor  )  [pure virtual]

Sets the paper color.

The paper color extends to the edge of the paper area. Depending on the view zoom level, this may or may not extend to the edge of the view area.

This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.

Parameters:
paperColor The new paper color.
Subject Notifications:
This method will notify signalPaperColorChanged with any<ColorType>.
See also:
View::setBackgroundColor()

virtual ColorType ProductView::getPaperColor (  )  const [pure virtual]

Returns the paper color.

Returns:
The current paper color.
See also:
View::getBackgroundColor()

virtual void ProductView::setDpi ( unsigned int  dpi  )  [pure virtual]

Sets the dots per inch (DPI) of the paper.

The paper DPI is used in conjunction with the paper size to establish the coordinate extents of the paper used by the Layout annotation layer. The default DPI is 100, so a paper size of 8.5 by 11 has paper coordinate extents of 850 and 1100.

This method does not call View::refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.

Parameters:
dpi The new dots per inch value of the paper.
Subject Notifications:
This method will notify signalDpiChanged with any<unsigned int>.

virtual unsigned int ProductView::getDpi (  )  const [pure virtual]

Returns the dots per inch (DPI) of the displayed paper.

The paper DPI is used in conjunction with the paper size to establish the coordinate extents of the paper used by the Layout annotation layer. The default DPI is 100, so a paper size of 8.5 by 11 has paper coordinate extents of 850 and 1100.

Returns:
The dots per inch value of the paper.

virtual bool ProductView::loadTemplate ( const std::string &  filename  )  [pure virtual]

Loads a product template from a file.

A product template is a set of annotation objects displayed in the layout layer. Loading a template from a file removes all objects currently displayed in the layout layer.

Parameters:
filename The filename of the template to load. An empty string will cause a file selection dialog box to be displayed for the user to select a file.
Returns:
TRUE if the template was loaded successfully, otherwise FALSE.
See also:
getLayoutLayer()

virtual bool ProductView::saveTemplate ( const std::string &  filename  )  const [pure virtual]

Saves the annotation objects in the layout layer as a template.

Parameters:
filename The destination filename of the template to save. An empty string will cause a file selection dialog box to be displayed for the user to select a file.
Returns:
TRUE if the template was saved successfully, otherwise FALSE.

virtual AnnotationLayer* ProductView::getLayoutLayer (  )  const [pure virtual]

Returns the annotation layer for the product's annotation objects.

Returns:
A pointer to the annotation layer containing the annotation objects.

virtual ClassificationLayer* ProductView::getClassificationLayer (  )  const [pure virtual]

Returns the classification layer used to display the product classification markings.

Returns:
A pointer to the classification layer.

virtual void ProductView::setActiveLayer ( GraphicLayer pLayer  )  [pure virtual]

Sets the active layer in the view.

The active layer will appear on the toolbar if there is no active edit view.

Parameters:
pLayer The layer to activate. This must be either the layout layer or the classification layer.
See also:
getLayoutLayer(), getClassificationLayer()
Subject Notifications:
This method will notify signalLayerActivated with any<GraphicLayer*>.

virtual GraphicLayer* ProductView::getActiveLayer (  )  const [pure virtual]

Returns the active product view layer.

Returns:
A pointer to the active layer, either the layout layer or the classification layer. NULL is returned if there is an active edit view object.
See also:
getLayoutLayer(), getClassificationLayer(), getActiveEditObject(), getActiveEditView()

virtual bool ProductView::setActiveEditObject ( GraphicObject pObject  )  [pure virtual]

Sets the active view object that processes mouse and other events.

This method enables and disables editing of a view inside of its annotation view object. The active view object appears with selection handles and all mouse events are processed by the view instead of the layout layer.

The active edit view object can also be set according to its view by calling setActiveEditView().

Parameters:
pObject The annotation view object to set as the active edit object. If this value is non-NULL, the active layer becomes NULL. If the value is NULL, editing of the view is disabled and editing of the layout layer is enabled.
Returns:
This method returns true if the annotation view object was successfully activated, thereby enabling editing of its view, otherwise false.
See also:
setActiveEditView()

virtual GraphicObject* ProductView::getActiveEditObject (  )  const [pure virtual]

Returns the annotation view object that has view editing enabled.

This method returns the current annotation object containing the view that can be edited. The view inside the annotation object can be obtained directly by calling getActiveEditView().

Returns:
A pointer to the active annotation view object that allows editing of the view contained in the object. NULL is returned if view editing is disabled and the layout layer or classification layer is enabled.
See also:
getActiveEditView()

virtual bool ProductView::setActiveEditView ( View pView  )  [pure virtual]

Sets the active view that processes mouse and other events.

This method enables and disables editing of a view inside of its annotation view object. The active view object appears with selection handles and all mouse events are processed by the view instead of the layout layer.

The active edit view object can also be set according to its annotation object by calling setActiveEditObject().

Parameters:
pView The view to set as the active edit view. The view must be contained in a valid annotation view object in the layout layer. If the view object containing this view is found, the active layer becomes NULL. Set this value to NULL to disable view editing and enable editing of the layout layer.
Returns:
This method returns true if the annotation view object containing the given view was successfully activated, thereby enabling editing of view. Otherwise this method returns false.
See also:
setActiveEditObject()

virtual View* ProductView::getActiveEditView (  )  const [pure virtual]

Returns the view that has editing enabled.

This method returns the view inside the annotation view object that is currently active. This is identical to getActiveEditObject()->getObjectView().

Returns:
A pointer to the view inside of an annotation view object that can be actively edited. NULL is returned if view editing is disabled and the layout layer or classification layer is enabled.
See also:
getActiveEditObject()


Software Development Kit - Opticks 4.9.0 Build 16218