#include <PlotTool.h>
Public Member Functions | |
| PlotTool (PlotCoordinate::System sys=PlotCoordinate::WORLD) | |
| Constructor which takes which coordinate system events should be processed in. | |
| 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 | ~PlotTool () |
| Destructor. | |
| virtual bool | isActive () const |
| Returns whether this tool is currently active or not. | |
| virtual void | setActive (bool isActive=true) |
| Sets whether this tool is currently active or not. | |
| virtual bool | isBlocking () const |
| Returns whether this tool is blocking or not. | |
| virtual void | setBlocking (bool blocking=true) |
| Sets whether this tool is blocking or not. | |
| virtual PlotAxis | getXAxis () const |
| Gets the axes on which the tool operates. | |
| virtual PlotAxis | getYAxis () const |
| virtual PlotCoordinate::System | getCoordinateSystem () const |
| Gets the coordinate system in which the tool wants to process events. | |
| virtual bool | lastEventWasHandled () const |
| Returns whether the last event was handled or not. | |
| virtual void | reset () |
| Resets any internal state such as history/stacks. | |
Protected Member Functions | |
| virtual PlotCanvas * | canvas () const |
| Returns the canvas this tool is attached to, or NULL for none. | |
| virtual PlotFactory * | factory () const |
| Returns a factory that can be used for generating implementation-specific classes, or NULL for none. | |
| virtual bool | isAttached () const |
| Returns true if this tool is attached to a canvas, false otherwise. | |
| virtual void | attach (PlotCanvas *canvas) |
| Attaches this tool to the given canvas. | |
| virtual void | detach () |
| Detaches this tool from its canvas. | |
Protected Attributes | |
| PlotCanvas * | m_canvas |
| Attached canvas (or NULL for none). | |
| PlotFactory * | m_factory |
| Factory for creating implementation-specific objects. | |
| bool | m_active |
| Whether this tool is active. | |
| bool | m_blocking |
| Whether this tool is blocking. | |
| PlotAxis | m_xAxis |
| The tool axes. | |
| PlotAxis | m_yAxis |
| PlotCoordinate::System | m_coordSystem |
| The tool coordinate system. | |
| bool | m_lastEventHandled |
| Last event handled flag. | |
Friends | |
| class | PlotCanvas |
| class | PlotMouseToolGroup |
Definition at line 63 of file PlotTool.h.
| 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.
| virtual void casa::PlotTool::attach | ( | PlotCanvas * | canvas | ) | [protected, virtual] |
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 [protected, virtual] |
Returns the canvas this tool is attached to, or NULL for none.
| virtual void casa::PlotTool::detach | ( | ) | [protected, virtual] |
Detaches this tool from its canvas.
Reimplemented in casa::PlotSelectTool, and casa::PlotMSAnnotator.
| virtual PlotFactory* casa::PlotTool::factory | ( | ) | const [protected, virtual] |
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 [protected, virtual] |
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 | ( | void | ) | [inline, virtual] |
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.
friend class PlotCanvas [friend] |
Definition at line 64 of file PlotTool.h.
friend class PlotMouseToolGroup [friend] |
Definition at line 65 of file PlotTool.h.
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.
1.6.1