#include "GLCanvas.h"
Public Types | |
enum | EventMask { KeyPress = 0x01, KeyRelease = 0x02 } |
Public Member Functions | |
GLCanvas (QWidget *parent, const graphics_handle &handle) | |
~GLCanvas (void) | |
void | addEventMask (int m) |
void | autoAxes (const graphics_handle &handle) |
void | blockRedraw (bool block=true) |
void | clearEventMask (int m) |
uint8NDArray | do_getPixels (const graphics_handle &handle) |
void | do_print (const QString &file_cmd, const QString &term, const graphics_handle &handle) |
void | draw (const graphics_handle &handle) |
void | drawZoomBox (const QPoint &p1, const QPoint &p2) |
virtual uint8NDArray | getPixels (void) |
void | print (const QString &file_cmd, const QString &term) |
QWidget * | qWidget (void) |
void | redraw (bool sync=false) |
void | resize (int, int, int, int) |
graphics_object | selectFromAxes (const graphics_object &ax, const QPoint &pt) |
void | setCursor (MouseMode mode) |
void | setEventMask (int m) |
void | toggleAxes (const graphics_handle &handle) |
void | toggleGrid (const graphics_handle &handle) |
Static Public Member Functions | |
static Canvas * | create (const std::string &name, QWidget *parent, const graphics_handle &handle) |
Protected Member Functions | |
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) |
void | keyPressEvent (QKeyEvent *event) |
void | keyReleaseEvent (QKeyEvent *event) |
void | mouseDoubleClickEvent (QMouseEvent *event) |
void | mouseMoveEvent (QMouseEvent *event) |
void | mousePressEvent (QMouseEvent *event) |
void | mouseReleaseEvent (QMouseEvent *event) |
void | paintGL (void) |
void | select_object (graphics_object obj, QMouseEvent *event, graphics_object ¤tObj, graphics_object &axesObj, bool axes_only=false, std::vector< std::string > omit=std::vector< std::string >()) |
void | updateCurrentPoint (const graphics_object &fig, const graphics_object &obj, QMouseEvent *event) |
void | updateCurrentPoint (const graphics_object &fig, const graphics_object &obj) |
void | wheelEvent (QWheelEvent *event) |
Private Member Functions | |
bool | begin_rendering (void) |
void | end_rendering (void) |
Definition at line 48 of file GLCanvas.h.
|
inherited |
QtHandles::GLCanvas::GLCanvas | ( | QWidget * | parent, |
const graphics_handle & | handle | ||
) |
Definition at line 50 of file GLCanvas.cc.
QtHandles::GLCanvas::~GLCanvas | ( | void | ) |
Definition at line 58 of file GLCanvas.cc.
|
inlineinherited |
Definition at line 62 of file Canvas.h.
References QtHandles::Canvas::m_eventMask.
Referenced by QtHandles::Figure::update().
|
protectedinherited |
Definition at line 187 of file Canvas.cc.
References append, ovl(), and QtHandles::Canvas::redraw().
Referenced by QtHandles::Canvas::canvasMouseReleaseEvent().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 162 of file GLCanvas.cc.
References QtHandles::Canvas::canvasAutoAxes(), and gh.
|
private |
Definition at line 280 of file GLCanvas.cc.
References retval.
Referenced by do_getPixels(), and do_print().
|
inherited |
Definition at line 67 of file Canvas.cc.
References QtHandles::Canvas::m_redrawBlocked.
Referenced by QtHandles::Figure::beingDeleted().
|
protectedinherited |
Definition at line 272 of file Canvas.cc.
References QtHandles::autoscale_axes(), gh_manager::get_object(), handle, QtHandles::Canvas::redraw(), and graphics_object::valid_object().
Referenced by autoAxes().
|
protectedinherited |
Definition at line 1016 of file Canvas.cc.
References graphics_object::get_ancestor(), gh_manager::get_object(), octave_scalar_map::getfield(), QtHandles::Canvas::KeyPress, QtHandles::Canvas::m_eventMask, QtHandles::Canvas::m_handle, QtHandles::Utils::makeKeyEventStruct(), gh_manager::post_callback(), gh_manager::post_set(), QtHandles::Canvas::updateCurrentPoint(), and graphics_object::valid_object().
Referenced by keyPressEvent().
|
protectedinherited |
Definition at line 1043 of file Canvas.cc.
References QtHandles::Canvas::KeyRelease, QtHandles::Canvas::m_eventMask, QtHandles::Canvas::m_handle, QtHandles::Utils::makeKeyEventStruct(), and gh_manager::post_callback().
Referenced by keyReleaseEvent().
|
protectedinherited |
Definition at line 561 of file Canvas.cc.
References QtHandles::Canvas::canvasMousePressEvent().
Referenced by mouseDoubleClickEvent().
|
protectedinherited |
Definition at line 462 of file Canvas.cc.
References graphics_object::get_ancestor(), gh_manager::get_object(), QtHandles::Canvas::m_handle, QtHandles::Canvas::m_mouseAxes, QtHandles::Canvas::m_mouseCurrent, QtHandles::Canvas::m_mouseMode, mode, QtHandles::NoMode, QtHandles::pan_mode(), QtHandles::PanMode, axes::properties::pixel2coord(), gh_manager::post_callback(), QtHandles::Canvas::redraw(), axes::properties::rotate3d(), QtHandles::RotateMode, QtHandles::Canvas::select_object(), string, QtHandles::TextMode, QtHandles::Backend::toolkitObject(), axes::properties::translate_view(), QtHandles::Canvas::updateCurrentPoint(), QtHandles::Figure::updateStatusBar(), graphics_object::valid_object(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by mouseMoveEvent().
|
protectedinherited |
Definition at line 594 of file Canvas.cc.
References octave_handle::as_octave_value(), QtHandles::autoscale_axes(), QtHandles::button_number(), QtHandles::ContextMenu::executeAt(), QtHandles::Utils::figureSelectionType(), graphics_object::get(), graphics_object::get_ancestor(), graphics_object::get_handle(), gh_manager::get_object(), graphics_object::get_parent(), graphics_object::get_properties(), octave_value::isempty(), QtHandles::Canvas::m_clickMode, QtHandles::Canvas::m_handle, QtHandles::Canvas::m_mouseAnchor, QtHandles::Canvas::m_mouseAxes, QtHandles::Canvas::m_mouseCurrent, QtHandles::Canvas::m_mouseMode, QtHandles::Canvas::m_rectMode, QtHandles::Figure::mouseMode(), QtHandles::NoMode, QtHandles::PanMode, gh_manager::post_callback(), gh_manager::post_set(), QtHandles::Canvas::redraw(), QtHandles::RotateMode, QtHandles::Canvas::select_object(), QtHandles::TextMode, QtHandles::Backend::toolkitObject(), QtHandles::Canvas::updateCurrentPoint(), graphics_object::valid_object(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by QtHandles::Canvas::canvasMouseDoubleClickEvent(), and mousePressEvent().
|
protectedinherited |
Definition at line 804 of file Canvas.cc.
References QtHandles::Canvas::annotation_callback(), octave_handle::as_octave_value(), graphics_object::get(), graphics_object::get_ancestor(), graphics_object::get_handle(), gh_manager::get_object(), annotation_dialog::get_properties(), QtHandles::Canvas::m_clickMode, QtHandles::Canvas::m_handle, QtHandles::Canvas::m_mouseAnchor, QtHandles::Canvas::m_mouseAxes, QtHandles::Canvas::m_mouseMode, QtHandles::Canvas::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(), octave_value_list::prepend(), QtHandles::Canvas::qWidget(), QtHandles::Canvas::redraw(), string, QtHandles::TextMode, QtHandles::Canvas::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 mouseReleaseEvent().
|
protectedinherited |
Definition at line 298 of file Canvas.cc.
References QtHandles::Canvas::draw(), QtHandles::Canvas::drawZoomBox(), QtHandles::Canvas::m_handle, QtHandles::Canvas::m_mouseAnchor, QtHandles::Canvas::m_mouseAxes, QtHandles::Canvas::m_mouseCurrent, QtHandles::Canvas::m_mouseMode, QtHandles::Canvas::m_rectMode, QtHandles::Canvas::m_redrawBlocked, octave_handle::ok(), and QtHandles::ZoomInMode.
Referenced by paintGL().
|
protectedinherited |
Definition at line 195 of file Canvas.cc.
References gh_manager::get_object(), handle, QtHandles::Canvas::redraw(), and graphics_object::valid_object().
Referenced by toggleAxes().
|
protectedinherited |
Definition at line 224 of file Canvas.cc.
References gh_manager::get_object(), handle, QtHandles::Canvas::redraw(), state, string, tmp, and graphics_object::valid_object().
Referenced by toggleGrid().
|
protectedinherited |
Definition at line 903 of file Canvas.cc.
References octave_handle::as_octave_value(), graphics_object::get_ancestor(), base_properties::get_children(), graphics_object::get_handle(), gh_manager::get_object(), graphics_object::get_properties(), i, graphics_object::isa(), QtHandles::Canvas::m_handle, mode, QtHandles::Figure::mouseMode(), QtHandles::NoMode, Array< T >::numel(), axes::properties::pan(), QtHandles::pan_enabled(), QtHandles::pan_mode(), QtHandles::PanMode, QtHandles::Canvas::redraw(), QtHandles::Canvas::selectFromAxes(), string, QtHandles::Backend::toolkitObject(), graphics_object::valid_object(), axes::properties::zoom(), QtHandles::zoom_enabled(), QtHandles::zoom_mode(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by wheelEvent().
|
inlineinherited |
Definition at line 63 of file Canvas.h.
References QtHandles::Canvas::m_eventMask.
Referenced by QtHandles::Figure::update().
|
staticinherited |
Definition at line 1057 of file Canvas.cc.
References handle.
Referenced by QtHandles::Container::canvas().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 77 of file GLCanvas.cc.
References begin_rendering(), octave::opengl_renderer::draw(), end_rendering(), graphics_object::get(), gh_manager::get_object(), octave::opengl_renderer::get_pixels(), gh, graphics_object::isa(), octave_value::matrix_value(), retval, octave::opengl_renderer::set_viewport(), and octave_value::string_value().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 123 of file GLCanvas.cc.
References begin_rendering(), e, end_rendering(), error(), graphics_object::get_ancestor(), gh_manager::get_object(), octave::gl2ps_print(), handle, octave_link::post_exception(), and graphics_object::valid_object().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 62 of file GLCanvas.cc.
References octave::opengl_renderer::draw(), gh_manager::get_object(), gh, and octave::opengl_renderer::set_viewport().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 195 of file GLCanvas.cc.
References QtHandles::glDrawZoomBox().
|
private |
Definition at line 311 of file GLCanvas.cc.
Referenced by do_getPixels(), and do_print().
|
inlinevirtualinherited |
Definition at line 77 of file Canvas.h.
References QtHandles::Canvas::do_getPixels(), and QtHandles::Canvas::m_handle.
Referenced by QtHandles::Figure::slotGetPixels().
|
protected |
Definition at line 266 of file GLCanvas.cc.
References QtHandles::Canvas::canvasKeyPressEvent().
|
protected |
Definition at line 273 of file GLCanvas.cc.
References QtHandles::Canvas::canvasKeyReleaseEvent().
|
protected |
Definition at line 236 of file GLCanvas.cc.
References QtHandles::Canvas::canvasMouseDoubleClickEvent().
|
protected |
Definition at line 242 of file GLCanvas.cc.
References QtHandles::Canvas::canvasMouseMoveEvent().
|
protected |
Definition at line 248 of file GLCanvas.cc.
References QtHandles::Canvas::canvasMousePressEvent().
|
protected |
Definition at line 254 of file GLCanvas.cc.
References QtHandles::Canvas::canvasMouseReleaseEvent().
|
protected |
Definition at line 230 of file GLCanvas.cc.
References QtHandles::Canvas::canvasPaintEvent().
|
inlineinherited |
Definition at line 57 of file Canvas.h.
References QtHandles::Canvas::do_print(), and QtHandles::Canvas::m_handle.
Referenced by QtHandles::Figure::print().
|
inlinevirtual |
Implements QtHandles::Canvas.
Definition at line 66 of file GLCanvas.h.
Definition at line 53 of file Canvas.cc.
References QtHandles::Canvas::qWidget(), and Faddeeva::w().
Referenced by QtHandles::Canvas::annotation_callback(), QtHandles::Canvas::canvasAutoAxes(), QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), QtHandles::Canvas::canvasToggleAxes(), QtHandles::Canvas::canvasToggleGrid(), QtHandles::Canvas::canvasWheelEvent(), QtHandles::Panel::redraw(), QtHandles::ButtonGroup::redraw(), and QtHandles::Figure::redraw().
|
inlinevirtual |
Implements QtHandles::Canvas.
Definition at line 62 of file GLCanvas.h.
|
protectedinherited |
Definition at line 360 of file Canvas.cc.
References graphics_object::get(), base_properties::get_all_children(), base_properties::get_boundingbox(), gh_manager::get_object(), graphics_object::get_properties(), base_properties::get_xlim(), base_properties::get_ylim(), i, graphics_object::isa(), octave_value::matrix_value(), Array< T >::numel(), p, axes::properties::pixel2coord(), QtHandles::Canvas::selectFromAxes(), and octave_value::string_value().
Referenced by QtHandles::Canvas::canvasMouseMoveEvent(), and QtHandles::Canvas::canvasMousePressEvent().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 168 of file GLCanvas.cc.
References s, and octave::select_ignore_hittest.
|
inherited |
Definition at line 73 of file Canvas.cc.
References mode, QtHandles::PanMode, QtHandles::Canvas::qWidget(), QtHandles::RotateMode, Faddeeva::w(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by QtHandles::Figure::setMouseMode().
|
inlineinherited |
Definition at line 64 of file Canvas.h.
References QtHandles::Canvas::m_eventMask.
Referenced by QtHandles::Figure::Figure().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 150 of file GLCanvas.cc.
References QtHandles::Canvas::canvasToggleAxes(), and gh.
|
virtual |
Implements QtHandles::Canvas.
Definition at line 156 of file GLCanvas.cc.
References QtHandles::Canvas::canvasToggleGrid(), and gh.
|
protectedinherited |
Definition at line 109 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(), i, graphics_object::isa(), gh_manager::post_set(), and graphics_xform::untransform().
Referenced by QtHandles::Canvas::canvasKeyPressEvent(), QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), and QtHandles::Canvas::canvasMouseReleaseEvent().
|
protectedinherited |
Definition at line 147 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(), i, graphics_object::isa(), p, gh_manager::post_set(), QtHandles::Canvas::qWidget(), graphics_xform::untransform(), and Faddeeva::w().
|
protected |
Definition at line 260 of file GLCanvas.cc.
References QtHandles::Canvas::canvasWheelEvent().