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

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

#include <WCPTRegion.h>

Inheritance diagram for casa::WCPTRegion:
casa::WCPolyTool casa::WCTool casa::DTVisible casa::DisplayTool

Public Member Functions

 WCPTRegion (WorldCanvas *wcanvas, Display::KeySym keysym=Display::K_Pointer_Button1)
 Constructor. More...
 
virtual ~WCPTRegion ()
 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 functio is called when a region is deliberately "finished" by the user. More...
 
- Public Member Functions inherited from casa::WCPolyTool
 WCPolyTool (WorldCanvas *wcanvas, Display::KeySym keysym=Display::K_Pointer_Button1, const casacore::Bool persistent=false)
 Constructor. More...
 
virtual ~WCPolyTool ()
 Destructor. More...
 
virtual void disable ()
 Switch the tool off - this calls the base class disable, and then erases the polygon 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 polygon. 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 polygonReady ()
 Functions called when a polygon is ready and not being editted, and when this status changes. More...
 
virtual void polygonNotReady ()
 
virtual void get (casacore::Vector< casacore::Int > &x, casacore::Vector< casacore::Int > &y)
 Retrive the polygon vertices. 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...
 

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 polygon region drawer.

Intended use:

Public interface

Review Status

<prerequisites> WCRectTool </prerequisites>

Etymology

WCPTRegion stands for WorldCanvas Polygon Tool Region

Synopsis

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

Example

Motivation

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

To Do

Definition at line 78 of file WCPTRegion.h.

Constructor & Destructor Documentation

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

Constructor.

virtual casa::WCPTRegion::~WCPTRegion ( )
virtual

Destructor.

Member Function Documentation

virtual void casa::WCPTRegion::doubleInside ( )
virtual

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

Reimplemented from casa::WCPolyTool.

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

This functio 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 WCPTRegion.h.


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