GNU Octave
4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "Canvas.h"
Public Types | |
enum | EventMask { KeyPress = 0x01, KeyRelease = 0x02 } |
Public Member Functions | |
virtual | ~Canvas (void) |
void | addEventMask (int m) |
virtual void | autoAxes (const graphics_handle &handle)=0 |
void | blockRedraw (bool block=true) |
void | clearEventMask (int m) |
void | print (const QString &file_cmd, const QString &term) |
virtual QWidget * | qWidget (void)=0 |
void | redraw (bool sync=false) |
void | setCursor (MouseMode mode) |
void | setEventMask (int m) |
virtual void | toggleAxes (const graphics_handle &handle)=0 |
virtual void | toggleGrid (const graphics_handle &handle)=0 |
Static Public Member Functions | |
static Canvas * | create (const std::string &name, QWidget *parent, const graphics_handle &handle) |
Protected Member Functions | |
Canvas (const graphics_handle &handle) | |
void | annotation_callback (const octave_value_list &args) |
void | canvasAutoAxes (const graphics_handle &handle) |
bool | canvasKeyPressEvent (QKeyEvent *event) |
bool | canvasKeyReleaseEvent (QKeyEvent *event) |
void | canvasMouseDoubleClickEvent (QMouseEvent *event) |
void | canvasMouseMoveEvent (QMouseEvent *event) |
void | canvasMousePressEvent (QMouseEvent *event) |
void | canvasMouseReleaseEvent (QMouseEvent *event) |
void | canvasPaintEvent (void) |
void | canvasToggleAxes (const graphics_handle &handle) |
void | canvasToggleGrid (const graphics_handle &handle) |
void | canvasWheelEvent (QWheelEvent *event) |
virtual void | draw (const graphics_handle &handle)=0 |
virtual void | drawZoomBox (const QPoint &p1, const QPoint &p2)=0 |
virtual void | resize (int x, int y, int width, int height)=0 |
virtual graphics_object | selectFromAxes (const graphics_object &ax, const QPoint &pt)=0 |
void | updateCurrentPoint (const graphics_object &fig, const graphics_object &obj, QMouseEvent *event) |
void | updateCurrentPoint (const graphics_object &fig, const graphics_object &obj) |
Private Attributes | |
bool | m_clickMode |
int | m_eventMask |
graphics_handle | m_handle |
QPoint | m_mouseAnchor |
graphics_handle | m_mouseAxes |
QPoint | m_mouseCurrent |
MouseMode | m_mouseMode |
bool | m_rectMode |
bool | m_redrawBlocked |
|
inlineprotected |
|
inline |
Definition at line 59 of file Canvas.h.
References m_eventMask.
Referenced by QtHandles::Figure::update().
|
protected |
|
pure virtual |
Implemented in QtHandles::GLCanvas.
Referenced by QtHandles::Figure::autoAxes().
void QtHandles::Canvas::blockRedraw | ( | bool | block = true | ) |
Definition at line 67 of file Canvas.cc.
References m_redrawBlocked.
Referenced by QtHandles::Figure::beingDeleted().
|
protected |
Definition at line 287 of file Canvas.cc.
References QtHandles::autoscale_axes(), figure::properties::get_currentaxes(), gh_manager::get_object(), redraw(), and graphics_object::valid_object().
Referenced by QtHandles::GLCanvas::autoAxes().
|
protected |
Definition at line 925 of file Canvas.cc.
References graphics_object::get_ancestor(), gh_manager::get_object(), octave_scalar_map::getfield(), KeyPress, m_eventMask, m_handle, QtHandles::Utils::makeKeyEventStruct(), gh_manager::post_callback(), gh_manager::post_set(), updateCurrentPoint(), and graphics_object::valid_object().
Referenced by QtHandles::GLCanvas::keyPressEvent().
|
protected |
Definition at line 952 of file Canvas.cc.
References KeyRelease, m_eventMask, m_handle, QtHandles::Utils::makeKeyEventStruct(), and gh_manager::post_callback().
Referenced by QtHandles::GLCanvas::keyReleaseEvent().
|
protected |
Definition at line 469 of file Canvas.cc.
References canvasMousePressEvent().
Referenced by QtHandles::GLCanvas::mouseDoubleClickEvent().
|
protected |
Definition at line 399 of file Canvas.cc.
References graphics_object::get_ancestor(), gh_manager::get_object(), m_handle, m_mouseAxes, m_mouseCurrent, m_mouseMode, QtHandles::NoMode, QtHandles::pan_mode(), QtHandles::PanMode, axes::properties::pixel2coord(), gh_manager::post_callback(), redraw(), axes::properties::rotate3d(), QtHandles::RotateMode, QtHandles::TextMode, axes::properties::translate_view(), updateCurrentPoint(), graphics_object::valid_object(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by QtHandles::GLCanvas::mouseMoveEvent().
|
protected |
Definition at line 502 of file Canvas.cc.
References QtHandles::autoscale_axes(), QtHandles::button_number(), QtHandles::ContextMenu::executeAt(), QtHandles::Utils::figureSelectionType(), base_properties::get_all_children(), graphics_object::get_ancestor(), base_properties::get_boundingbox(), gh_manager::get_object(), graphics_object::get_properties(), graphics_object::isa(), m_clickMode, m_handle, m_mouseAnchor, m_mouseAxes, m_mouseCurrent, m_mouseMode, m_rectMode, QtHandles::Figure::mouseMode(), QtHandles::NoMode, Array< T >::numel(), octave_NaN, QtHandles::PanMode, gh_manager::post_callback(), gh_manager::post_set(), redraw(), QtHandles::RotateMode, selectFromAxes(), QtHandles::TextMode, QtHandles::Backend::toolkitObject(), updateCurrentPoint(), graphics_object::valid_object(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by canvasMouseDoubleClickEvent(), and QtHandles::GLCanvas::mousePressEvent().
|
protected |
Definition at line 719 of file Canvas.cc.
References annotation_callback(), graphics_object::get(), graphics_object::get_ancestor(), gh_manager::get_object(), annotation_dialog::get_properties(), m_clickMode, m_handle, m_mouseAnchor, m_mouseAxes, m_mouseMode, m_rectMode, octave_value::matrix_value(), max(), min(), QtHandles::NoMode, octave_handle::ok(), ovl(), axes::properties::pixel2coord(), gh_manager::post_callback(), octave_link::post_event(), qWidget(), redraw(), QtHandles::TextMode, updateCurrentPoint(), graphics_object::valid_object(), Faddeeva::w(), axes::properties::zoom(), axes::properties::zoom_about_point(), QtHandles::zoom_mode(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by QtHandles::GLCanvas::mouseReleaseEvent().
|
protected |
Definition at line 313 of file Canvas.cc.
References draw(), drawZoomBox(), m_handle, m_mouseAnchor, m_mouseAxes, m_mouseCurrent, m_mouseMode, m_rectMode, m_redrawBlocked, octave_handle::ok(), and QtHandles::ZoomInMode.
Referenced by QtHandles::GLCanvas::paintGL().
|
protected |
Definition at line 209 of file Canvas.cc.
References figure::properties::get_currentaxes(), gh_manager::get_object(), base_properties::handlevisibility_is(), base_properties::is_visible(), redraw(), base_properties::set_visible(), and graphics_object::valid_object().
Referenced by QtHandles::GLCanvas::toggleAxes().
|
protected |
Definition at line 238 of file Canvas.cc.
References figure::properties::get_currentaxes(), gh_manager::get_object(), axes::properties::get_xgrid(), axes::properties::get_ygrid(), axes::properties::get_zgrid(), redraw(), axes::properties::set_xgrid(), axes::properties::set_ygrid(), axes::properties::set_zgrid(), state, and graphics_object::valid_object().
Referenced by QtHandles::GLCanvas::toggleGrid().
|
protected |
Definition at line 817 of file Canvas.cc.
References octave_handle::as_octave_value(), graphics_object::get_ancestor(), base_properties::get_children(), graphics_object::get_handle(), axes::properties::get_mousewheelzoom(), gh_manager::get_object(), graphics_object::get_properties(), base_properties::handlevisibility_is(), graphics_object::isa(), m_handle, QtHandles::Figure::mouseMode(), QtHandles::NoMode, Array< T >::numel(), axes::properties::pan(), QtHandles::pan_enabled(), QtHandles::pan_mode(), QtHandles::PanMode, redraw(), selectFromAxes(), QtHandles::Backend::toolkitObject(), graphics_object::valid_object(), axes::properties::zoom(), QtHandles::zoom_enabled(), QtHandles::zoom_mode(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by QtHandles::GLCanvas::wheelEvent().
|
inline |
Definition at line 60 of file Canvas.h.
References m_eventMask.
Referenced by QtHandles::Figure::update().
|
static |
Definition at line 966 of file Canvas.cc.
Referenced by QtHandles::Container::canvas().
|
protectedpure virtual |
Implemented in QtHandles::GLCanvas.
Referenced by canvasPaintEvent().
|
protectedpure virtual |
Implemented in QtHandles::GLCanvas.
Referenced by canvasPaintEvent().
void QtHandles::Canvas::print | ( | const QString & | file_cmd, |
const QString & | term | ||
) |
Definition at line 104 of file Canvas.cc.
References graphics_object::get_ancestor(), gh_manager::get_object(), gl2ps_print(), m_handle, and graphics_object::valid_object().
Referenced by QtHandles::Figure::print().
|
pure virtual |
Implemented in QtHandles::GLCanvas.
Referenced by QtHandles::Container::canvas(), canvasMouseReleaseEvent(), QtHandles::Figure::Figure(), redraw(), QtHandles::Container::resizeEvent(), setCursor(), and updateCurrentPoint().
void QtHandles::Canvas::redraw | ( | bool | sync = false | ) |
Definition at line 53 of file Canvas.cc.
References qWidget(), and Faddeeva::w().
Referenced by annotation_callback(), canvasAutoAxes(), canvasMouseMoveEvent(), canvasMousePressEvent(), canvasMouseReleaseEvent(), canvasToggleAxes(), canvasToggleGrid(), canvasWheelEvent(), QtHandles::Panel::redraw(), and QtHandles::Figure::redraw().
|
protectedpure virtual |
Implemented in QtHandles::GLCanvas.
|
protectedpure virtual |
Implemented in QtHandles::GLCanvas.
Referenced by canvasMousePressEvent(), and canvasWheelEvent().
void QtHandles::Canvas::setCursor | ( | MouseMode | mode | ) |
Definition at line 73 of file Canvas.cc.
References QtHandles::PanMode, qWidget(), QtHandles::RotateMode, Faddeeva::w(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by QtHandles::Figure::setMouseMode().
|
inline |
Definition at line 61 of file Canvas.h.
References m_eventMask.
Referenced by QtHandles::Figure::Figure().
|
pure virtual |
Implemented in QtHandles::GLCanvas.
Referenced by QtHandles::Figure::toggleAxes().
|
pure virtual |
Implemented in QtHandles::GLCanvas.
Referenced by QtHandles::Figure::toggleGrid().
|
protected |
Definition at line 123 of file Canvas.cc.
References QtHandles::Utils::figureCurrentPoint(), base_properties::get_children(), graphics_object::get_handle(), gh_manager::get_object(), graphics_object::get_properties(), axes::properties::get_transform(), axes::properties::get_transform_zlim(), graphics_object::isa(), gh_manager::post_set(), and graphics_xform::untransform().
Referenced by canvasKeyPressEvent(), canvasMouseMoveEvent(), canvasMousePressEvent(), and canvasMouseReleaseEvent().
|
protected |
Definition at line 161 of file Canvas.cc.
References QtHandles::Utils::figureCurrentPoint(), base_properties::get_children(), graphics_object::get_handle(), gh_manager::get_object(), graphics_object::get_properties(), axes::properties::get_transform(), axes::properties::get_transform_zlim(), graphics_object::isa(), gh_manager::post_set(), qWidget(), graphics_xform::untransform(), and Faddeeva::w().
|
private |
Definition at line 114 of file Canvas.h.
Referenced by canvasMousePressEvent(), and canvasMouseReleaseEvent().
|
private |
Definition at line 118 of file Canvas.h.
Referenced by addEventMask(), canvasKeyPressEvent(), canvasKeyReleaseEvent(), clearEventMask(), and setEventMask().
|
private |
Definition at line 111 of file Canvas.h.
Referenced by canvasKeyPressEvent(), canvasKeyReleaseEvent(), canvasMouseMoveEvent(), canvasMousePressEvent(), canvasMouseReleaseEvent(), canvasPaintEvent(), canvasWheelEvent(), and print().
|
private |
Definition at line 115 of file Canvas.h.
Referenced by canvasMousePressEvent(), canvasMouseReleaseEvent(), and canvasPaintEvent().
|
private |
Definition at line 117 of file Canvas.h.
Referenced by canvasMouseMoveEvent(), canvasMousePressEvent(), canvasMouseReleaseEvent(), and canvasPaintEvent().
|
private |
Definition at line 116 of file Canvas.h.
Referenced by canvasMouseMoveEvent(), canvasMousePressEvent(), and canvasPaintEvent().
|
private |
Definition at line 113 of file Canvas.h.
Referenced by canvasMouseMoveEvent(), canvasMousePressEvent(), canvasMouseReleaseEvent(), and canvasPaintEvent().
|
private |
Definition at line 119 of file Canvas.h.
Referenced by canvasMousePressEvent(), canvasMouseReleaseEvent(), and canvasPaintEvent().
|
private |
Definition at line 112 of file Canvas.h.
Referenced by blockRedraw(), and canvasPaintEvent().