PlotObject Class Reference

The base class for all objects displayed on a plot. More...

#include <PlotObject.h>

Inheritance diagram for PlotObject:

Inheritance graph

List of all members.

Public Member Functions

virtual void setObjectName (const std::string &objectName)=0
virtual void getObjectName (std::string &objectName) const =0
virtual PlotObjectType getType () const =0
virtual void setVisible (bool bVisible)=0
virtual bool isVisible () const =0
virtual bool isPrimary () const =0
virtual void setSelected (bool bSelect)=0
virtual bool isSelected () const =0
virtual bool getExtents (double &dMinX, double &dMinY, double &dMaxX, double &dMaxY)=0

Static Public Member Functions

static const std::string & signalRenamed ()
static const std::string & signalVisibilityChanged ()
static const std::string & signalSelected ()

Protected Member Functions

virtual ~PlotObject ()


Detailed Description

The base class for all objects displayed on a plot.

This class contains properties for plot objects that are common to all objects. Each object has a name, type, display state, primary or secondary state, selection state, and coordinate extents.

This subclass of Subject will notify upon the following conditions:

See also:
PlotView

Definition at line 34 of file PlotObject.h.


Constructor & Destructor Documentation

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

This should be destroyed by calling PlotView::deleteObject.

Definition at line 157 of file PlotObject.h.


Member Function Documentation

static const std::string& PlotObject::signalRenamed (  )  [static]

Emitted with any<std::string> when the object is renamed.

Definition at line 40 of file PlotObject.h.

static const std::string& PlotObject::signalVisibilityChanged (  )  [static]

Emitted with any<bool> when the object is shown or hidden.

Definition at line 44 of file PlotObject.h.

static const std::string& PlotObject::signalSelected (  )  [static]

Emitted with any<bool> when the object is selected or deselected.

Definition at line 48 of file PlotObject.h.

virtual void PlotObject::setObjectName ( const std::string &  objectName  )  [pure virtual]

Sets the object name.

Parameters:
objectName The new object name. Cannot be empty.
Subject Notifications:
This method will notify signalRenamed with any<std::string>.

virtual void PlotObject::getObjectName ( std::string &  objectName  )  const [pure virtual]

Retrieves the object name.

Parameters:
objectName A string that is populated with the object name.

virtual PlotObjectType PlotObject::getType (  )  const [pure virtual]

Returns the specific object type.

Returns:
The object type.
See also:
PlotObjectType

virtual void PlotObject::setVisible ( bool  bVisible  )  [pure virtual]

Toggles the display of the object on the plot.

Parameters:
bVisible Set this value to TRUE to show the object or FALSE to hide the object.
Subject Notifications:
This method will notify signalVisibilityChanged with any<bool>.

Implemented in PlotGroup.

virtual bool PlotObject::isVisible (  )  const [pure virtual]

Queries whether the object is currently displayed on the plot.

Returns:
TRUE if the object is displayed or FALSE if the object is hidden.

virtual bool PlotObject::isPrimary (  )  const [pure virtual]

Queries whether the object is a primary object on the plot.

A primary plot object is one that appears in the foreground of the plot and has an entry in the legend. Most objects added to a plot will be primary objects, but objects such as gridlines can be created as secondary objects since they are not the main focus of the plot data.

Returns:
TRUE if the object is a primary object or FALSE if the object is a secondary object.
See also:
PlotView::addObject()

virtual void PlotObject::setSelected ( bool  bSelect  )  [pure virtual]

Sets the selection state of the object.

This method sets the plot object as selected and may alter how the object is drawn in the plot. This is done mainly for user feedback that the object is selected. For some objects, like the histogram, selecting the object does nothing.

Parameters:
bSelect Set this value to TRUE to select the object or FALSE to deselect the object.
Subject Notifications:
This method will notify signalSelected with any<bool>.

Implemented in PlotGroup.

virtual bool PlotObject::isSelected (  )  const [pure virtual]

Queries whether the object is currently selected.

Returns:
TRUE if the object is selected or FALSE if the object is not selected.
See also:
setSelected()

virtual bool PlotObject::getExtents ( double &  dMinX,
double &  dMinY,
double &  dMaxX,
double &  dMaxY 
) [pure virtual]

Retrieves the bounding box of the object.

This method retrieves the minimum and maximum coordinates of the object at its current location in the plot. These are provided as world coordinates.

Parameters:
dMinX Populated with the minimum x-coordinate of the object.
dMinY Populated with the minimum y-coordinate of the object.
dMaxX Populated with the maximum x-coordinate of the object.
dMaxY Populated with the maximum y-coordinate of the object.
Returns:
TRUE if the coordinate extents were successfully populated, otherwise FALSE.

Implemented in PointSet.


Software Development Kit - Opticks 4.9.0 Build 16218