casa::PlotMSAnnotator Class Reference

Subclass of PlotMouseTool for drawing/managing annotations on the plot canvases of PlotMSApp. More...

#include <PlotMSAnnotator.h>

Inheritance diagram for casa::PlotMSAnnotator:
casa::PlotMouseTool casa::PlotMSPlotManagerWatcher casa::PlotWheelEventHandler casa::PlotMouseMoveEventHandler casa::PlotMouseDragEventHandler casa::PlotMouseReleaseEventHandler casa::PlotMousePressEventHandler casa::PlotClickEventHandler casa::PlotSelectEventHandler casa::PlotTool

List of all members.

Public Types

enum  Mode {
  TEXT,
  RECTANGLE
}
 

Static //.

More...

Public Member Functions

 PlotMSAnnotator (PlotMSPlotter *parent, Mode startingMode=TEXT)
 Non-Static //.
 ~PlotMSAnnotator ()
 Destructor.
Mode drawingMode () const
 Gets/Sets the current drawing mode.
void setDrawingMode (Mode mode)
PlotFontPtr textFont () const
 Gets/Sets the current text properties (null means default for PlotAnnotation object).
void setTextFont (const PlotFontPtr font)
PlotLinePtr textOutline () const
void setTextOutline (const PlotLinePtr outline)
PlotAreaFillPtr textBackground () const
void setTextBackground (const PlotAreaFillPtr background)
PlotLinePtr rectangleLine () const
 Gets/Sets the current rectangle properties (null means default for PlotShapeRectangle object).
void setRectangleLine (const PlotLinePtr line)
PlotAreaFillPtr rectangleAreaFill () const
void setRectangleAreaFill (const PlotAreaFillPtr fill)
void clearText (PlotCanvas *canvas=NULL)
 Clears all text/rectangle annotations off the given canvas.
void clearRectangles (PlotCanvas *canvas=NULL)
void clearAll (PlotCanvas *canvas=NULL)
void setActive (bool isActive=true)
 Overrides PlotTool::setActive().
void handleMouseEvent (const PlotEvent &event)
 Implements PlotMouseTool::handleMouseEvent().
void plotsChanged (const PlotMSPlotManager &manager)
 Implements PlotMSPlotManagerWatcher::plotChanged().

Protected Member Functions

void setActions (QAction *annotateAction, const QMap< PlotMSAction::Type, QAction * > &actionMap, PlotFactoryPtr factory)
 Sets the annotate and mode actions and the factory to the given.
void attach (PlotCanvas *canvas)
 Overrides PlotTool::attach().
void detach ()
 Overrides PlotTool::detach().

Private Member Functions

void setDefaults ()
 Sets properties to their defaults.

Private Attributes

PlotFactoryPtr itsFactory_
 Parent.
Mode itsMode_
 Current drawing mode.
QAction * itsAnnotateAction_
 Actions to keep updated.
QMap< Mode, QAction * > itsModeActions_
QMultiMap< PlotCanvas
*, PlotAnnotationPtr > 
itsAText_
 Text annotations.
PlotFontPtr itsTextFont_
 Current text properties.
PlotLinePtr itsTextOutline_
PlotAreaFillPtr itsTextFill_
QMultiMap< PlotCanvas
*, PlotShapeRectanglePtr > 
itsARect_
 Rectangle annotations.
PlotLinePtr itsRectLine_
 Current rectangle properties.
PlotAreaFillPtr itsRectFill_
PlotMSPlotterguiParent

Friends

class PlotMSPlotter

Detailed Description

Subclass of PlotMouseTool for drawing/managing annotations on the plot canvases of PlotMSApp.

Definition at line 44 of file PlotMSAnnotator.h.


Member Enumeration Documentation

Static //.

Drawing mode for the annotator.

Enumerator:
TEXT 
RECTANGLE 

Definition at line 53 of file PlotMSAnnotator.h.


Constructor & Destructor Documentation

casa::PlotMSAnnotator::PlotMSAnnotator ( PlotMSPlotter parent,
Mode  startingMode = TEXT 
)

Non-Static //.

Constructor which takes the PlotMS parent and optional starting mode.

casa::PlotMSAnnotator::~PlotMSAnnotator (  ) 

Destructor.


Member Function Documentation

void casa::PlotMSAnnotator::attach ( PlotCanvas canvas  )  [protected, virtual]

Overrides PlotTool::attach().

Reimplemented from casa::PlotTool.

void casa::PlotMSAnnotator::clearAll ( PlotCanvas canvas = NULL  ) 
void casa::PlotMSAnnotator::clearRectangles ( PlotCanvas canvas = NULL  ) 
void casa::PlotMSAnnotator::clearText ( PlotCanvas canvas = NULL  ) 

Clears all text/rectangle annotations off the given canvas.

If the given canvas is NULL, then it clears them from all canvases.

void casa::PlotMSAnnotator::detach (  )  [protected, virtual]

Overrides PlotTool::detach().

Reimplemented from casa::PlotTool.

Mode casa::PlotMSAnnotator::drawingMode (  )  const

Gets/Sets the current drawing mode.

void casa::PlotMSAnnotator::handleMouseEvent ( const PlotEvent event  )  [virtual]
void casa::PlotMSAnnotator::plotsChanged ( const PlotMSPlotManager manager  )  [virtual]

Implements PlotMSPlotManagerWatcher::plotChanged().

Removes annotations that are attached to canvases that no longer exist.

Implements casa::PlotMSPlotManagerWatcher.

PlotAreaFillPtr casa::PlotMSAnnotator::rectangleAreaFill (  )  const
PlotLinePtr casa::PlotMSAnnotator::rectangleLine (  )  const

Gets/Sets the current rectangle properties (null means default for PlotShapeRectangle object).

Only applies to future rectangle annotations.

void casa::PlotMSAnnotator::setActions ( QAction *  annotateAction,
const QMap< PlotMSAction::Type, QAction * > &  actionMap,
PlotFactoryPtr  factory 
) [protected]

Sets the annotate and mode actions and the factory to the given.

MUST be called before the annotator is used.

void casa::PlotMSAnnotator::setActive ( bool  isActive = true  )  [virtual]

Overrides PlotTool::setActive().

Reimplemented from casa::PlotTool.

void casa::PlotMSAnnotator::setDefaults (  )  [private]

Sets properties to their defaults.

void casa::PlotMSAnnotator::setDrawingMode ( Mode  mode  ) 
void casa::PlotMSAnnotator::setRectangleAreaFill ( const PlotAreaFillPtr  fill  ) 
void casa::PlotMSAnnotator::setRectangleLine ( const PlotLinePtr  line  ) 
void casa::PlotMSAnnotator::setTextBackground ( const PlotAreaFillPtr  background  ) 
void casa::PlotMSAnnotator::setTextFont ( const PlotFontPtr  font  ) 
void casa::PlotMSAnnotator::setTextOutline ( const PlotLinePtr  outline  ) 
PlotAreaFillPtr casa::PlotMSAnnotator::textBackground (  )  const
PlotFontPtr casa::PlotMSAnnotator::textFont (  )  const

Gets/Sets the current text properties (null means default for PlotAnnotation object).

Only applies to future text annotations.

PlotLinePtr casa::PlotMSAnnotator::textOutline (  )  const

Friends And Related Function Documentation

friend class PlotMSPlotter [friend]

Definition at line 47 of file PlotMSAnnotator.h.


Member Data Documentation

Definition at line 166 of file PlotMSAnnotator.h.

Actions to keep updated.

Definition at line 139 of file PlotMSAnnotator.h.

QMultiMap<PlotCanvas*, PlotShapeRectanglePtr> casa::PlotMSAnnotator::itsARect_ [private]

Rectangle annotations.

Definition at line 154 of file PlotMSAnnotator.h.

QMultiMap<PlotCanvas*, PlotAnnotationPtr> casa::PlotMSAnnotator::itsAText_ [private]

Text annotations.

Definition at line 144 of file PlotMSAnnotator.h.

Parent.

PlotMSApp* itsParent_;

Factory for generating plot objects.

Definition at line 132 of file PlotMSAnnotator.h.

Current drawing mode.

Definition at line 135 of file PlotMSAnnotator.h.

QMap<Mode, QAction*> casa::PlotMSAnnotator::itsModeActions_ [private]

Definition at line 140 of file PlotMSAnnotator.h.

Definition at line 159 of file PlotMSAnnotator.h.

Current rectangle properties.

Definition at line 158 of file PlotMSAnnotator.h.

Definition at line 150 of file PlotMSAnnotator.h.

Current text properties.

Definition at line 148 of file PlotMSAnnotator.h.

Definition at line 149 of file PlotMSAnnotator.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1