casa
$Rev:20696$
|
Subclass of PlotMouseTool for drawing/managing annotations on the plot canvases of PlotMSApp. More...
#include <PlotMSAnnotator.h>
Public Types | |
enum | Mode { TEXT, RECTANGLE } |
Static //. More... | |
Public Member Functions | |
PlotMSAnnotator (PlotMSApp *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 | |
PlotMSApp * | itsParent_ |
Parent. | |
PlotFactoryPtr | itsFactory_ |
Factory for generating plot objects. | |
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_ |
Friends | |
class | PlotMSPlotter |
Subclass of PlotMouseTool for drawing/managing annotations on the plot canvases of PlotMSApp.
Definition at line 46 of file PlotMSAnnotator.h.
casa::PlotMSAnnotator::PlotMSAnnotator | ( | PlotMSApp * | parent, |
Mode | startingMode = TEXT |
||
) |
Non-Static //.
Constructor which takes the PlotMS parent and optional starting mode.
Destructor.
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] |
Implements PlotMouseTool::handleMouseEvent().
Implements casa::PlotMouseTool.
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.
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 | ) |
PlotFontPtr casa::PlotMSAnnotator::textFont | ( | ) | const |
Gets/Sets the current text properties (null means default for PlotAnnotation object).
Only applies to future text annotations.
friend class PlotMSPlotter [friend] |
Definition at line 49 of file PlotMSAnnotator.h.
QAction* casa::PlotMSAnnotator::itsAnnotateAction_ [private] |
Actions to keep updated.
Definition at line 141 of file PlotMSAnnotator.h.
QMultiMap<PlotCanvas*, PlotShapeRectanglePtr> casa::PlotMSAnnotator::itsARect_ [private] |
Rectangle annotations.
Definition at line 156 of file PlotMSAnnotator.h.
QMultiMap<PlotCanvas*, PlotAnnotationPtr> casa::PlotMSAnnotator::itsAText_ [private] |
Text annotations.
Definition at line 146 of file PlotMSAnnotator.h.
Factory for generating plot objects.
Definition at line 134 of file PlotMSAnnotator.h.
Mode casa::PlotMSAnnotator::itsMode_ [private] |
Current drawing mode.
Definition at line 137 of file PlotMSAnnotator.h.
QMap<Mode, QAction*> casa::PlotMSAnnotator::itsModeActions_ [private] |
Definition at line 142 of file PlotMSAnnotator.h.
PlotMSApp* casa::PlotMSAnnotator::itsParent_ [private] |
Parent.
Definition at line 131 of file PlotMSAnnotator.h.
Definition at line 161 of file PlotMSAnnotator.h.
Current rectangle properties.
Definition at line 160 of file PlotMSAnnotator.h.
Definition at line 152 of file PlotMSAnnotator.h.
Current text properties.
Definition at line 150 of file PlotMSAnnotator.h.
Definition at line 151 of file PlotMSAnnotator.h.