SciDAVis
1.D4
|
Handles parts of the user interaction for a Plot by registering itself as an event filter for its QwtPlotCanvas. More...
#include <CanvasPicker.h>
Signals | |
void | drawTextOff () |
void | modified () |
void | selectPlot () |
void | showMarkerPopupMenu () |
void | showPlotDialog (int) |
void | viewImageDialog () |
void | viewLineDialog () |
void | viewTextDialog () |
Public Member Functions | |
CanvasPicker (Graph *plot) | |
void | disableEditing () |
Disable editing of d_editing_marker on a TAB-key event. | |
virtual bool | eventFilter (QObject *, QEvent *) |
void | selectPeak (const QPoint &p) |
void | selectPoints (int n) |
Private Member Functions | |
void | drawLineMarker (const QPoint &, bool endArrow) |
void | drawTextMarker (const QPoint &) |
Graph * | plot () |
Return my parent as a Graph. | |
bool | selectMarker (const QMouseEvent *e) |
Selects and highlights the marker at the given position. |
Private Attributes | |
ArrowMarker * | d_editing_marker |
The marker that is currently being edited, or NULL. Editing does explicitly not inlude moving and resizing, which are being handled by SelectionMoveResizer (see Graph::d_markers_selector). Currently, only ArrowMarker provides any other form of editing, but this really should be generalized. See ImageMarker for details. | |
QPoint | endLinePoint |
Plot * | plotWidget |
The Plot I handle user interaction for. | |
bool | pointSelected |
QPoint | startLinePoint |
Handles parts of the user interaction for a Plot by registering itself as an event filter for its QwtPlotCanvas.
CanvasPicker relies heavily on its parent being the Graph that owns the Plot it operates on. Additionally, parts of the code use Graph::plotWidget instead of CanvasPicker::plotWidget.
CanvasPicker::CanvasPicker | ( | Graph * | plot | ) |
References d_editing_marker, plotWidget, Graph::plotWidget(), and pointSelected.
void CanvasPicker::disableEditing | ( | ) |
Disable editing of d_editing_marker on a TAB-key event.
Called by Graph::focusNextPrevChild ()
References d_editing_marker, and ArrowMarker::setEditable().
Referenced by Graph::focusNextPrevChild().
|
private |
|
private |
|
signal |
Referenced by drawTextMarker().
|
virtual |
References Graph::addArrow(), Graph::arrowDefaultColor(), Graph::arrowDefaultWidth(), Graph::arrowHeadDefaultAngle(), Graph::arrowHeadDefaultFill(), Graph::arrowHeadDefaultLength(), Graph::arrowLineDefaultStyle(), Plot::closestCurve(), d_editing_marker, Graph::deselectMarker(), Graph::drawArrow(), ArrowMarker::drawEndArrow(), Graph::drawLine(), Graph::drawLineActive(), drawLineMarker(), ArrowMarker::drawStartArrow(), Graph::drawTextActive(), drawTextMarker(), ArrowMarker::eventFilter(), ArrowMarker::fillArrowHead(), Graph::imageMarkerKeys(), Graph::lineMarkerKeys(), plot(), plotWidget, Graph::plotWidget(), Graph::selectedMarkerKey(), selectMarker(), selectPlot(), ArrowMarker::setColor(), ArrowMarker::setEditable(), ArrowMarker::setEndPoint(), ArrowMarker::setHeadAngle(), ArrowMarker::setHeadLength(), ArrowMarker::setStartPoint(), ArrowMarker::setStyle(), ArrowMarker::setWidth(), showMarkerPopupMenu(), showPlotDialog(), startLinePoint, Graph::textMarkerKeys(), viewImageDialog(), viewLineDialog(), viewTextDialog(), and Graph::zoomOn().
|
signal |
|
inlineprivate |
Return my parent as a Graph.
Note that contrary to the method name, this does NOT return the Plot I operate on.
Referenced by drawLineMarker(), drawTextMarker(), eventFilter(), and selectMarker().
|
private |
Selects and highlights the marker at the given position.
References d_editing_marker, Graph::deselectMarker(), ArrowMarker::dist(), ArrowMarker::headAngle(), ArrowMarker::headLength(), Graph::imageMarkerKeys(), Graph::lineMarkerKeys(), M_PI, Plot::marker(), plot(), plotWidget, Legend::rect(), ImageMarker::rect(), ArrowMarker::setEditable(), Graph::setSelectedMarker(), and ArrowMarker::width().
Referenced by eventFilter().
void CanvasPicker::selectPeak | ( | const QPoint & | p | ) |
|
signal |
Referenced by eventFilter().
void CanvasPicker::selectPoints | ( | int | n | ) |
|
signal |
Referenced by eventFilter().
|
signal |
Referenced by eventFilter().
|
signal |
Referenced by eventFilter().
|
signal |
Referenced by eventFilter().
|
signal |
Referenced by eventFilter().
|
private |
The marker that is currently being edited, or NULL. Editing does explicitly not inlude moving and resizing, which are being handled by SelectionMoveResizer (see Graph::d_markers_selector). Currently, only ArrowMarker provides any other form of editing, but this really should be generalized. See ImageMarker for details.
Referenced by CanvasPicker(), disableEditing(), eventFilter(), and selectMarker().
|
private |
|
private |
The Plot I handle user interaction for.
Note that this has to be owned by my parent Graph.
Referenced by CanvasPicker(), drawLineMarker(), drawTextMarker(), eventFilter(), and selectMarker().
|
private |
Referenced by CanvasPicker().
|
private |
Referenced by drawLineMarker(), and eventFilter().