40 class PlotPanToolNotifier;
41 class PlotSelectToolNotifier;
42 class PlotTrackerToolNotifier;
70 PlotTool(PlotCoordinate::System sys = PlotCoordinate::WORLD);
75 PlotCoordinate::System sys = PlotCoordinate::WORLD);
180 PlotCoordinate::System coordSys = PlotCoordinate::WORLD) :
181 PlotTool(xAxis, yAxis, coordSys) { }
258 PlotSelectTool(PlotCoordinate::System system = PlotCoordinate::WORLD);
262 PlotCoordinate::System system = PlotCoordinate::WORLD);
270 virtual void addNotifier(PlotSelectToolNotifier* notifier);
290 std::vector<double>& upperLeftXs,
291 std::vector<double>& upperLeftYs,
292 std::vector<double>& lowerRightXs,
293 std::vector<double>& lowerRightYs,
294 PlotCoordinate::System system = PlotCoordinate::WORLD)
const;
296 PlotCoordinate::System system = PlotCoordinate::WORLD)
const;
302 virtual void setActive(
bool active =
true);
370 PlotZoomTool(PlotCoordinate::System sys = PlotCoordinate::WORLD);
374 PlotCoordinate::System sys = PlotCoordinate::WORLD);
390 virtual std::vector<PlotRegion>
getZoomStack(PlotCoordinate::System sytem =
391 PlotCoordinate::WORLD)
const;
397 virtual void setActive(
bool active =
true);
403 virtual void reset();
444 PlotPanTool(PlotCoordinate::System sys = PlotCoordinate::WORLD);
448 PlotCoordinate::System sys = PlotCoordinate::WORLD);
455 virtual void addNotifier(PlotPanToolNotifier* notifier);
458 virtual std::vector<PlotRegion>
getPanStack(PlotCoordinate::System system =
459 PlotCoordinate::WORLD)
const;
465 virtual void setActive(
bool active =
true);
471 virtual void reset();
529 PlotCoordinate::System sys = PlotCoordinate::WORLD);
536 virtual void addNotifier(PlotTrackerToolNotifier* notifier);
562 virtual PlotCoordinate
getCoordinate(PlotCoordinate::System =
563 PlotCoordinate::WORLD)
const;
566 virtual void setActive(
bool active =
true);
625 PlotFlagAllTool(PlotCoordinate::System system = PlotCoordinate::WORLD);
629 PlotCoordinate::System system = PlotCoordinate::WORLD);
686 class PlotSelectToolNotifier {
690 PlotSelectToolNotifier() { }
691 virtual ~PlotSelectToolNotifier() { }
751 class PlotMouseToolGroup :
public virtual PlotMouseTool {
754 PlotMouseToolGroup();
763 std::vector<PlotMouseToolPtr>
tools()
const;
771 unsigned int addTool(PlotMouseToolPtr tool);
780 PlotMouseToolPtr
toolAt(
unsigned int index)
const;
783 unsigned int indexOf(PlotMouseToolPtr tool)
const;
872 PlotCoordinate::System system = PlotCoordinate::WORLD);
878 PlotCoordinate::System system = PlotCoordinate::WORLD);
965 void attach(PlotCanvas* canvas);
975 PlotMouseToolGroup, PlotMouseToolGroupPtr,
static const casacore::String DEFAULT_FORMAT
int getSelectedRectCount() const
void handleMouseRelease(const PlotMouseReleaseEvent &event)
PlotCoordinate m_lastCoord
Last coordinate in dragging mode.
virtual void setFormat(const casacore::String &format)
Sets the tracker text format to the given.
std::vector< PlotMouseToolPtr > m_tools
All tools.
PlotMouseToolPtr activeTool() const
Returns the currently active tool, or NULL for none.
Event for when the user selects a region on a plot canvas with the mouse.
Convenience class for mouse presses.
virtual ~PlotPanTool()
Destructor.
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 tools
bool m_drawText
Whether to draw the annotation or not.
bool isMarkedForFlag() const
Inquiry if it is marked.
PlotFlagAllTool::PPFlagType m_marked
boolean flag for whether canvas is marked for flag
virtual void attach(PlotCanvas *canvas)
Overrides PlotTool::attach().
bool m_inDraggingMode
Whether we're in dragging mode or not.
PlotAxis getXAxis() const
Overrides PlotTool::getXAxis().
virtual bool drawsText() const
Returns true if the tracker text is drawn on the canvas, false otherwise.
virtual PlotAnnotationPtr getAnnotation()
Returns the annotation used to store the coordinates/text.
bool m_bgcolor_changed
boolean flag for background color
PlotMouseToolPtr m_activeTool
Active tool (or NULL for no active tool).
virtual void reset()
Overrides PlotTool::reset().
PlotTrackerToolPtr trackerTool()
virtual ~PlotFlagAllTool()
Destructor.
void clearSelectedRects()
virtual void setDrawText(bool draw=true)
Sets whether the tracker will draw the text on the canvas or not.
Base class for a handler for PlotSelectEvent.
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 ~PlotMouseToolGroup()
Constructor for empty group.
Convenience class for mouse moves.
virtual ~PlotZoomTool()
Destructor.
virtual void handleMouseEvent(const PlotEvent &event)
Implements PlotMouseTool::handleMouseEvent().
void setBlocking(bool blocking=true)
Overrides PlotTool::setBlocking().
PlotTrackerToolPtr m_tracker
Tracker.
Base class for a handler for PlotClickEvent.
virtual PlotCoordinate getCoordinate(PlotCoordinate::System=PlotCoordinate::WORLD) const
Gets the tracker's current position.
Event for when the user scrolls the scroll wheel.
The idea behind a plot factory is to produce classes that are useful to the underlying implementation...
Convenience class for mouse clicks.
static const casacore::String FORMAT_DIVIDER
Static //.
INHERITANCE_POINTER(PlotZoomTool, PlotZoomToolPtr, PlotMouseTool, PlotMouseToolPtr, PlotTool, PlotToolPtr) class PlotPanTool PlotPanTool(PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System sys=PlotCoordinate::WORLD)
A PlotPanTool is a concrete subclass of PlotMouseTool that provides convenient panning functionality...
virtual void setActive(bool active=true)
Overrides PlotTool::setActive().
Base class for a handler for PlotMouseReleaseEvent.
unsigned int addTool(PlotMouseToolPtr tool)
Adds the given tool to the group and returns its index.
unsigned int numTools() const
Returns the number of tools in the group.
PlotFlagAllToolPtr flagAllTool()
void markAsFlag()
internal methods for shared operations
static casacore::String 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 functional...
Base class for a handler for a PlotMouseMoveEvent.
void handleMouseMove(const PlotMouseMoveEvent &event)
Base class for a handler for PlotMouseDragEvent.
virtual void addNotifier(PlotZoomToolNotifier *notifier)
Adds the given notifier.
Referenced counted pointer for constant data.
PlotZoomToolPtr zoomTool()
virtual std::vector< PlotRegion > getZoomStack(PlotCoordinate::System sytem=PlotCoordinate::WORLD) const
Gets the zoom stack.
std::vector< PlotZoomToolNotifier * > m_notifiers
Notifiers.
void turnTrackerDrawText(bool on)
PlotAxesStack * m_stack
Common canvas stack.
void clearMark()
Manipulate mark.
A PlotAxesStack is basically a list of PlotRegions as well as axis information that provides stack fu...
virtual void setSelectLine(PlotLinePtr line)
Sets the selection line to the given.
bool isMarkedForUnflag() const
std::vector< PlotRegion > getSelectedRects() const
Convenience class for mouse drags.
INHERITANCE_POINTER(PlotTrackerTool, PlotTrackerToolPtr, PlotMouseTool, PlotMouseToolPtr, PlotTool, PlotToolPtr) class PlotFlagAllTool PlotFlagAllTool(PlotCoordinate::System system=PlotCoordinate::WORLD)
A PlotFlagAllTool is a concrete subclass of PlotMouseTool that handles one-click data flag functional...
PlotMouseToolPtr toolAt(unsigned int index) const
Returns the tool at the given index, or NULL for invalid.
virtual ~PlotTrackerTool()
Destructor.
PlotAxis
Enum for the four plot axes.
bool m_draw
boolean flag for whether update of background is active
CONCRETE TOOL CLASSES Was in PlotStandardMouseToolGroup
bool trackerDrawsText() const
PlotSelectToolPtr selectTool()
Provides access to the individual tools.
bool containsTool(PlotMouseToolPtr tool) const
Returns true if the given tool is in this group, false otherwise.
Base class for a handler for PlotMousePressEvent.
INHERITANCE_POINTER2(PlotLayoutSingle, PlotLayoutSinglePtr, PlotCanvasLayout, PlotCanvasLayoutPtr) INHERITANCE_POINTER2(PlotLayoutGrid
casacore::CountedPtr< PlotTool > PlotToolPtr
INHERITANCE_POINTER(PlotSelectTool, PlotSelectToolPtr, PlotMouseTool, PlotMouseToolPtr, PlotTool, PlotToolPtr) class PlotZoomTool PlotZoomTool(PlotAxis xAxis, PlotAxis yAxis, PlotCoordinate::System sys=PlotCoordinate::WORLD)
A PlotZoomTool is a concrete subclass of PlotMouseTool that provides convenient zooming functionality...
static const casacore::String FORMAT_X
PlotCanvas is an area for different PlotItems to be attached and drawn.
PlotAnnotationPtr m_annotation
Annotation that holds current position (even if not drawn on canvas).
casacore::String m_format
Tracker text format.
bool removeTool(PlotMouseToolPtr tool)
Removes the given tool from the group, and returns true on success.
virtual bool isUpdateBackgroundActive()
Inquiry if update of background is active.
PlotTrackerTool(PlotCoordinate::System sys=PlotCoordinate::WORLD)
Non-Static //.
ToolCode activeToolType() const
unsigned int indexOf(PlotMouseToolPtr tool) const
Returns the index of the given tool, or numTools() for invalid.
PlotAxis getYAxis() const
Overrides PlotTool::getYAxis().
const Double c
Fundamental physical constants (SI units):
void turnTracker(bool on)
Provides access to the tracker.
PlotAreaFillPtr m_defaultBackground
keep default background setting
PlotLinePtr m_selLine
Copy of canvas selection line, or NULL if none has been set.
String: the storage and methods of handling collections of characters.
void handleClick(const PlotClickEvent &event)
Base class for a handler for PlotWheelEvent.
static const casacore::String FORMAT_Y
~PlotStandardMouseToolGroup()
Destructor.
virtual unsigned int getStackIndex() const
Gets the zoom stack index.
void handleWheel(const PlotWheelEvent &event)
bool lastEventWasHandled() const
Overrides PlotTool::lastEventWasHandled().
virtual void notifyWatchers()
Notifies all registered listeners that the zoom has changed.
static const casacore::String FORMAT_PRECISION
virtual void setUpdateBackground(bool on=true)
Sets the attributes for updating background.
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
CONCRETE TOOL CLASSES Was in but needed so it can be passed to setActiveTool
bool isBackgroundColorChanged() const
Inquiry if bgcolor is changed.
virtual void detach()
Overrides PlotTool::detach().
void handleMousePress(const PlotMousePressEvent &event)
PlotCoordinate::System getCoordinateSystem() const
Overrides PlotTool::getCoordinateSystem().
void handleSelect(const PlotSelectEvent &event)
Overrides PlotMouseTool's event handling methods.
Convenience class for mouse releases.
virtual std::vector< PlotRegion > getPanStack(PlotCoordinate::System system=PlotCoordinate::WORLD) const
Gets the pan stack.
void handleMouseDrag(const PlotMouseDragEvent &event)