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

WorldCanvasEvent:contains info on the WC point selected by MWCCrosshairTool. More...

#include <CrosshairEvent.h>

Inheritance diagram for casa::CrosshairEvent:
casa::WorldCanvasEvent casa::DisplayEvent

Public Member Functions

 CrosshairEvent (WorldCanvas *wc, const casacore::Int pixX, const casacore::Int pixY, const casacore::String &evtype)
 Constructor taking a pointer to the WorldCanvas where the event occured, and the pixel coordinates of the event. More...
 
virtual casacore::Int pixX () const
 The x and y pixel position of the crosshair when the event occurred. More...
 
virtual casacore::Int pixY () const
 
virtual casacore::String evtype () const
 
- Public Member Functions inherited from casa::WorldCanvasEvent
 WorldCanvasEvent (WorldCanvas *wc)
 Constructor, taking a pointer to a WorldCanvas. More...
 
virtual ~WorldCanvasEvent ()
 Destructor. More...
 
virtual WorldCanvasworldCanvas () const
 Return a pointer to the WorldCanvas on which the event occurred. More...
 
- Public Member Functions inherited from casa::DisplayEvent
 DisplayEvent ()
 Constructor. More...
 
 DisplayEvent (const DisplayEvent &other)
 Copy constructor - construct a new DisplayEvent from other. More...
 
virtual ~DisplayEvent ()
 Destructor. More...
 
DisplayEventoperator= (const DisplayEvent &other)
 Copy assignment using copy semantics. More...
 
virtual casacore::Double timeOfEvent () const
 Return the Julian date (in fractional seconds) that this event occured. More...
 

Private Attributes

casacore::Int itsPixX
 pixel position of the event More...
 
casacore::Int itsPixY
 
casacore::String itsEvType
 "down", "move", or "up", according to mouse state. More...
 

Additional Inherited Members

- Protected Member Functions inherited from casa::WorldCanvasEvent
 WorldCanvasEvent ()
 (Required) default constructor. More...
 
 WorldCanvasEvent (const WorldCanvasEvent &other)
 (Required) copy constructor. More...
 
WorldCanvasEventoperator= (const WorldCanvasEvent &other)
 (Required) copy assignment. More...
 

Detailed Description

WorldCanvasEvent:contains info on the WC point selected by MWCCrosshairTool.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"CrosshairEvent" holds information about a point selected by the user with the MWCCrosshairTool.

Synopsis

CrosshairEvent is created by MWCCrosshairTool when a point is selected by the crosshair on a WorldCanvas draw area. The event is passed (via WorldCanvas::handleEvent()) to the generic DisplayEH s registered with the WorldCanvas.

Motivation

A mechanism was needed to notify library objects associated with a WorldCanvas (in particular, DisplayData s) when a position was selected on the WC via MWCCrosshairTool. Formerly, this information was sent only to glish. This event is on a different level from the mouse/keyboard WorldCanvasEvents and serves a different purpose, so a new event type was created.

Thrown Exceptions

.

Definition at line 81 of file CrosshairEvent.h.

Constructor & Destructor Documentation

casa::CrosshairEvent::CrosshairEvent ( WorldCanvas wc,
const casacore::Int  pixX,
const casacore::Int  pixY,
const casacore::String evtype 
)
inline

Constructor taking a pointer to the WorldCanvas where the event occured, and the pixel coordinates of the event.

evtype should be "down", "move", or "up", according to mouse state.

Definition at line 88 of file CrosshairEvent.h.

Member Function Documentation

virtual casacore::String casa::CrosshairEvent::evtype ( ) const
inlinevirtual

Definition at line 103 of file CrosshairEvent.h.

References itsEvType.

virtual casacore::Int casa::CrosshairEvent::pixX ( ) const
inlinevirtual

The x and y pixel position of the crosshair when the event occurred.

Definition at line 97 of file CrosshairEvent.h.

References itsPixX.

virtual casacore::Int casa::CrosshairEvent::pixY ( ) const
inlinevirtual

Definition at line 100 of file CrosshairEvent.h.

References itsPixY.

Member Data Documentation

casacore::String casa::CrosshairEvent::itsEvType
private

"down", "move", or "up", according to mouse state.

Definition at line 113 of file CrosshairEvent.h.

Referenced by evtype().

casacore::Int casa::CrosshairEvent::itsPixX
private

pixel position of the event

Definition at line 111 of file CrosshairEvent.h.

Referenced by pixX().

casacore::Int casa::CrosshairEvent::itsPixY
private

Definition at line 111 of file CrosshairEvent.h.

Referenced by pixY().


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