casa
$Rev:20696$
|
WorldCanvas event-based ellipse region drawer. More...
#include <MultiEllipseToolImpl.h>
Public Member Functions | |
MultiEllipseToolImpl (viewer::RegionSourceFactory *rf, PanelDisplay *pd, Display::KeySym keysym=Display::K_Pointer_Button2) | |
Constructor. | |
virtual | ~MultiEllipseToolImpl () |
Destructor. | |
virtual void | handleEvent (DisplayEvent &ev) |
handle events, via new-style interface. | |
Protected Member Functions | |
virtual void | doubleInside () |
Handle double-click inside the ellipse. | |
virtual void | regionReady () |
This function is called when a region is deliberately "finished" by the user. | |
void | getWorldCoords (Vector< Double > &blc, Vector< Double > &trc) |
get the world coords of the current elliptical region | |
void | getLinearCoords (Vector< Double > &blc, Vector< Double > &trc) |
get the linear coords of the current elliptical region |
WorldCanvas event-based ellipse region drawer.
Public interface
<prerequisites> MWCEllipseTool </prerequisites>
MultiEllipseToolImpl stands for MultiWorldCanvas Ellipse Tool Region
Why this "finalization" is required is beyond me... i.e. why not roll this functionality into the parent class??
This class finalises the functionality in MWCEllipseTool to implement event-based drawing of elliptical regions on a WorldCanvas. Double clicking inside the constructed ellipse emits the region, whilst pressing Escape cancels the region.
Elliptical regions are the most common regions, and constructing them visually can be very efficient.
Definition at line 83 of file MultiEllipseToolImpl.h.
casa::MultiEllipseToolImpl::MultiEllipseToolImpl | ( | viewer::RegionSourceFactory * | rf, |
PanelDisplay * | pd, | ||
Display::KeySym | keysym = Display::K_Pointer_Button2 |
||
) |
Constructor.
virtual casa::MultiEllipseToolImpl::~MultiEllipseToolImpl | ( | ) | [virtual] |
Destructor.
virtual void casa::MultiEllipseToolImpl::doubleInside | ( | ) | [protected, virtual] |
Handle double-click inside the ellipse.
Invokes regionReady().
Reimplemented from casa::MultiRectTool.
void casa::MultiEllipseToolImpl::getLinearCoords | ( | Vector< Double > & | blc, |
Vector< Double > & | trc | ||
) | [protected] |
get the linear coords of the current elliptical region
void casa::MultiEllipseToolImpl::getWorldCoords | ( | Vector< Double > & | blc, |
Vector< Double > & | trc | ||
) | [protected] |
get the world coords of the current elliptical region
virtual void casa::MultiEllipseToolImpl::handleEvent | ( | DisplayEvent & | ev | ) | [virtual] |
handle events, via new-style interface.
Currently just for reset event.
Reimplemented from casa::DisplayEH.
virtual void casa::MultiEllipseToolImpl::regionReady | ( | ) | [inline, protected, virtual] |
This function is called when a region is deliberately "finished" by the user.
It can be implemented to do further actions, such as report the region to the application
Reimplemented in casa::QtELRegion.
Definition at line 104 of file MultiEllipseToolImpl.h.