casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
PlotTool.h File Reference
#include <graphics/GenericPlotter/PlotEventHandler.h>
#include <graphics/GenericPlotter/PlotOptions.h>
#include <graphics/GenericPlotter/PlotShape.h>
#include <graphics/GenericPlotter/PlotAnnotation.h>

Go to the source code of this file.

Classes

class  casa::PlotTool
 
class  casa::PlotMouseTool
 A PlotMouseTool is a specialization of PlotTool that handles all mouse events. More...
 
class  casa::PlotSelectTool
 A PlotSelectTool is a concrete subclass of PlotMouseTool that mainly handles select events. More...
 
class  casa::PlotZoomToolNotifier
 Interface for objects that want to be notified when the zoom tool changes. More...
 
class  casa::PlotPanToolNotifier
 Interface for objects that want to be notified when the pan tool changes. More...
 
class  casa::PlotTrackerToolNotifier
 Interface for objects that want to be notified when the tracker tool changes. More...
 

Namespaces

 casa
 -*- mode: c++ -*-
 

Typedefs

typedef casacore::CountedPtr
< PlotTool > 
casa::PlotToolPtr
 

Enumerations

enum  casa::ToolCode {
  casa::SELECT_TOOL,
  casa::SUBTRACT_TOOL,
  casa::ZOOM_TOOL,
  casa::PAN_TOOL,
  casa::FLAGALL_TOOL,
  casa::NONE_TOOL
}
 

Functions

INHERITANCE_POINTER(PlotSelectTool,
PlotSelectToolPtr,
PlotMouseTool,
PlotMouseToolPtr, PlotTool,
PlotToolPtr) class
PlotZoomTool 
casa::PlotZoomTool (PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System sys=PlotCoordinate::WORLD)
 A PlotZoomTool is a concrete subclass of PlotMouseTool that provides convenient zooming functionality. More...
 
virtual casa::~PlotZoomTool ()
 Destructor. More...
 
virtual void casa::addNotifier (PlotZoomToolNotifier *notifier)
 Adds the given notifier. More...
 
virtual void casa::setSelectLine (PlotLinePtr line)
 Sets the selection line to the given. More...
 
virtual void casa::setSelectLine (bool on=true)
 
virtual std::vector< PlotRegion > casa::getZoomStack (PlotCoordinate::System sytem=PlotCoordinate::WORLD) const
 Gets the zoom stack. More...
 
virtual unsigned int casa::getStackIndex () const
 Gets the zoom stack index. More...
 
virtual void casa::setActive (bool active=true)
 Overrides PlotTool::setActive(). More...
 
virtual void casa::handleMouseEvent (const PlotEvent &event)
 Implements PlotMouseTool::handleMouseEvent(). More...
 
virtual void casa::reset ()
 Overrides PlotTool::reset(). More...
 
virtual void casa::attach (PlotCanvas *canvas)
 Overrides PlotTool::attach(). More...
 
virtual void casa::detach ()
 Overrides PlotTool::detach(). More...
 
virtual void casa::notifyWatchers ()
 Notifies all registered listeners that the zoom has changed. More...
 
INHERITANCE_POINTER(PlotZoomTool,
PlotZoomToolPtr, PlotMouseTool,
PlotMouseToolPtr, PlotTool,
PlotToolPtr) class PlotPanTool 
casa::PlotPanTool (PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System sys=PlotCoordinate::WORLD)
 A PlotPanTool is a concrete subclass of PlotMouseTool that provides convenient panning functionality. More...
 
virtual casa::~PlotPanTool ()
 Destructor. More...
 
virtual void casa::addNotifier (PlotPanToolNotifier *notifier)
 Adds the given notifier. More...
 
virtual std::vector< PlotRegion > casa::getPanStack (PlotCoordinate::System system=PlotCoordinate::WORLD) const
 Gets the pan stack. More...
 
static casacore::String casa::formattedString (const casacore::String &format, double x, double y, PlotCanvas *canvas, PlotAxis xAxis, PlotAxis yAxis)
 A PlotTrackerTool is a concrete subclass of PlotMouseTool that provides convenient tracker functionality. More...
 
 casa::PlotTrackerTool (PlotCoordinate::System sys=PlotCoordinate::WORLD)
 Non-Static //. More...
 
 casa::PlotTrackerTool (PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System sys=PlotCoordinate::WORLD)
 Constructor which takes the tool's axes and coordinate system. More...
 
virtual casa::~PlotTrackerTool ()
 Destructor. More...
 
virtual void casa::addNotifier (PlotTrackerToolNotifier *notifier)
 Adds the given notifier. More...
 
virtual bool casa::drawsText () const
 Returns true if the tracker text is drawn on the canvas, false otherwise. More...
 
virtual void casa::setDrawText (bool draw=true)
 Sets whether the tracker will draw the text on the canvas or not. More...
 
virtual void casa::setFormat (const casacore::String &format)
 Sets the tracker text format to the given. More...
 
virtual casacore::String casa::formattedString (double x, double y)
 Returns the formatted tracker text for the given position. More...
 
virtual PlotAnnotationPtr casa::getAnnotation ()
 Returns the annotation used to store the coordinates/text. More...
 
virtual PlotCoordinate casa::getCoordinate (PlotCoordinate::System=PlotCoordinate::WORLD) const
 Gets the tracker's current position. More...
 
int casa::getSelectedRectCount ()
 
std::vector< PlotRegion > casa::getSelectedRects () const
 
INHERITANCE_POINTER(PlotTrackerTool,
PlotTrackerToolPtr,
PlotMouseTool,
PlotMouseToolPtr, PlotTool,
PlotToolPtr) class
PlotFlagAllTool 
casa::PlotFlagAllTool (PlotCoordinate::System system=PlotCoordinate::WORLD)
 A PlotFlagAllTool is a concrete subclass of PlotMouseTool that handles one-click data flag functionality. More...
 
 casa::PlotFlagAllTool (PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System system=PlotCoordinate::WORLD)
 Constructor which takes the tool's axes and coordinate system. More...
 
virtual casa::~PlotFlagAllTool ()
 Destructor. More...
 
virtual void casa::setUpdateBackground (bool on=true)
 Sets the attributes for updating background. More...
 
virtual bool casa::isUpdateBackgroundActive ()
 Inquiry if update of background is active. More...
 
void casa::clearMark ()
 Manipulate mark. More...
 
bool casa::isMarkedForFlag () const
 Inquiry if it is marked. More...
 
bool casa::isMarkedForUnflag () const
 
bool casa::isBackgroundColorChanged () const
 Inquiry if bgcolor is changed. More...
 
void casa::setAllFlagged ()
 
void casa::markAsFlag ()
 internal methods for shared operations More...
 
void casa::markAsUnflag ()
 
 casa::INHERITANCE_POINTER (PlotFlagAllTool, PlotFlagAllToolPtr, PlotMouseTool, PlotMouseToolPtr, PlotTool, PlotToolPtr) TOOL NOTIFICATION CLASSESInterface for objects that want to be notified when the selection tool changes.*/class PlotSelectToolNotifier
 
TOOL GROUP CLASSES A
PlotMouseToolGroup provides an
interface for a group of
PlotMouseTools where only
virtual one(or none) is active
at a time.*/class
PlotMouseToolGroup 
casa::~PlotMouseToolGroup ()
 Constructor for empty group. More...
 
unsigned int casa::numTools () const
 Returns the number of tools in the group. More...
 
std::vector< PlotMouseToolPtr > casa::tools () const
 Returns the tools in the group. More...
 
unsigned int casa::addTool (PlotMouseToolPtr tool)
 Adds the given tool to the group and returns its index. More...
 
bool casa::removeTool (PlotMouseToolPtr tool)
 Removes the given tool from the group, and returns true on success. More...
 
bool casa::removeTool (unsigned int index)
 
PlotMouseToolPtr casa::toolAt (unsigned int index) const
 Returns the tool at the given index, or NULL for invalid. More...
 
unsigned int casa::indexOf (PlotMouseToolPtr tool) const
 Returns the index of the given tool, or numTools() for invalid. More...
 
bool casa::containsTool (PlotMouseToolPtr tool) const
 Returns true if the given tool is in this group, false otherwise. More...
 
PlotMouseToolPtr casa::activeTool () const
 Returns the currently active tool, or NULL for none. More...
 
void casa::setActiveTool (PlotMouseToolPtr tool, ToolCode toolcode=NONE_TOOL)
 Sets the active tool to the given. More...
 
void casa::setActiveTool (unsigned int index, ToolCode c=NONE_TOOL)
 Sets the active tool to the one at the given index. More...
 
void casa::setBlocking (bool blocking=true)
 Overrides PlotTool::setBlocking(). More...
 
void casa::handleSelect (const PlotSelectEvent &event)
 Overrides PlotMouseTool's event handling methods. More...
 
void casa::handleClick (const PlotClickEvent &event)
 
void casa::handleMousePress (const PlotMousePressEvent &event)
 
void casa::handleMouseRelease (const PlotMouseReleaseEvent &event)
 
void casa::handleMouseDrag (const PlotMouseDragEvent &event)
 
void casa::handleMouseMove (const PlotMouseMoveEvent &event)
 
void casa::handleWheel (const PlotWheelEvent &event)
 
PlotAxis casa::getXAxis () const
 Overrides PlotTool::getXAxis(). More...
 
PlotAxis casa::getYAxis () const
 Overrides PlotTool::getYAxis(). More...
 
PlotCoordinate::System casa::getCoordinateSystem () const
 Overrides PlotTool::getCoordinateSystem(). More...
 
bool casa::lastEventWasHandled () const
 Overrides PlotTool::lastEventWasHandled(). More...
 
INHERITANCE_POINTER(PlotMouseToolGroup,
PlotMouseToolGroupPtr,
PlotMouseTool,
PlotMouseToolPtr, PlotTool,
PlotToolPtr) class
PlotStandardMouseToolGroup 
casa::PlotStandardMouseToolGroup (PlotAxis xAxis, PlotAxis yAxis, ToolCode activeTool=NONE_TOOL, PlotCoordinate::System system=PlotCoordinate::WORLD)
 PlotStandardMouseToolGroup is a specialized PlotMouseToolGroup where the tools in the group are: 1) select, 2) zoom, and 3) pan. More...
 
 casa::PlotStandardMouseToolGroup (PlotSelectToolPtr selectTool, PlotZoomToolPtr zoomTool, PlotPanToolPtr panTool, PlotFlagAllToolPtr flagAllTool, PlotTrackerToolPtr trackerTool, ToolCode activeTool=NONE_TOOL)
 Constructor which uses the given tools (or creates default tools if the given ones are invalid), and sets the active tool to the given. More...
 
 casa::~PlotStandardMouseToolGroup ()
 Destructor. More...
 
void casa::setActiveTool (ToolCode tool)
 Gets/sets the active standard tool. More...
 
ToolCode casa::activeToolType () const
 
void casa::turnTracker (bool on)
 Provides access to the tracker. More...
 
bool casa::trackerIsOn () const
 
void casa::turnTrackerDrawText (bool on)
 
bool casa::trackerDrawsText () const
 
void casa::clearSelectedRects ()
 
PlotSelectToolPtr casa::selectTool ()
 Provides access to the individual tools. More...
 
PlotZoomToolPtr casa::zoomTool ()
 
PlotPanToolPtr casa::panTool ()
 
PlotFlagAllToolPtr casa::flagAllTool ()
 
PlotTrackerToolPtr casa::trackerTool ()
 

Variables

ABSTRACT TOOL CLASSES A
PlotTool is a higher level
event handler for a PlotCanvas
The idea is to take common
tasks which may require
multiple events and put them
in one place PlotTools also
provide additional
functionality in that they can
be active 
casa::inactive
 
ABSTRACT TOOL CLASSES A
PlotTool is a higher level
event handler for a PlotCanvas
The idea is to take common
tasks which may require
multiple events and put them
in one place PlotTools also
provide additional
functionality in that they can
be active and blocking non
blocking The PlotCanvas will
only send events to active 
casa::tools
 
ABSTRACT TOOL CLASSES A
PlotTool is a higher level
event handler for a PlotCanvas
The idea is to take common
tasks which may require
multiple events and put them
in one place PlotTools also
provide additional
functionality in that they can
be active and blocking non
blocking The PlotCanvas will
only send events to active and
will not send events to later
tools or event handlers if the
latest tool was blocking In
this way a single tool can be
used to handle ALL user
interaction via the GUI at one 
casa::time
 
CONCRETE TOOL CLASSES Was in casa::PlotStandardMouseToolGroup
 
CONCRETE TOOL CLASSES Was in
but needed 
casa::here
 
CONCRETE TOOL CLASSES Was in
but needed so it can be passed
to 
casa::setActiveTool
 
std::vector
< PlotZoomToolNotifier * > 
casa::m_notifiers
 Notifiers. More...
 
PlotLinePtr casa::m_selLine
 Copy of canvas selection line, or NULL if none has been set. More...
 
PlotAxesStack * casa::m_stack
 Common canvas stack. More...
 
bool casa::m_inDraggingMode
 Whether we're in dragging mode or not. More...
 
PlotCoordinate casa::m_lastCoord
 Last coordinate in dragging mode. More...
 
PlotAnnotationPtr casa::m_annotation
 Annotation that holds current position (even if not drawn on canvas). More...
 
bool casa::m_drawText
 Whether to draw the annotation or not. More...
 
casacore::String casa::m_format
 Tracker text format. More...
 
static const casacore::String casa::FORMAT_DIVIDER
 Static //. More...
 
static const casacore::String casa::FORMAT_X
 
static const casacore::String casa::FORMAT_Y
 
static const casacore::String casa::FORMAT_PRECISION
 
static const casacore::String casa::DEFAULT_FORMAT
 
bool casa::m_draw
 boolean flag for whether update of background is active More...
 
bool casa::m_bgcolor_changed
 boolean flag for background color More...
 
PlotFlagAllTool::PPFlagType casa::m_marked
 boolean flag for whether canvas is marked for flag More...
 
PlotAreaFillPtr casa::m_defaultBackground
 keep default background setting More...
 
std::vector< PlotMouseToolPtr > casa::m_tools
 All tools. More...
 
PlotMouseToolPtr casa::m_activeTool
 Active tool (or NULL for no active tool). More...
 
PlotTrackerToolPtr casa::m_tracker
 Tracker. More...