casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
casa::MWCPTRegion Class Reference

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

#include <MWCPTRegion.h>

Inheritance diagram for casa::MWCPTRegion:
casa::MWCPolyTool casa::MultiWCTool casa::DTVisible casa::DisplayTool casa::WCPositionEH casa::WCMotionEH casa::WCRefreshEH casa::DisplayEH casa::QtOldPTRegion casa::QtOldPolyTool

List of all members.

Public Member Functions

 MWCPTRegion (Display::KeySym keysym=Display::K_Pointer_Button3)
 Constructor.
virtual ~MWCPTRegion ()
 Destructor.

Protected Member Functions

virtual void doubleInside ()
 Handle double-click inside the polygon.
virtual void regionReady ()
 This function is called when a region is deliberately "finished" by the user.
void getWorldCoords (Vector< Double > &x, Vector< Double > &y)
 get the world coords of the current polygon region
void getLinearCoords (Vector< Double > &x, Vector< Double > &y)
 get the linear coords of the current ploygon region

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. 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 79 of file MWCPTRegion.h.


Constructor & Destructor Documentation

Constructor.

virtual casa::MWCPTRegion::~MWCPTRegion ( ) [virtual]

Destructor.


Member Function Documentation

virtual void casa::MWCPTRegion::doubleInside ( ) [protected, virtual]

Handle double-click inside the polygon.

Invokes regionReady().

Reimplemented from casa::MWCPolyTool.

void casa::MWCPTRegion::getLinearCoords ( Vector< Double > &  x,
Vector< Double > &  y 
) [protected]

get the linear coords of the current ploygon region

void casa::MWCPTRegion::getWorldCoords ( Vector< Double > &  x,
Vector< Double > &  y 
) [protected]

get the world coords of the current polygon region

virtual void casa::MWCPTRegion::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::QtOldPTRegion.

Definition at line 97 of file MWCPTRegion.h.


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