casa
5.7.0-16
|
Multi WorldCanvas event-based zoomer. More...
#include <MWCRTZoomer.h>
Public Member Functions | |
MWCRTZoomer (Display::KeySym keysym=Display::K_Pointer_Button1) | |
Constructor. More... | |
virtual | ~MWCRTZoomer () |
Destructor. More... | |
virtual void | unzoom () |
This function resets the zoom. More... | |
virtual void | zoom (const casacore::Vector< casacore::Double > &linBlc, const casacore::Vector< casacore::Double > &linTrc) |
This function zooms with a given blc,trc. More... | |
virtual void | zoomIn (casacore::Double factor=2.) |
zoom in/out by given factor More... | |
virtual void | zoomOut (casacore::Double factor=2.) |
Public Member Functions inherited from casa::MWCRectTool | |
MWCRectTool (Display::KeySym keysym=Display::K_Pointer_Button1, const casacore::Bool persistent=false) | |
Constructor. More... | |
virtual | ~MWCRectTool () |
Destructor. More... | |
virtual void | disable () |
Switch the tool off - this erases the rectangle, if any, and calls the base class disable. More... | |
virtual void | reset (casacore::Bool skipRefresh=false) |
reset to non-existent, non-active rectangle. More... | |
virtual casacore::Bool | rectangleDefined () |
Is a rectangle currently defined? More... | |
Public Member Functions inherited from casa::MultiWCTool | |
MultiWCTool (const Display::KeySym &keysym=Display::K_Pointer_Button1, bool enable_events=true) | |
Constructor taking the primary key to which this tool will respond. More... | |
virtual | ~MultiWCTool () |
Destructor. More... | |
virtual void | addWorldCanvas (WorldCanvas &worldcanvas) |
Add/remove a WorldCanvas from the control of this tool. More... | |
virtual void | removeWorldCanvas (WorldCanvas &worldcanvas) |
virtual void | addWorldCanvases (PanelDisplay *pdisp) |
Add/Remove a list of WorldCanvases from PanelDisplay. More... | |
virtual void | removeWorldCanvases (PanelDisplay *pdisp) |
virtual void | enable () |
Switch the tool on/off - this simply registers or unregisters the event handlers on the WorldCanvases. More... | |
virtual void | operator() (const WCPositionEvent &ev) |
Required operators for event handling - these are called when events occur, and distribute the events to the "user-level" methods. More... | |
virtual void | operator() (const WCMotionEvent &ev) |
default sends event to cout More... | |
virtual void | operator() (const WCRefreshEvent &ev) |
original handler interface (still used for WCRefreshEvents) More... | |
Public Member Functions inherited from casa::DisplayTool | |
virtual | ~DisplayTool () |
Destructor. More... | |
virtual void | setKey (const Display::KeySym &keysym) |
Set/get which key to catch. More... | |
virtual Display::KeySym | getKey () const |
Public Member Functions inherited from casa::WCPositionEH | |
WCPositionEH () | |
Default Constructor Required. More... | |
virtual | ~WCPositionEH () |
Destructor. More... | |
Public Member Functions inherited from casa::WCMotionEH | |
WCMotionEH () | |
Default Constructor Required. More... | |
virtual | ~WCMotionEH () |
Destructor. More... | |
Public Member Functions inherited from casa::WCRefreshEH | |
WCRefreshEH () | |
Default Constructor Required. More... | |
virtual | ~WCRefreshEH () |
Destructor. More... | |
Public Member Functions inherited from casa::DisplayEH | |
virtual void | handleEvent (DisplayEvent &) |
Classes that contain this interface (i.e., derive from it) can override this method to implement actions for whatever types of DisplayEvent they're interested in. More... | |
virtual | ~DisplayEH () |
Public Member Functions inherited from casa::DTVisible | |
DTVisible () | |
Default constructor. More... | |
virtual | ~DTVisible () |
Destructor. More... | |
virtual casacore::String | drawColor () const |
Return the color to use. More... | |
virtual casacore::Int | lineWidth () const |
Return the line width to use. More... | |
virtual casacore::Double | doubleClickInterval () const |
Return the double click interval (in seconds). More... | |
Protected Member Functions | |
virtual void | doubleInside () |
Handle double-click inside or outside the rectangle; called by the base class when these events occur. More... | |
virtual void | doubleOutside () |
virtual void | zoomed (const casacore::Vector< casacore::Double > &linBlc, const casacore::Vector< casacore::Double > &linTrc) |
This function is called when a zoom occurs. More... | |
Protected Member Functions inherited from casa::MWCRectTool | |
virtual void | keyPressed (const WCPositionEvent &) |
Functions called by the base class event handling operators–and normally only those. More... | |
virtual void | keyReleased (const WCPositionEvent &) |
virtual void | otherKeyPressed (const WCPositionEvent &) |
virtual void | moved (const WCMotionEvent &, const viewer::region::region_list_type &) |
virtual void | draw (const WCRefreshEvent &, const viewer::region::region_list_type &) |
draw the rectangle (if any) on the object's currently active WC. More... | |
virtual void | rectangleReady () |
Called when a rectangle is ready and not being edited. More... | |
virtual void | get (casacore::Int &x1, casacore::Int &y1, casacore::Int &x2, casacore::Int &y2) const |
Retrieve the rectangle coordinates, in screen pixels. More... | |
Protected Member Functions inherited from casa::MultiWCTool | |
virtual void | otherKeyReleased (const WCPositionEvent &) |
virtual void | updateRegion () |
virtual void | clicked (casacore::Int, casacore::Int) |
virtual void | doubleClicked (casacore::Int, casacore::Int) |
virtual void | refresh () |
Copy back-to-front buffer (erasing all MWCTool drawings), then cause this (and all MWCTools on current WC's PC) to draw (or not draw) themselves, according to their current state. More... | |
virtual void | setClipToDrawArea () |
Cause subsequent drawing commands to be clipped to the current WC (or its drawing area). More... | |
virtual void | setClipToWC () |
virtual void | resetClip () |
Protected Member Functions inherited from casa::DisplayTool | |
DisplayTool (const Display::KeySym &keysym=Display::K_Pointer_Button1) | |
Constructor taking a key to which this tool will initially be attached, typically one of the pointer buttons. More... | |
DisplayTool (const DisplayTool &other) | |
Copy constructor - construct a new DisplayTool from other , using copy semantics. More... | |
DisplayTool & | operator= (const DisplayTool &other) |
Copy assignment using copy semantics. More... | |
Display::KeyModifier | keyModifiers () |
Return the modifier mask. More... | |
Protected Member Functions inherited from casa::DTVisible | |
DTVisible (const DTVisible &other) | |
(Required) copy constructor. More... | |
DTVisible & | operator= (const DTVisible &other) |
(Required) copy assignment. More... | |
Private Member Functions | |
void | getLinearCoords (casacore::Vector< casacore::Double > &blc, casacore::Vector< casacore::Double > &trc) |
get the linear coords of the current zoom box More... | |
Additional Inherited Members | |
Protected Attributes inherited from casa::MultiWCTool | |
WorldCanvas * | itsCurrentWC |
WC being (or to be) drawn on (may be 0 initially). More... | |
Multi WorldCanvas event-based zoomer.
Public interface
<prerequisites> WCRectTool </prerequisites>
MWCRTZoomer stands for WorldCanvas Rectangling Tool Zoomer
This class finalises the functionality in WCRectTool to implement event-based zooming on a WorldCanvas. casacore::Double clicking inside the constructed rectangle results in zooming in; double clicking outside the rectangle gives zooming out.
Zooming is an essential tool for interacting with data displays.
Definition at line 72 of file MWCRTZoomer.h.
casa::MWCRTZoomer::MWCRTZoomer | ( | Display::KeySym | keysym = Display::K_Pointer_Button1 | ) |
Constructor.
|
virtual |
Destructor.
|
protectedvirtual |
Handle double-click inside or outside the rectangle; called by
the base class when these events occur.
They execute zoom-in/zoom-out on the tool's active WC's (which should all have indentical linear coordinates for their draw areas–they certainly will have, after a zoom). Then the routines invoke the zoomed() callback, below.
Reimplemented from casa::MWCRectTool.
|
protectedvirtual |
Reimplemented from casa::MWCRectTool.
|
private |
get the linear coords of the current zoom box
|
virtual |
This function resets the zoom.
Referenced by casa::QtDisplayPanel::unzoom().
|
virtual |
This function zooms with a given blc,trc.
Referenced by casa::QtDisplayPanel::zoom().
|
protectedvirtual |
This function is called when a zoom occurs.
It is supplied with the linear coords of the new zoom box, and thus can be implemented to do further actions, such as reporting the new zoom box to the application
|
virtual |
zoom in/out by given factor
Referenced by casa::QtDisplayPanel::zoomIn().
|
virtual |
Referenced by casa::QtDisplayPanel::zoomOut().