Locator Class Reference

Marks a specific location on a plot. More...

#include <Locator.h>

Inheritance diagram for Locator:

Inheritance graph

List of all members.

Public Types

enum  LocatorStyleEnum { HORIZONTAL_LOCATOR = 0x0001, VERTICAL_LOCATOR = 0x0002, CROSSHAIR_LOCATOR = HORIZONTAL_LOCATOR | VERTICAL_LOCATOR }
typedef EnumWrapper
< LocatorStyleEnum
LocatorStyle

Public Member Functions

virtual void setLocation (const LocationType &location, bool updateText=true)=0
virtual LocationType getLocation () const =0
virtual void setText (const std::string &xText, const std::string &yText)=0
virtual void getText (std::string &xText, std::string &yText) const =0
virtual void setStyle (LocatorStyle style)=0
virtual LocatorStyle getStyle () const =0
virtual void setColor (const ColorType &locatorColor)=0
virtual ColorType getColor () const =0
virtual void setLineWidth (int iWidth)=0
virtual int getLineWidth () const =0
virtual void setLineStyle (LineStyle lineStyle)=0
virtual LineStyle getLineStyle () const =0

Static Public Member Functions

static const std::string & signalLocationChanged ()
static const std::string & signalStyleChanged ()
static const std::string & signalTextChanged ()

Protected Member Functions

virtual ~Locator ()


Detailed Description

Marks a specific location on a plot.

The locator object can be used to pinpoint a particular location on a plot. A combination of a horizontal line and vertical line are used to mark the location. A single horizontal line or a single vertical line can also be drawn to mark a particular value along a single plot axis.

This subclass of Subject will notify upon the following conditions:

See also:
PlotObject, Locator::LocatorStyle

Definition at line 36 of file Locator.h.


Member Typedef Documentation

The EnumWrapper contains a given enum value and provides a isValid() method which returns true if the contained enum value is valid.

Please see How To Use EnumWrapper for more information. The wrapped enum values are Locator::LocatorStyleEnum.

Definition at line 55 of file Locator.h.


Member Enumeration Documentation

Specifies how the locator is drawn.

Enumerator:
HORIZONTAL_LOCATOR  A single horizontal line is drawn along the x-axis.
VERTICAL_LOCATOR  A single vertical line is drawn along the y-axis.
CROSSHAIR_LOCATOR  A horizonal line and vertical line are drawn, intersecting at the locator location.

Definition at line 42 of file Locator.h.


Constructor & Destructor Documentation

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

This should be destroyed by calling PlotView::deleteObject.

Definition at line 200 of file Locator.h.


Member Function Documentation

static const std::string& Locator::signalLocationChanged (  )  [static]

Emitted with any<LocationType> when the locator position changes.

Definition at line 60 of file Locator.h.

static const std::string& Locator::signalStyleChanged (  )  [static]

Emitted with any<LocatorStyle> when the locator style changes.

Definition at line 64 of file Locator.h.

static const std::string& Locator::signalTextChanged (  )  [static]

Emitted with any<std::pair<std::string,std::string> > when the locator text changes, containing the new xText and yText as first and second respectively.

Definition at line 70 of file Locator.h.

virtual void Locator::setLocation ( const LocationType location,
bool  updateText = true 
) [pure virtual]

Sets the locator location.

Parameters:
location The new locator location.
updateText If true, the locator will update its text strings to reflect the position of the locator. If false, it will leave them unchanged.
Subject Notifications:
This method will notify signalLocationChanged() with any<LocationType>.

virtual LocationType Locator::getLocation (  )  const [pure virtual]

Returns the locator location.

Returns:
The current locator location.

virtual void Locator::setText ( const std::string &  xText,
const std::string &  yText 
) [pure virtual]

Sets the locator text.

Parameters:
xText The new x text string.
yText The new y text string.
Subject Notifications:
This method will notify signalTextChanged() with any<std::pair<std::string,std::string> > containing the new xText and yText as first and second respectively.

virtual void Locator::getText ( std::string &  xText,
std::string &  yText 
) const [pure virtual]

Retrieves the locator text strings.

Parameters:
xText The x text string.
yText The y text string.

virtual void Locator::setStyle ( LocatorStyle  style  )  [pure virtual]

Sets the locator style.

Parameters:
style The new locator style.
See also:
Locator::LocatorStyle
Subject Notifications:
This method will notify signalStyleChanged() with any<LocatorStyle>.

virtual LocatorStyle Locator::getStyle (  )  const [pure virtual]

Returns the locator style.

Returns:
The current locator style.

virtual void Locator::setColor ( const ColorType locatorColor  )  [pure virtual]

Sets the locator color.

Parameters:
locatorColor The new locator color. Must be a valid color.
See also:
ColorType::isValid()
Subject Notifications:
This method will notify with Subject::signalModified().

virtual ColorType Locator::getColor (  )  const [pure virtual]

Returns the locator color.

Returns:
The current locator color.

virtual void Locator::setLineWidth ( int  iWidth  )  [pure virtual]

Sets the locator line width.

Parameters:
iWidth The new locator line width. Cannot be zero.
Subject Notifications:
This method will notify with Subject::signalModified().

virtual int Locator::getLineWidth (  )  const [pure virtual]

Returns the locator line width.

Returns:
The current locator line width.

virtual void Locator::setLineStyle ( LineStyle  lineStyle  )  [pure virtual]

Sets the locator line style.

Parameters:
lineStyle The new locator line style.
See also:
LineStyle
Subject Notifications:
This method will notify with Subject::signalModified().

virtual LineStyle Locator::getLineStyle (  )  const [pure virtual]

Returns the locator line style.

Returns:
The current locator line style.


Software Development Kit - Opticks 4.9.0 Build 16218