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

#include <QtOldMouseTools.qo.h>

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

Signals

void mouseRegionReady (casacore::Record mouseRegion, WorldCanvasHolder *)
 See regionReady() implementation for format of the record. More...
 
void echoClicked (casacore::Record)
 

Public Member Functions

 QtOldPTRegion (PanelDisplay *pd)
 
 ~QtOldPTRegion ()
 
bool getMouseRegion (casacore::Record &mouseRegion, WorldCanvasHolder *&wch)
 Retrieve the current polygon mouse region record and WCH, if any. More...
 
- Public Member Functions inherited from casa::QtOldMouseTool
 QtOldMouseTool ()
 
 ~QtOldMouseTool ()
 
- Public Member Functions inherited from casa::MWCPTRegion
 MWCPTRegion (Display::KeySym keysym=Display::K_Pointer_Button3)
 Constructor. More...
 
virtual ~MWCPTRegion ()
 Destructor. More...
 
- Public Member Functions inherited from casa::MWCPolyTool
 MWCPolyTool (Display::KeySym keysym=Display::K_Pointer_Button1, const casacore::Bool persistent=false)
 Constructor. More...
 
virtual ~MWCPolyTool ()
 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 reset (casacore::Bool skipRefresh=false)
 reset to non-existent, non-active polygon. More...
 
virtual casacore::Bool polygonDefined ()
 Is a polygon 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 regionReady ()
 This callback is invoked by the base when the user double-clicks inside a polygon defined previously (but see also polygonReady(), below). More...
 
virtual void clicked (int x, int y)
 
virtual void doubleClicked (int x, int y)
 
virtual void polygonReady ()
 virtual void handleEvent(DisplayEvent& ev); virtual void keyPressed(const WCPositionEvent &ev); More...
 
- Protected Member Functions inherited from casa::MWCPTRegion
virtual void doubleInside ()
 Handle double-click inside the polygon. More...
 
void getWorldCoords (casacore::Vector< casacore::Double > &x, casacore::Vector< casacore::Double > &y)
 get the world coords of the current polygon region More...
 
void getLinearCoords (casacore::Vector< casacore::Double > &x, casacore::Vector< casacore::Double > &y)
 get the linear coords of the current ploygon region More...
 
- Protected Member Functions inherited from casa::MWCPolyTool
virtual void keyPressed (const WCPositionEvent &)
 Functions called by the base class event handling operators–and normally only those. More...
 
virtual void moved (const WCMotionEvent &, const viewer::region::region_list_type &)
 
virtual void keyReleased (const WCPositionEvent &)
 
virtual void otherKeyPressed (const WCPositionEvent &)
 
virtual void draw (const WCRefreshEvent &, const viewer::region::region_list_type &)
 draw the polygon (if any) on the object's currently active WC. More...
 
virtual void doubleOutside ()
 
virtual void get (casacore::Vector< casacore::Int > &x, casacore::Vector< casacore::Int > &y) const
 Retrieve polygon vertices, or a single vertex, in screen pixels. More...
 
virtual void get (casacore::Int &x, casacore::Int &y, const casacore::Int pt) const
 
- Protected Member Functions inherited from casa::MultiWCTool
virtual void otherKeyReleased (const WCPositionEvent &)
 
virtual void updateRegion ()
 
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...
 
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...
 

Protected Attributes

PanelDisplaypd_
 
- Protected Attributes inherited from casa::MultiWCTool
WorldCanvasitsCurrentWC
 WC being (or to be) drawn on (may be 0 initially). More...
 

Detailed Description

Synopsis

QtOldPTRegion is the Polygon Region mouse tool that sends a signal when a new polygon is ready.

Definition at line 160 of file QtOldMouseTools.qo.h.

Constructor & Destructor Documentation

casa::QtOldPTRegion::QtOldPTRegion ( PanelDisplay pd)
inline

Definition at line 168 of file QtOldMouseTools.qo.h.

casa::QtOldPTRegion::~QtOldPTRegion ( )
inline

Definition at line 170 of file QtOldMouseTools.qo.h.

Member Function Documentation

virtual void casa::QtOldPTRegion::clicked ( int  x,
int  y 
)
protectedvirtual

Reimplemented from casa::MultiWCTool.

virtual void casa::QtOldPTRegion::doubleClicked ( int  x,
int  y 
)
protectedvirtual

Reimplemented from casa::MultiWCTool.

void casa::QtOldPTRegion::echoClicked ( casacore::Record  )
signal
bool casa::QtOldPTRegion::getMouseRegion ( casacore::Record mouseRegion,
WorldCanvasHolder *&  wch 
)

Retrieve the current polygon mouse region record and WCH, if any.

(If nothing is ready, returns false – be sure to check before using return parameters. See implementation for mouseRegion casacore::Record format).

void casa::QtOldPTRegion::mouseRegionReady ( casacore::Record  mouseRegion,
WorldCanvasHolder  
)
signal

See regionReady() implementation for format of the record.

(For some uses, a connecting slot may be able to do without the WCH* parameter).

virtual void casa::QtOldPTRegion::polygonReady ( )
inlineprotectedvirtual

virtual void handleEvent(DisplayEvent& ev); virtual void keyPressed(const WCPositionEvent &ev);

///This is not correct !

This callback is invoked by the base when the polygon is first defined (by a double-click at last point) or when the mouse is released after a move/resize. It was unused in glish. For Qt, this will also signal that the polygon region has been fully 'selected/made ready' (which will preclude the need for the user to double-click [again] inside the polygon to select it). virtual void polygonReady() { regionReady(); }

is this fix to 1393?

Reimplemented from casa::MWCPolyTool.

Definition at line 209 of file QtOldMouseTools.qo.h.

virtual void casa::QtOldPTRegion::regionReady ( )
protectedvirtual

This callback is invoked by the base when the user double-clicks inside a polygon defined previously (but see also polygonReady(), below).

This implementation emits the Qt signal mouseRegionReady() with an appropriate casacore::Record defining the user's polygon mouse selection. See implementation for format of the record.

Reimplemented from casa::MWCPTRegion.

Member Data Documentation

PanelDisplay* casa::QtOldPTRegion::pd_
protected

Definition at line 211 of file QtOldMouseTools.qo.h.


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