casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
casa::PlotTool Class Reference

#include <PlotTool.h>

Inheritance diagram for casa::PlotTool:
casa::PlotMouseTool casa::PlotMSAnnotator casa::PlotSelectTool

Public Member Functions

 PlotTool (PlotCoordinate::System sys=PlotCoordinate::WORLD)
 Constructor which takes which coordinate system events should be processed in. More...
 
 PlotTool (PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System sys=PlotCoordinate::WORLD)
 Constructor which takes the two axes and the coordinate system which events should be processed in. More...
 
virtual ~PlotTool ()
 Destructor. More...
 
virtual bool isActive () const
 Returns whether this tool is currently active or not. More...
 
virtual void setActive (bool isActive=true)
 Sets whether this tool is currently active or not. More...
 
virtual bool isBlocking () const
 Returns whether this tool is blocking or not. More...
 
virtual void setBlocking (bool blocking=true)
 Sets whether this tool is blocking or not. More...
 
virtual PlotAxis getXAxis () const
 Gets the axes on which the tool operates. More...
 
virtual PlotAxis getYAxis () const
 
virtual PlotCoordinate::System getCoordinateSystem () const
 Gets the coordinate system in which the tool wants to process events. More...
 
virtual bool lastEventWasHandled () const
 Returns whether the last event was handled or not. More...
 
virtual void reset ()
 Resets any internal state such as history/stacks. More...
 

Protected Member Functions

virtual PlotCanvascanvas () const
 Returns the canvas this tool is attached to, or NULL for none. More...
 
virtual PlotFactoryfactory () const
 Returns a factory that can be used for generating implementation-specific classes, or NULL for none. More...
 
virtual bool isAttached () const
 Returns true if this tool is attached to a canvas, false otherwise. More...
 
virtual void attach (PlotCanvas *canvas)
 Attaches this tool to the given canvas. More...
 
virtual void detach ()
 Detaches this tool from its canvas. More...
 

Protected Attributes

PlotCanvasm_canvas
 Attached canvas (or NULL for none). More...
 
PlotFactorym_factory
 Factory for creating implementation-specific objects. More...
 
bool m_active
 Whether this tool is active. More...
 
bool m_blocking
 Whether this tool is blocking. More...
 
PlotAxis m_xAxis
 The tool axes. More...
 
PlotAxis m_yAxis
 
PlotCoordinate::System m_coordSystem
 The tool coordinate system. More...
 
bool m_lastEventHandled
 Last event handled flag. More...
 

Friends

class PlotCanvas
 
class PlotMouseToolGroup
 

Detailed Description

Definition at line 63 of file PlotTool.h.

Constructor & Destructor Documentation

casa::PlotTool::PlotTool ( PlotCoordinate::System  sys = PlotCoordinate::WORLD)

Constructor which takes which coordinate system events should be processed in.

casa::PlotTool::PlotTool ( PlotAxis  xAxis,
PlotAxis  yAxis,
PlotCoordinate::System  sys = PlotCoordinate::WORLD 
)

Constructor which takes the two axes and the coordinate system which events should be processed in.

virtual casa::PlotTool::~PlotTool ( )
virtual

Destructor.

Member Function Documentation

virtual void casa::PlotTool::attach ( PlotCanvas canvas)
protectedvirtual

Attaches this tool to the given canvas.

Detaches from current canvas if necessary.

Reimplemented in casa::PlotSelectTool, and casa::PlotMSAnnotator.

virtual PlotCanvas* casa::PlotTool::canvas ( ) const
protectedvirtual

Returns the canvas this tool is attached to, or NULL for none.

virtual void casa::PlotTool::detach ( )
protectedvirtual

Detaches this tool from its canvas.

Reimplemented in casa::PlotSelectTool, and casa::PlotMSAnnotator.

virtual PlotFactory* casa::PlotTool::factory ( ) const
protectedvirtual

Returns a factory that can be used for generating implementation-specific classes, or NULL for none.

virtual PlotCoordinate::System casa::PlotTool::getCoordinateSystem ( ) const
virtual

Gets the coordinate system in which the tool wants to process events.

Events passed to this tool should use this coordinate system.

virtual PlotAxis casa::PlotTool::getXAxis ( ) const
virtual

Gets the axes on which the tool operates.

virtual PlotAxis casa::PlotTool::getYAxis ( ) const
virtual
virtual bool casa::PlotTool::isActive ( ) const
virtual

Returns whether this tool is currently active or not.

virtual bool casa::PlotTool::isAttached ( ) const
protectedvirtual

Returns true if this tool is attached to a canvas, false otherwise.

virtual bool casa::PlotTool::isBlocking ( ) const
virtual

Returns whether this tool is blocking or not.

When a PlotCanvas encounters a blocking tool, it is expected to not send events to any other handlers further in the chain.

virtual bool casa::PlotTool::lastEventWasHandled ( ) const
virtual

Returns whether the last event was handled or not.

Mostly used for blocking tools so that unused events can be passed along.

virtual void casa::PlotTool::reset ( )
inlinevirtual

Resets any internal state such as history/stacks.

Should be called by the PlotCanvas when the state of the canvases changes (axes ranges, adding/deleting items, etc.) and would thus invalidate tool states.

Definition at line 112 of file PlotTool.h.

virtual void casa::PlotTool::setActive ( bool  isActive = true)
virtual

Sets whether this tool is currently active or not.

Reimplemented in casa::PlotSelectTool, and casa::PlotMSAnnotator.

virtual void casa::PlotTool::setBlocking ( bool  blocking = true)
virtual

Sets whether this tool is blocking or not.

Friends And Related Function Documentation

friend class PlotCanvas
friend

Definition at line 64 of file PlotTool.h.

friend class PlotMouseToolGroup
friend

Definition at line 65 of file PlotTool.h.

Member Data Documentation

bool casa::PlotTool::m_active
protected

Whether this tool is active.

Definition at line 124 of file PlotTool.h.

bool casa::PlotTool::m_blocking
protected

Whether this tool is blocking.

Definition at line 127 of file PlotTool.h.

PlotCanvas* casa::PlotTool::m_canvas
protected

Attached canvas (or NULL for none).

Definition at line 118 of file PlotTool.h.

PlotCoordinate::System casa::PlotTool::m_coordSystem
protected

The tool coordinate system.

Definition at line 133 of file PlotTool.h.

PlotFactory* casa::PlotTool::m_factory
protected

Factory for creating implementation-specific objects.

Definition at line 121 of file PlotTool.h.

bool casa::PlotTool::m_lastEventHandled
protected

Last event handled flag.

Definition at line 136 of file PlotTool.h.

PlotAxis casa::PlotTool::m_xAxis
protected

The tool axes.

Definition at line 130 of file PlotTool.h.

PlotAxis casa::PlotTool::m_yAxis
protected

Definition at line 130 of file PlotTool.h.


The documentation for this class was generated from the following file: