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

WorldCanvas event-based rectangle region drawer. More...

#include <WCRTRegion.h>

Inheritance diagram for casa::WCRTRegion:
casa::WCRectTool casa::WCTool casa::DTVisible casa::DisplayTool

Public Member Functions

 WCRTRegion (WorldCanvas *wcanvas, Display::KeySym keysym=Display::K_Pointer_Button1)
 Constructor. More...
 
virtual ~WCRTRegion ()
 Destructor. More...
 
virtual void doubleInside ()
 Functions specific to the region drawing - these are called by lower-level event handlers in the base classes. More...
 
virtual void regionReady ()
 This function is called when a region is deliberately "finished" by the user. More...
 
- Public Member Functions inherited from casa::WCRectTool
 WCRectTool (WorldCanvas *wcanvas, Display::KeySym keysym=Display::K_Pointer_Button1, const casacore::Bool persistent=false)
 Constructor. More...
 
virtual ~WCRectTool ()
 Destructor. More...
 
virtual void disable ()
 Switch the tool off - this calls the base class disable, and then erases the rectangle if it's around. More...
 
virtual void keyPressed (const WCPositionEvent &ev)
 Functions called by the local event handling operators - these handle the drawing of the rectangle. More...
 
virtual void keyReleased (const WCPositionEvent &ev)
 
virtual void otherKeyPressed (const WCPositionEvent &ev)
 
virtual void moved (const WCMotionEvent &ev, const viewer::region::region_list_type &)
 
virtual void refresh (const WCRefreshEvent &ev)
 
virtual void doubleOutside ()
 
virtual void rectangleReady ()
 Functions called when a rectangle is ready and not being editted, and when this status changes. More...
 
virtual void rectangleNotReady ()
 
virtual void get (casacore::Int &x1, casacore::Int &y1, casacore::Int &x2, casacore::Int &y2) const
 Retrieve the rectangle corners. More...
 
- Public Member Functions inherited from casa::WCTool
 WCTool (WorldCanvas *wcanvas, const Display::KeySym &keysym=Display::K_Pointer_Button1)
 Constructor taking a pointer to a WorldCanvas to which this tool will attach, and a primary key to respond to. More...
 
virtual ~WCTool ()
 Destructor. More...
 
virtual void enable ()
 Switch the tool on/off - this simply registers or unregisters the event handlers. More...
 
virtual void operator() (const WCPositionEvent &ev)
 Required operators for event handling - these are called when an events occur, and distribute the events to the "user-level" methods. More...
 
virtual void operator() (const WCMotionEvent &ev)
 
virtual void operator() (const WCRefreshEvent &ev)
 
virtual void otherKeyReleased (const WCPositionEvent &)
 
virtual WorldCanvasworldCanvas () const
 Get the WorldCanvas that this Tool is attached to. More...
 
virtual PixelCanvaspixelCanvas () const
 Get the PixelCanvas that this Tool is attached to via its WorldCanvas. 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::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...
 

Private Member Functions

void getLinearCoords (casacore::Vector< casacore::Double > &blc, casacore::Vector< casacore::Double > &trc)
 get the linear coords of the current rectangular region More...
 

Additional Inherited Members

- Protected Member Functions inherited from casa::WCTool
 WCTool ()
 (Required) default constructor. More...
 
 WCTool (const WCTool &other)
 (Required) copy constructor. More...
 
WCTooloperator= (const WCTool &other)
 (Required) copy assignment. More...
 
- 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...
 
DisplayTooloperator= (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...
 
DTVisibleoperator= (const DTVisible &other)
 (Required) copy assignment. More...
 

Detailed Description

WorldCanvas event-based rectangle region drawer.

Intended use:

Public interface

Review Status

<prerequisites> WCRectTool </prerequisites>

Etymology

WCRTRegion stands for WorldCanvas Rectangle Tool Region

Synopsis

This class finalises the functionality in WCRectTool to implement event-based drawing of rectangular regions on a WorldCanvas. casacore::Double clicking inside the constructed rectangle emits the region, whilst pressing Escape cancels the region.

Example

Motivation

Rectangular regions are the most common regions, and constructing them visually can be very efficient.

To Do

Definition at line 78 of file WCRTRegion.h.

Constructor & Destructor Documentation

casa::WCRTRegion::WCRTRegion ( WorldCanvas wcanvas,
Display::KeySym  keysym = Display::K_Pointer_Button1 
)

Constructor.

virtual casa::WCRTRegion::~WCRTRegion ( )
virtual

Destructor.

Member Function Documentation

virtual void casa::WCRTRegion::doubleInside ( )
virtual

Functions specific to the region drawing - these are called by lower-level event handlers in the base classes.

Reimplemented from casa::WCRectTool.

void casa::WCRTRegion::getLinearCoords ( casacore::Vector< casacore::Double > &  blc,
casacore::Vector< casacore::Double > &  trc 
)
private

get the linear coords of the current rectangular region

virtual void casa::WCRTRegion::regionReady ( )
inlinevirtual

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

Definition at line 96 of file WCRTRegion.h.


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