#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 |
GLCanvas::GLCanvas | ( | octave::base_qobject & | oct_qobj, |
octave::interpreter & | interp, | ||
const graphics_handle & | handle, | ||
QWidget * | parent | ||
) |
Definition at line 53 of file GLCanvas.cc.
GLCanvas::~GLCanvas | ( | void | ) |
Definition at line 63 of file GLCanvas.cc.
|
inlineinherited |
Definition at line 71 of file Canvas.h.
References m, and Canvas::m_eventMask.
Referenced by Panel::Panel(), and Figure::update().
|
private |
Definition at line 288 of file GLCanvas.cc.
Referenced by do_getPixels(), and do_print().
|
inherited |
Definition at line 71 of file Canvas.cc.
References Canvas::m_redrawBlocked.
Referenced by Figure::beingDeleted().
|
protectedinherited |
|
protectedinherited |
Definition at line 1033 of file Canvas.cc.
References octave_scalar_map::getfield(), Canvas::gh_callback_event(), Canvas::gh_set_event(), Canvas::KeyPress, Canvas::m_eventMask, Canvas::m_handle, Canvas::m_interpreter, Utils::makeKeyEventStruct(), and Canvas::updateCurrentPoint().
Referenced by keyPressEvent().
|
protectedinherited |
Definition at line 1064 of file Canvas.cc.
References Canvas::gh_callback_event(), Canvas::KeyRelease, Canvas::m_eventMask, Canvas::m_handle, Canvas::m_interpreter, and Utils::makeKeyEventStruct().
Referenced by keyReleaseEvent().
|
protectedinherited |
Definition at line 541 of file Canvas.cc.
References Canvas::canvasMousePressEvent().
Referenced by mouseDoubleClickEvent().
|
protectedinherited |
Definition at line 439 of file Canvas.cc.
References Canvas::gh_callback_event(), Canvas::m_handle, Canvas::m_interpreter, Canvas::m_mouseAxes, Canvas::m_mouseCurrent, Canvas::m_mouseMode, NoMode, pan_mode(), PanMode, Utils::properties(), Canvas::redraw(), RotateMode, Canvas::select_object(), TextMode, qt_graphics_toolkit::toolkitObject(), Canvas::updateCurrentPoint(), Figure::updateStatusBar(), ZoomInMode, and ZoomOutMode.
Referenced by mouseMoveEvent().
|
protectedinherited |
Definition at line 574 of file Canvas.cc.
References autoscale_axes(), button_number(), ContextMenu::executeAt(), Utils::figureSelectionType(), Canvas::gh_callback_event(), Canvas::gh_set_event(), Canvas::m_clickMode, Canvas::m_handle, Canvas::m_interpreter, Canvas::m_mouseAnchor, Canvas::m_mouseAxes, Canvas::m_mouseCurrent, Canvas::m_mouseMode, Canvas::m_rectMode, Figure::mouseMode(), NoMode, PanMode, Utils::properties(), Canvas::redraw(), RotateMode, Canvas::select_object(), TextMode, qt_graphics_toolkit::toolkitObject(), Canvas::updateCurrentPoint(), ZoomInMode, and ZoomOutMode.
Referenced by Canvas::canvasMouseDoubleClickEvent(), and mousePressEvent().
|
protectedinherited |
Definition at line 787 of file Canvas.cc.
References annotation_dialog::get_properties(), Canvas::gh_callback_event(), Canvas::interpreter_event(), Canvas::m_clickMode, Canvas::m_handle, Canvas::m_interpreter, Canvas::m_mouseAnchor, Canvas::m_mouseAxes, Canvas::m_mouseMode, Canvas::m_octave_qobj, Canvas::m_rectMode, max(), min(), NoMode, octave_handle::ok(), ovl(), octave_value_list::prepend(), Utils::properties(), Canvas::qWidget(), Canvas::redraw(), TextMode, Canvas::updateCurrentPoint(), Faddeeva::w(), zoom_mode(), ZoomInMode, and ZoomOutMode.
Referenced by mouseReleaseEvent().
|
protectedinherited |
Definition at line 275 of file Canvas.cc.
References Canvas::draw(), Canvas::drawZoomBox(), Canvas::m_handle, Canvas::m_interpreter, Canvas::m_mouseAnchor, Canvas::m_mouseAxes, Canvas::m_mouseCurrent, Canvas::m_mouseMode, Canvas::m_rectMode, Canvas::m_redrawBlocked, octave_handle::ok(), and ZoomInMode.
Referenced by paintGL().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Definition at line 897 of file Canvas.cc.
References Canvas::gh_callback_event(), Canvas::m_handle, Canvas::m_interpreter, Utils::makeScrollEventStruct(), Figure::mouseMode(), NoMode, Array< T, Alloc >::numel(), pan_enabled(), pan_mode(), PanMode, Utils::properties(), Canvas::redraw(), Canvas::selectFromAxes(), qt_graphics_toolkit::toolkitObject(), zoom_enabled(), zoom_mode(), ZoomInMode, and ZoomOutMode.
Referenced by wheelEvent().
|
inlineinherited |
Definition at line 72 of file Canvas.h.
References m, and Canvas::m_eventMask.
Referenced by Figure::update().
|
staticinherited |
Definition at line 1088 of file Canvas.cc.
Referenced by Container::canvas().
|
virtual |
Implements Canvas.
Definition at line 92 of file GLCanvas.cc.
References begin_rendering(), end_rendering(), Canvas::m_interpreter, and m_renderer.
|
virtual |
Implements Canvas.
Definition at line 145 of file GLCanvas.cc.
References begin_rendering(), end_rendering(), error(), gl2ps_print(), Canvas::interpreter_event(), m_glfcns, and Canvas::m_interpreter.
|
virtual |
Implements Canvas.
Definition at line 73 of file GLCanvas.cc.
References Canvas::m_interpreter, and m_renderer.
|
virtual |
|
private |
Definition at line 319 of file GLCanvas.cc.
Referenced by do_getPixels(), and do_print().
|
inlinevirtualinherited |
Definition at line 85 of file Canvas.h.
References Canvas::do_getPixels(), and Canvas::m_handle.
Referenced by Figure::slotGetPixels().
|
signalinherited |
|
signalinherited |
|
signalinherited |
Referenced by Canvas::canvasKeyPressEvent(), Canvas::canvasMousePressEvent(), and Canvas::updateCurrentPoint().
|
signalinherited |
|
signalinherited |
void GLCanvas::initializeGL | ( | void | ) |
Definition at line 67 of file GLCanvas.cc.
References m_glfcns.
|
signalinherited |
Referenced by Container::canvas(), Canvas::canvasMouseReleaseEvent(), and do_print().
|
signalinherited |
|
protected |
Definition at line 274 of file GLCanvas.cc.
References Canvas::canvasKeyPressEvent().
|
protected |
Definition at line 281 of file GLCanvas.cc.
References Canvas::canvasKeyReleaseEvent().
|
privateinherited |
Definition at line 77 of file Canvas.cc.
References Canvas::m_octave_qobj.
Referenced by Canvas::setCursor().
|
protected |
Definition at line 244 of file GLCanvas.cc.
References Canvas::canvasMouseDoubleClickEvent().
|
protected |
Definition at line 250 of file GLCanvas.cc.
References Canvas::canvasMouseMoveEvent().
|
protected |
Definition at line 256 of file GLCanvas.cc.
References Canvas::canvasMousePressEvent().
|
protected |
Definition at line 262 of file GLCanvas.cc.
References Canvas::canvasMouseReleaseEvent().
|
protected |
Definition at line 238 of file GLCanvas.cc.
References Canvas::canvasPaintEvent().
|
inlineinherited |
Definition at line 66 of file Canvas.h.
References Canvas::do_print(), and Canvas::m_handle.
Referenced by Figure::print().
|
inlinevirtual |
Implements Canvas.
Definition at line 77 of file GLCanvas.h.
|
inherited |
Definition at line 57 of file Canvas.cc.
References Canvas::qWidget(), and Faddeeva::w().
Referenced by Canvas::canvasMouseMoveEvent(), Canvas::canvasMousePressEvent(), Canvas::canvasMouseReleaseEvent(), Canvas::canvasWheelEvent(), ButtonGroup::redraw(), Figure::redraw(), and Panel::redraw().
|
inlinevirtual |
Implements Canvas.
Definition at line 73 of file GLCanvas.h.
|
protectedinherited |
Definition at line 339 of file Canvas.cc.
References Canvas::m_interpreter, Array< T, Alloc >::numel(), Utils::properties(), r, and Canvas::selectFromAxes().
Referenced by Canvas::canvasMouseMoveEvent(), and Canvas::canvasMousePressEvent().
|
virtual |
Implements Canvas.
Definition at line 203 of file GLCanvas.cc.
References m_glfcns, and select_ignore_hittest.
|
inherited |
Definition at line 87 of file Canvas.cc.
References Canvas::make_cursor(), Matrix, NoMode, PanMode, Canvas::qWidget(), RotateMode, SelectMode, TextMode, Faddeeva::w(), ZoomInMode, and ZoomOutMode.
Referenced by Figure::update().
|
inlineinherited |
Definition at line 73 of file Canvas.h.
References m, and Canvas::m_eventMask.
Referenced by Figure::Figure().
|
protectedinherited |
Definition at line 220 of file Canvas.cc.
References Utils::figureCurrentPoint(), Canvas::gh_set_event(), Canvas::m_interpreter, Array< T, Alloc >::numel(), Utils::properties(), Canvas::qWidget(), and Faddeeva::w().
|
protectedinherited |
Definition at line 180 of file Canvas.cc.
References Utils::figureCurrentPoint(), Canvas::gh_set_event(), Canvas::m_interpreter, Array< T, Alloc >::numel(), and Utils::properties().
Referenced by Canvas::canvasKeyPressEvent(), Canvas::canvasMouseMoveEvent(), Canvas::canvasMousePressEvent(), and Canvas::canvasMouseReleaseEvent().
|
protected |
Definition at line 268 of file GLCanvas.cc.
References Canvas::canvasWheelEvent().
|
privateinherited |
Definition at line 162 of file Canvas.h.
Referenced by Canvas::canvasMousePressEvent(), and Canvas::canvasMouseReleaseEvent().
|
privateinherited |
Definition at line 166 of file Canvas.h.
Referenced by Canvas::addEventMask(), Canvas::canvasKeyPressEvent(), Canvas::canvasKeyReleaseEvent(), Canvas::clearEventMask(), and Canvas::setEventMask().
|
private |
Definition at line 94 of file GLCanvas.h.
Referenced by do_print(), initializeGL(), and selectFromAxes().
|
privateinherited |
Definition at line 159 of file Canvas.h.
Referenced by Canvas::canvasKeyPressEvent(), Canvas::canvasKeyReleaseEvent(), Canvas::canvasMouseMoveEvent(), Canvas::canvasMousePressEvent(), Canvas::canvasMouseReleaseEvent(), Canvas::canvasPaintEvent(), Canvas::canvasWheelEvent(), Canvas::getPixels(), and Canvas::print().
|
protectedinherited |
Definition at line 153 of file Canvas.h.
Referenced by Canvas::canvasKeyPressEvent(), Canvas::canvasKeyReleaseEvent(), Canvas::canvasMouseMoveEvent(), Canvas::canvasMousePressEvent(), Canvas::canvasMouseReleaseEvent(), Canvas::canvasPaintEvent(), Canvas::canvasWheelEvent(), do_getPixels(), do_print(), draw(), Canvas::select_object(), and Canvas::updateCurrentPoint().
|
privateinherited |
Definition at line 163 of file Canvas.h.
Referenced by Canvas::canvasMousePressEvent(), Canvas::canvasMouseReleaseEvent(), and Canvas::canvasPaintEvent().
|
privateinherited |
Definition at line 165 of file Canvas.h.
Referenced by Canvas::canvasMouseMoveEvent(), Canvas::canvasMousePressEvent(), Canvas::canvasMouseReleaseEvent(), and Canvas::canvasPaintEvent().
|
privateinherited |
Definition at line 164 of file Canvas.h.
Referenced by Canvas::canvasMouseMoveEvent(), Canvas::canvasMousePressEvent(), and Canvas::canvasPaintEvent().
|
privateinherited |
Definition at line 161 of file Canvas.h.
Referenced by Canvas::canvasMouseMoveEvent(), Canvas::canvasMousePressEvent(), Canvas::canvasMouseReleaseEvent(), and Canvas::canvasPaintEvent().
|
protectedinherited |
Definition at line 152 of file Canvas.h.
Referenced by Canvas::canvasMouseReleaseEvent(), and Canvas::make_cursor().
|
privateinherited |
Definition at line 167 of file Canvas.h.
Referenced by Canvas::canvasMousePressEvent(), Canvas::canvasMouseReleaseEvent(), and Canvas::canvasPaintEvent().
|
privateinherited |
Definition at line 160 of file Canvas.h.
Referenced by Canvas::blockRedraw(), and Canvas::canvasPaintEvent().
|
private |
Definition at line 95 of file GLCanvas.h.
Referenced by do_getPixels(), draw(), and drawZoomBox().