#include "GLCanvas.h"
Public Types | |
enum | EventMask { KeyPress = 0x01 , KeyRelease = 0x02 } |
Signals | |
void | gh_callback_event (const graphics_handle &h, const std::string &name) |
void | gh_callback_event (const graphics_handle &h, const std::string &name, const octave_value &data) |
void | gh_set_event (const graphics_handle &h, const std::string &name, const octave_value &value) |
void | gh_set_event (const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit) |
void | gh_set_event (const graphics_handle &h, const std::string &name, const octave_value &value, bool notify_toolkit, bool redraw_figure) |
void | interpreter_event (const octave::fcn_callback &fcn) |
void | interpreter_event (const octave::meth_callback &meth) |
Public Member Functions | |
GLCanvas (octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_handle &handle, QWidget *parent) | |
~GLCanvas (void) | |
void | addEventMask (int m) |
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 | initializeGL (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, std::string fallback, QImage cdata, Matrix hotspot) |
void | setEventMask (int m) |
Static Public Member Functions | |
static Canvas * | create (octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_handle &handle, QWidget *parent, const std::string &name) |
Protected Member Functions | |
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) |
void | updateCurrentPoint (const graphics_object &fig, const graphics_object &obj, QMouseEvent *event) |
void | wheelEvent (QWheelEvent *event) |
Protected Attributes | |
octave::interpreter & | m_interpreter |
octave::base_qobject & | m_octave_qobj |
Private Member Functions | |
bool | begin_rendering (void) |
void | end_rendering (void) |
QCursor | make_cursor (const QString &name, int hot_x=-1, int hot_y=-1) |
Private Attributes | |
bool | m_clickMode |
int | m_eventMask |
octave::qopengl_functions | m_glfcns |
graphics_handle | m_handle |
QPoint | m_mouseAnchor |
graphics_handle | m_mouseAxes |
QPoint | m_mouseCurrent |
MouseMode | m_mouseMode |
bool | m_rectMode |
bool | m_redrawBlocked |
octave::opengl_renderer | m_renderer |
Definition at line 59 of file GLCanvas.h.
|
inherited |
QtHandles::GLCanvas::GLCanvas | ( | octave::base_qobject & | oct_qobj, |
octave::interpreter & | interp, | ||
const graphics_handle & | handle, | ||
QWidget * | parent | ||
) |
Definition at line 53 of file GLCanvas.cc.
QtHandles::GLCanvas::~GLCanvas | ( | void | ) |
Definition at line 63 of file GLCanvas.cc.
|
inlineinherited |
Definition at line 75 of file Canvas.h.
References m, and QtHandles::Canvas::m_eventMask.
Referenced by QtHandles::Panel::Panel(), and QtHandles::Figure::update().
|
private |
Definition at line 289 of file GLCanvas.cc.
References retval.
Referenced by do_getPixels(), and do_print().
|
inherited |
Definition at line 72 of file Canvas.cc.
References QtHandles::Canvas::m_redrawBlocked.
Referenced by QtHandles::Figure::beingDeleted().
|
protectedinherited |
|
protectedinherited |
Definition at line 1042 of file Canvas.cc.
References graphics_object::get_ancestor(), octave::interpreter::get_gh_manager(), graphics_object::get_handle(), gh_manager::get_object(), octave_scalar_map::getfield(), QtHandles::Canvas::gh_callback_event(), QtHandles::Canvas::gh_set_event(), gh_manager::graphics_lock(), QtHandles::Canvas::KeyPress, QtHandles::Canvas::m_eventMask, QtHandles::Canvas::m_handle, QtHandles::Canvas::m_interpreter, QtHandles::Utils::makeKeyEventStruct(), QtHandles::Canvas::updateCurrentPoint(), and graphics_object::valid_object().
Referenced by keyPressEvent().
|
protectedinherited |
Definition at line 1073 of file Canvas.cc.
References graphics_object::get_ancestor(), octave::interpreter::get_gh_manager(), graphics_object::get_handle(), gh_manager::get_object(), QtHandles::Canvas::gh_callback_event(), gh_manager::graphics_lock(), QtHandles::Canvas::KeyRelease, QtHandles::Canvas::m_eventMask, QtHandles::Canvas::m_handle, QtHandles::Canvas::m_interpreter, QtHandles::Utils::makeKeyEventStruct(), and graphics_object::valid_object().
Referenced by keyReleaseEvent().
|
protectedinherited |
Definition at line 550 of file Canvas.cc.
References QtHandles::Canvas::canvasMousePressEvent().
Referenced by mouseDoubleClickEvent().
|
protectedinherited |
Definition at line 448 of file Canvas.cc.
References graphics_object::get(), graphics_object::get_ancestor(), octave::interpreter::get_gh_manager(), graphics_object::get_handle(), gh_manager::get_object(), QtHandles::Canvas::gh_callback_event(), gh_manager::graphics_lock(), octave_value::isempty(), QtHandles::Canvas::m_handle, QtHandles::Canvas::m_interpreter, QtHandles::Canvas::m_mouseAxes, QtHandles::Canvas::m_mouseCurrent, QtHandles::Canvas::m_mouseMode, QtHandles::NoMode, QtHandles::pan_mode(), QtHandles::PanMode, axes::properties::pixel2coord(), QtHandles::Canvas::redraw(), axes::properties::rotate3d(), QtHandles::RotateMode, QtHandles::Canvas::select_object(), QtHandles::TextMode, QtHandles::qt_graphics_toolkit::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 583 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(), octave::interpreter::get_gh_manager(), graphics_object::get_handle(), gh_manager::get_object(), graphics_object::get_parent(), graphics_object::get_properties(), QtHandles::Canvas::gh_callback_event(), QtHandles::Canvas::gh_set_event(), gh_manager::graphics_lock(), octave_value::isempty(), QtHandles::Canvas::m_clickMode, QtHandles::Canvas::m_handle, QtHandles::Canvas::m_interpreter, 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, QtHandles::Canvas::redraw(), QtHandles::RotateMode, QtHandles::Canvas::select_object(), QtHandles::TextMode, QtHandles::qt_graphics_toolkit::toolkitObject(), QtHandles::Canvas::updateCurrentPoint(), graphics_object::valid_object(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by QtHandles::Canvas::canvasMouseDoubleClickEvent(), and mousePressEvent().
|
protectedinherited |
Definition at line 796 of file Canvas.cc.
References octave_handle::as_octave_value(), octave::interpreter::feval(), graphics_object::get(), graphics_object::get_ancestor(), octave::interpreter::get_gh_manager(), graphics_object::get_handle(), gh_manager::get_object(), annotation_dialog::get_properties(), QtHandles::Canvas::gh_callback_event(), gh_manager::graphics_lock(), QtHandles::Canvas::interpreter_event(), QtHandles::Canvas::m_clickMode, QtHandles::Canvas::m_handle, QtHandles::Canvas::m_interpreter, QtHandles::Canvas::m_mouseAnchor, QtHandles::Canvas::m_mouseAxes, QtHandles::Canvas::m_mouseMode, QtHandles::Canvas::m_octave_qobj, QtHandles::Canvas::m_rectMode, octave_value::matrix_value(), max(), min(), QtHandles::NoMode, octave_handle::ok(), ovl(), axes::properties::pixel2coord(), octave_value_list::prepend(), QtHandles::Canvas::qWidget(), QtHandles::Canvas::redraw(), 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 276 of file Canvas.cc.
References QtHandles::Canvas::draw(), QtHandles::Canvas::drawZoomBox(), octave::interpreter::get_gh_manager(), gh_manager::graphics_lock(), QtHandles::Canvas::m_handle, QtHandles::Canvas::m_interpreter, 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 |
|
protectedinherited |
|
protectedinherited |
Definition at line 906 of file Canvas.cc.
References octave_handle::as_octave_value(), graphics_object::get(), graphics_object::get_ancestor(), base_properties::get_children(), octave::interpreter::get_gh_manager(), graphics_object::get_handle(), gh_manager::get_object(), graphics_object::get_properties(), QtHandles::Canvas::gh_callback_event(), gh_manager::graphics_lock(), graphics_object::isa(), octave_value::isempty(), QtHandles::Canvas::m_handle, QtHandles::Canvas::m_interpreter, QtHandles::Utils::makeScrollEventStruct(), 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(), QtHandles::qt_graphics_toolkit::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 76 of file Canvas.h.
References m, and QtHandles::Canvas::m_eventMask.
Referenced by QtHandles::Figure::update().
|
staticinherited |
Definition at line 1097 of file Canvas.cc.
Referenced by QtHandles::Container::canvas().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 92 of file GLCanvas.cc.
References begin_rendering(), octave_value::double_value(), octave::opengl_renderer::draw(), end_rendering(), graphics_object::get(), octave::interpreter::get_gh_manager(), gh_manager::get_object(), octave::opengl_renderer::get_pixels(), graphics_object::isa(), QtHandles::Canvas::m_interpreter, m_renderer, octave_value::matrix_value(), retval, octave::opengl_renderer::set_device_pixel_ratio(), octave::opengl_renderer::set_viewport(), and octave_value::string_value().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 145 of file GLCanvas.cc.
References begin_rendering(), octave_value::double_value(), end_rendering(), error(), graphics_object::get(), graphics_object::get_ancestor(), octave::interpreter::get_gh_manager(), gh_manager::get_object(), octave::gl2ps_print(), gh_manager::graphics_lock(), QtHandles::Canvas::interpreter_event(), m_glfcns, QtHandles::Canvas::m_interpreter, octave_value::matrix_value(), octave_value::string_value(), and graphics_object::valid_object().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 73 of file GLCanvas.cc.
References octave_value::double_value(), octave::opengl_renderer::draw(), graphics_object::get(), graphics_object::get_ancestor(), octave::interpreter::get_gh_manager(), gh_manager::get_object(), gh_manager::graphics_lock(), QtHandles::Canvas::m_interpreter, m_renderer, octave::opengl_renderer::set_device_pixel_ratio(), and octave::opengl_renderer::set_viewport().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 221 of file GLCanvas.cc.
References octave::opengl_renderer::draw_zoom_box(), and m_renderer.
|
private |
Definition at line 320 of file GLCanvas.cc.
Referenced by do_getPixels(), and do_print().
|
inlinevirtualinherited |
Definition at line 89 of file Canvas.h.
References QtHandles::Canvas::do_getPixels(), and QtHandles::Canvas::m_handle.
Referenced by QtHandles::Figure::slotGetPixels().
|
signalinherited |
|
signalinherited |
|
signalinherited |
|
signalinherited |
|
signalinherited |
void QtHandles::GLCanvas::initializeGL | ( | void | ) |
Definition at line 67 of file GLCanvas.cc.
References octave::qopengl_functions::init(), and m_glfcns.
|
signalinherited |
Referenced by QtHandles::Canvas::canvasMouseReleaseEvent(), and do_print().
|
signalinherited |
|
protected |
Definition at line 275 of file GLCanvas.cc.
References QtHandles::Canvas::canvasKeyPressEvent().
|
protected |
Definition at line 282 of file GLCanvas.cc.
References QtHandles::Canvas::canvasKeyReleaseEvent().
|
privateinherited |
Definition at line 78 of file Canvas.cc.
References octave::base_qobject::get_resource_manager(), octave::resource_manager::icon(), QtHandles::Canvas::m_octave_qobj, and name.
Referenced by QtHandles::Canvas::setCursor().
|
protected |
Definition at line 245 of file GLCanvas.cc.
References QtHandles::Canvas::canvasMouseDoubleClickEvent().
|
protected |
Definition at line 251 of file GLCanvas.cc.
References QtHandles::Canvas::canvasMouseMoveEvent().
|
protected |
Definition at line 257 of file GLCanvas.cc.
References QtHandles::Canvas::canvasMousePressEvent().
|
protected |
Definition at line 263 of file GLCanvas.cc.
References QtHandles::Canvas::canvasMouseReleaseEvent().
|
protected |
Definition at line 239 of file GLCanvas.cc.
References QtHandles::Canvas::canvasPaintEvent().
|
inlineinherited |
Definition at line 70 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 77 of file GLCanvas.h.
|
inherited |
Definition at line 58 of file Canvas.cc.
References QtHandles::Canvas::qWidget(), and Faddeeva::w().
Referenced by QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), QtHandles::Canvas::canvasWheelEvent(), QtHandles::ButtonGroup::redraw(), QtHandles::Figure::redraw(), and QtHandles::Panel::redraw().
|
inlinevirtual |
Implements QtHandles::Canvas.
Definition at line 73 of file GLCanvas.h.
|
protectedinherited |
Definition at line 340 of file Canvas.cc.
References graphics_object::get(), base_properties::get_all_children(), base_properties::get_boundingbox(), octave::interpreter::get_gh_manager(), gh_manager::get_object(), graphics_object::get_properties(), base_properties::get_xlim(), base_properties::get_ylim(), graphics_object::isa(), QtHandles::Canvas::m_interpreter, octave_value::matrix_value(), Array< T >::numel(), axes::properties::pixel2coord(), r, QtHandles::Canvas::selectFromAxes(), and octave_value::string_value().
Referenced by QtHandles::Canvas::canvasMouseMoveEvent(), and QtHandles::Canvas::canvasMousePressEvent().
|
virtual |
Implements QtHandles::Canvas.
Definition at line 204 of file GLCanvas.cc.
References m_glfcns, octave::opengl_selector::select(), octave::select_ignore_hittest, and octave::opengl_renderer::set_viewport().
|
inherited |
Definition at line 88 of file Canvas.cc.
References QtHandles::Canvas::make_cursor(), QtHandles::NoMode, QtHandles::PanMode, QtHandles::Canvas::qWidget(), QtHandles::RotateMode, QtHandles::SelectMode, QtHandles::TextMode, Faddeeva::w(), QtHandles::ZoomInMode, and QtHandles::ZoomOutMode.
Referenced by QtHandles::Figure::update().
|
inlineinherited |
Definition at line 77 of file Canvas.h.
References m, and QtHandles::Canvas::m_eventMask.
Referenced by QtHandles::Figure::Figure().
|
protectedinherited |
Definition at line 221 of file Canvas.cc.
References QtHandles::Utils::figureCurrentPoint(), base_properties::get_children(), octave::interpreter::get_gh_manager(), graphics_object::get_handle(), gh_manager::get_object(), graphics_object::get_properties(), axes::properties::get_transform(), axes::properties::get_transform_zlim(), QtHandles::Canvas::gh_set_event(), gh_manager::graphics_lock(), graphics_object::isa(), QtHandles::Canvas::m_interpreter, Array< T >::numel(), QtHandles::Canvas::qWidget(), graphics_xform::untransform(), and Faddeeva::w().
|
protectedinherited |
Definition at line 181 of file Canvas.cc.
References QtHandles::Utils::figureCurrentPoint(), base_properties::get_children(), octave::interpreter::get_gh_manager(), graphics_object::get_handle(), gh_manager::get_object(), graphics_object::get_properties(), axes::properties::get_transform(), axes::properties::get_transform_zlim(), QtHandles::Canvas::gh_set_event(), gh_manager::graphics_lock(), graphics_object::isa(), QtHandles::Canvas::m_interpreter, Array< T >::numel(), and graphics_xform::untransform().
Referenced by QtHandles::Canvas::canvasKeyPressEvent(), QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), and QtHandles::Canvas::canvasMouseReleaseEvent().
|
protected |
Definition at line 269 of file GLCanvas.cc.
References QtHandles::Canvas::canvasWheelEvent().
|
privateinherited |
Definition at line 166 of file Canvas.h.
Referenced by QtHandles::Canvas::canvasMousePressEvent(), and QtHandles::Canvas::canvasMouseReleaseEvent().
|
privateinherited |
Definition at line 170 of file Canvas.h.
Referenced by QtHandles::Canvas::addEventMask(), QtHandles::Canvas::canvasKeyPressEvent(), QtHandles::Canvas::canvasKeyReleaseEvent(), QtHandles::Canvas::clearEventMask(), and QtHandles::Canvas::setEventMask().
|
private |
Definition at line 94 of file GLCanvas.h.
Referenced by do_print(), initializeGL(), and selectFromAxes().
|
privateinherited |
Definition at line 163 of file Canvas.h.
Referenced by QtHandles::Canvas::canvasKeyPressEvent(), QtHandles::Canvas::canvasKeyReleaseEvent(), QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), QtHandles::Canvas::canvasPaintEvent(), QtHandles::Canvas::canvasWheelEvent(), QtHandles::Canvas::getPixels(), and QtHandles::Canvas::print().
|
protectedinherited |
Definition at line 157 of file Canvas.h.
Referenced by QtHandles::Canvas::canvasKeyPressEvent(), QtHandles::Canvas::canvasKeyReleaseEvent(), QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), QtHandles::Canvas::canvasPaintEvent(), QtHandles::Canvas::canvasWheelEvent(), do_getPixels(), do_print(), draw(), QtHandles::Canvas::select_object(), and QtHandles::Canvas::updateCurrentPoint().
|
privateinherited |
Definition at line 167 of file Canvas.h.
Referenced by QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), and QtHandles::Canvas::canvasPaintEvent().
|
privateinherited |
Definition at line 169 of file Canvas.h.
Referenced by QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), and QtHandles::Canvas::canvasPaintEvent().
|
privateinherited |
Definition at line 168 of file Canvas.h.
Referenced by QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), and QtHandles::Canvas::canvasPaintEvent().
|
privateinherited |
Definition at line 165 of file Canvas.h.
Referenced by QtHandles::Canvas::canvasMouseMoveEvent(), QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), and QtHandles::Canvas::canvasPaintEvent().
|
protectedinherited |
Definition at line 156 of file Canvas.h.
Referenced by QtHandles::Canvas::canvasMouseReleaseEvent(), and QtHandles::Canvas::make_cursor().
|
privateinherited |
Definition at line 171 of file Canvas.h.
Referenced by QtHandles::Canvas::canvasMousePressEvent(), QtHandles::Canvas::canvasMouseReleaseEvent(), and QtHandles::Canvas::canvasPaintEvent().
|
privateinherited |
Definition at line 164 of file Canvas.h.
Referenced by QtHandles::Canvas::blockRedraw(), and QtHandles::Canvas::canvasPaintEvent().
|
private |
Definition at line 95 of file GLCanvas.h.
Referenced by do_getPixels(), draw(), and drawZoomBox().