casa
$Rev:20696$
|
A PlotSelectTool is a concrete subclass of PlotMouseTool that mainly handles select events. More...
#include <PlotTool.h>
Public Member Functions | |
PlotSelectTool (PlotCoordinate::System system=PlotCoordinate::WORLD) | |
Constructor which takes the tool's coordinate system. | |
PlotSelectTool (PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System system=PlotCoordinate::WORLD) | |
Constructor which takes the tool's axes and coordinate system. | |
virtual | ~PlotSelectTool () |
Destructor. | |
virtual void | addNotifier (PlotSelectToolNotifier *notifier) |
Adds the given notifier. | |
virtual void | setSelectLine (PlotLinePtr line) |
Sets the selection line to the given. | |
virtual void | setSubtractLine (PlotLinePtr line) |
virtual void | setSelectLine (bool on=true) |
virtual void | setDrawRects (bool on=true) |
Sets the attributes for drawing selected regions. | |
virtual void | setRectLine (PlotLinePtr line) |
virtual void | setRectFill (PlotAreaFillPtr fill) |
virtual unsigned int | numSelectedRects () const |
Selected regions. | |
virtual void | getSelectedRects (vector< double > &upperLeftXs, vector< double > &upperLeftYs, vector< double > &lowerRightXs, vector< double > &lowerRightYs, PlotCoordinate::System system=PlotCoordinate::WORLD) const |
virtual vector< PlotRegion > | getSelectedRects (PlotCoordinate::System system=PlotCoordinate::WORLD) const |
virtual void | clearSelectedRects () |
virtual void | setActive (bool active=true) |
Overrides PlotTool::setActive(). | |
virtual void | handleMouseEvent (const PlotEvent &event) |
Implements PlotMouseTool::handleMouseEvent(). | |
bool | inSubtractionMode () |
Public Attributes | |
bool | m_subtraction_mode |
Protected Member Functions | |
virtual void | attach (PlotCanvas *canvas) |
Overrides PlotTool::attach(). | |
virtual void | detach () |
Overrides PlotTool::detach(). | |
Protected Attributes | |
vector< PlotSelectToolNotifier * > | m_notifiers |
Notifiers. | |
PlotLinePtr | m_selLine |
Copy of selection line to set on the canvas, or NULL if none has been set. | |
PlotLinePtr | m_subLine |
bool | m_drawRects |
Whether or not to draw selected regions on the canvas. | |
PlotLinePtr | m_rectLine |
Line for drawing selected regions, or NULL if none has been set. | |
PlotAreaFillPtr | m_rectFill |
Area fill for drawing selected regions, or NULL if none has been set. | |
vector< PlotShapeRectanglePtr > | m_rects |
Selected regions. |
A PlotSelectTool is a concrete subclass of PlotMouseTool that mainly handles select events.
Note that plotting implementations may wish to override this class with an implementation-specific version that may be more efficient. PlotSelectTool is responsible for: 1) managing the select line (the line show while the user is click-dragging to select a region on the canvas) and cursors, 2) keeping track of selected regions, 3) showing/hiding the regions on the canvas, and 4) notifying any interested classes whenever the selected regions changes.
Definition at line 254 of file PlotTool.h.
casa::PlotSelectTool::PlotSelectTool | ( | PlotCoordinate::System | system = PlotCoordinate::WORLD | ) |
Constructor which takes the tool's coordinate system.
casa::PlotSelectTool::PlotSelectTool | ( | PlotAxis | xAxis, |
PlotAxis | yAxis, | ||
PlotCoordinate::System | system = PlotCoordinate::WORLD |
||
) |
Constructor which takes the tool's axes and coordinate system.
virtual casa::PlotSelectTool::~PlotSelectTool | ( | ) | [virtual] |
Destructor.
virtual void casa::PlotSelectTool::addNotifier | ( | PlotSelectToolNotifier * | notifier | ) | [virtual] |
Adds the given notifier.
This object will be notified when the list of selected regions changes (either by adding one from the mouse, or clearing them).
virtual void casa::PlotSelectTool::attach | ( | PlotCanvas * | canvas | ) | [protected, virtual] |
Overrides PlotTool::attach().
Reimplemented from casa::PlotTool.
virtual void casa::PlotSelectTool::clearSelectedRects | ( | ) | [virtual] |
virtual void casa::PlotSelectTool::detach | ( | ) | [protected, virtual] |
Overrides PlotTool::detach().
Reimplemented from casa::PlotTool.
virtual void casa::PlotSelectTool::getSelectedRects | ( | vector< double > & | upperLeftXs, |
vector< double > & | upperLeftYs, | ||
vector< double > & | lowerRightXs, | ||
vector< double > & | lowerRightYs, | ||
PlotCoordinate::System | system = PlotCoordinate::WORLD |
||
) | const [virtual] |
virtual vector<PlotRegion> casa::PlotSelectTool::getSelectedRects | ( | PlotCoordinate::System | system = PlotCoordinate::WORLD | ) | const [virtual] |
virtual void casa::PlotSelectTool::handleMouseEvent | ( | const PlotEvent & | event | ) | [virtual] |
Implements PlotMouseTool::handleMouseEvent().
Implements casa::PlotMouseTool.
bool casa::PlotSelectTool::inSubtractionMode | ( | ) | [inline] |
Definition at line 305 of file PlotTool.h.
References m_subtraction_mode.
virtual unsigned int casa::PlotSelectTool::numSelectedRects | ( | ) | const [virtual] |
Selected regions.
virtual void casa::PlotSelectTool::setActive | ( | bool | active = true | ) | [virtual] |
Overrides PlotTool::setActive().
Reimplemented from casa::PlotTool.
virtual void casa::PlotSelectTool::setDrawRects | ( | bool | on = true | ) | [virtual] |
Sets the attributes for drawing selected regions.
virtual void casa::PlotSelectTool::setRectFill | ( | PlotAreaFillPtr | fill | ) | [virtual] |
virtual void casa::PlotSelectTool::setRectLine | ( | PlotLinePtr | line | ) | [virtual] |
virtual void casa::PlotSelectTool::setSelectLine | ( | PlotLinePtr | line | ) | [virtual] |
Sets the selection line to the given.
virtual void casa::PlotSelectTool::setSelectLine | ( | bool | on = true | ) | [virtual] |
virtual void casa::PlotSelectTool::setSubtractLine | ( | PlotLinePtr | line | ) | [virtual] |
bool casa::PlotSelectTool::m_drawRects [protected] |
Whether or not to draw selected regions on the canvas.
Definition at line 322 of file PlotTool.h.
vector<PlotSelectToolNotifier*> casa::PlotSelectTool::m_notifiers [protected] |
Notifiers.
Definition at line 314 of file PlotTool.h.
PlotAreaFillPtr casa::PlotSelectTool::m_rectFill [protected] |
Area fill for drawing selected regions, or NULL if none has been set.
Definition at line 328 of file PlotTool.h.
PlotLinePtr casa::PlotSelectTool::m_rectLine [protected] |
Line for drawing selected regions, or NULL if none has been set.
Definition at line 325 of file PlotTool.h.
vector<PlotShapeRectanglePtr> casa::PlotSelectTool::m_rects [protected] |
Selected regions.
Definition at line 331 of file PlotTool.h.
PlotLinePtr casa::PlotSelectTool::m_selLine [protected] |
Copy of selection line to set on the canvas, or NULL if none has been set.
Definition at line 318 of file PlotTool.h.
PlotLinePtr casa::PlotSelectTool::m_subLine [protected] |
Definition at line 319 of file PlotTool.h.
Definition at line 309 of file PlotTool.h.
Referenced by inSubtractionMode().