GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
QtHandles::GLCanvas Class Reference

#include "GLCanvas.h"

Inheritance diagram for QtHandles::GLCanvas:
Collaboration diagram for QtHandles::GLCanvas:

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)
 
QWidgetqWidget (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 Canvascreate (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 &currentObj, 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::interpreterm_interpreter
 
octave::base_qobjectm_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
 

Detailed Description

Definition at line 59 of file GLCanvas.h.

Member Enumeration Documentation

◆ EventMask

Enumerator
KeyPress 
KeyRelease 

Definition at line 58 of file Canvas.h.

Constructor & Destructor Documentation

◆ GLCanvas()

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.

◆ ~GLCanvas()

QtHandles::GLCanvas::~GLCanvas ( void  )

Definition at line 63 of file GLCanvas.cc.

Member Function Documentation

◆ addEventMask()

void QtHandles::Canvas::addEventMask ( int  m)
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().

◆ begin_rendering()

bool QtHandles::GLCanvas::begin_rendering ( void  )
private

Definition at line 289 of file GLCanvas.cc.

References retval.

Referenced by do_getPixels(), and do_print().

◆ blockRedraw()

void QtHandles::Canvas::blockRedraw ( bool  block = true)
inherited

Definition at line 72 of file Canvas.cc.

References QtHandles::Canvas::m_redrawBlocked.

Referenced by QtHandles::Figure::beingDeleted().

◆ canvasAutoAxes()

void QtHandles::Canvas::canvasAutoAxes ( const graphics_handle handle)
protectedinherited

◆ canvasKeyPressEvent()

◆ canvasKeyReleaseEvent()

◆ canvasMouseDoubleClickEvent()

void QtHandles::Canvas::canvasMouseDoubleClickEvent ( QMouseEvent *  event)
protectedinherited

Definition at line 550 of file Canvas.cc.

References QtHandles::Canvas::canvasMousePressEvent().

Referenced by mouseDoubleClickEvent().

◆ canvasMouseMoveEvent()

◆ canvasMousePressEvent()

◆ canvasMouseReleaseEvent()

◆ canvasPaintEvent()

◆ canvasToggleAxes()

void QtHandles::Canvas::canvasToggleAxes ( const graphics_handle handle)
protectedinherited

◆ canvasToggleGrid()

void QtHandles::Canvas::canvasToggleGrid ( const graphics_handle handle)
protectedinherited

◆ canvasWheelEvent()

◆ clearEventMask()

void QtHandles::Canvas::clearEventMask ( int  m)
inlineinherited

Definition at line 76 of file Canvas.h.

References m, and QtHandles::Canvas::m_eventMask.

Referenced by QtHandles::Figure::update().

◆ create()

Canvas * QtHandles::Canvas::create ( octave::base_qobject oct_qobj,
octave::interpreter interp,
const graphics_handle handle,
QWidget parent,
const std::string &  name 
)
staticinherited

Definition at line 1097 of file Canvas.cc.

Referenced by QtHandles::Container::canvas().

◆ do_getPixels()

◆ do_print()

◆ draw()

◆ drawZoomBox()

void QtHandles::GLCanvas::drawZoomBox ( const QPoint &  p1,
const QPoint &  p2 
)
virtual

Implements QtHandles::Canvas.

Definition at line 221 of file GLCanvas.cc.

References octave::opengl_renderer::draw_zoom_box(), and m_renderer.

◆ end_rendering()

void QtHandles::GLCanvas::end_rendering ( void  )
private

Definition at line 320 of file GLCanvas.cc.

Referenced by do_getPixels(), and do_print().

◆ getPixels()

virtual uint8NDArray QtHandles::Canvas::getPixels ( void  )
inlinevirtualinherited

◆ gh_callback_event [1/2]

◆ gh_callback_event [2/2]

void QtHandles::Canvas::gh_callback_event ( const graphics_handle h,
const std::string &  name,
const octave_value data 
)
signalinherited

◆ gh_set_event [1/3]

void QtHandles::Canvas::gh_set_event ( const graphics_handle h,
const std::string &  name,
const octave_value value 
)
signalinherited

◆ gh_set_event [2/3]

void QtHandles::Canvas::gh_set_event ( const graphics_handle h,
const std::string &  name,
const octave_value value,
bool  notify_toolkit 
)
signalinherited

◆ gh_set_event [3/3]

void QtHandles::Canvas::gh_set_event ( const graphics_handle h,
const std::string &  name,
const octave_value value,
bool  notify_toolkit,
bool  redraw_figure 
)
signalinherited

◆ initializeGL()

void QtHandles::GLCanvas::initializeGL ( void  )

Definition at line 67 of file GLCanvas.cc.

References octave::qopengl_functions::init(), and m_glfcns.

◆ interpreter_event [1/2]

void QtHandles::Canvas::interpreter_event ( const octave::fcn_callback fcn)
signalinherited

◆ interpreter_event [2/2]

void QtHandles::Canvas::interpreter_event ( const octave::meth_callback meth)
signalinherited

◆ keyPressEvent()

void QtHandles::GLCanvas::keyPressEvent ( QKeyEvent *  event)
protected

Definition at line 275 of file GLCanvas.cc.

References QtHandles::Canvas::canvasKeyPressEvent().

◆ keyReleaseEvent()

void QtHandles::GLCanvas::keyReleaseEvent ( QKeyEvent *  event)
protected

Definition at line 282 of file GLCanvas.cc.

References QtHandles::Canvas::canvasKeyReleaseEvent().

◆ make_cursor()

QCursor QtHandles::Canvas::make_cursor ( const QString &  name,
int  hot_x = -1,
int  hot_y = -1 
)
privateinherited

◆ mouseDoubleClickEvent()

void QtHandles::GLCanvas::mouseDoubleClickEvent ( QMouseEvent *  event)
protected

Definition at line 245 of file GLCanvas.cc.

References QtHandles::Canvas::canvasMouseDoubleClickEvent().

◆ mouseMoveEvent()

void QtHandles::GLCanvas::mouseMoveEvent ( QMouseEvent *  event)
protected

Definition at line 251 of file GLCanvas.cc.

References QtHandles::Canvas::canvasMouseMoveEvent().

◆ mousePressEvent()

void QtHandles::GLCanvas::mousePressEvent ( QMouseEvent *  event)
protected

Definition at line 257 of file GLCanvas.cc.

References QtHandles::Canvas::canvasMousePressEvent().

◆ mouseReleaseEvent()

void QtHandles::GLCanvas::mouseReleaseEvent ( QMouseEvent *  event)
protected

Definition at line 263 of file GLCanvas.cc.

References QtHandles::Canvas::canvasMouseReleaseEvent().

◆ paintGL()

void QtHandles::GLCanvas::paintGL ( void  )
protected

Definition at line 239 of file GLCanvas.cc.

References QtHandles::Canvas::canvasPaintEvent().

◆ print()

void QtHandles::Canvas::print ( const QString &  file_cmd,
const QString &  term 
)
inlineinherited

Definition at line 70 of file Canvas.h.

References QtHandles::Canvas::do_print(), and QtHandles::Canvas::m_handle.

Referenced by QtHandles::Figure::print().

◆ qWidget()

QWidget* QtHandles::GLCanvas::qWidget ( void  )
inlinevirtual

Implements QtHandles::Canvas.

Definition at line 77 of file GLCanvas.h.

◆ redraw()

◆ resize()

void QtHandles::GLCanvas::resize ( int  ,
int  ,
int  ,
int   
)
inlinevirtual

Implements QtHandles::Canvas.

Definition at line 73 of file GLCanvas.h.

◆ select_object()

◆ selectFromAxes()

graphics_object QtHandles::GLCanvas::selectFromAxes ( const graphics_object ax,
const QPoint &  pt 
)
virtual

◆ setCursor()

void QtHandles::Canvas::setCursor ( MouseMode  mode,
std::string  fallback,
QImage  cdata,
Matrix  hotspot 
)
inherited

◆ setEventMask()

void QtHandles::Canvas::setEventMask ( int  m)
inlineinherited

Definition at line 77 of file Canvas.h.

References m, and QtHandles::Canvas::m_eventMask.

Referenced by QtHandles::Figure::Figure().

◆ updateCurrentPoint() [1/2]

◆ updateCurrentPoint() [2/2]

◆ wheelEvent()

void QtHandles::GLCanvas::wheelEvent ( QWheelEvent *  event)
protected

Definition at line 269 of file GLCanvas.cc.

References QtHandles::Canvas::canvasWheelEvent().

Member Data Documentation

◆ m_clickMode

bool QtHandles::Canvas::m_clickMode
privateinherited

◆ m_eventMask

◆ m_glfcns

octave::qopengl_functions QtHandles::GLCanvas::m_glfcns
private

Definition at line 94 of file GLCanvas.h.

Referenced by do_print(), initializeGL(), and selectFromAxes().

◆ m_handle

◆ m_interpreter

◆ m_mouseAnchor

QPoint QtHandles::Canvas::m_mouseAnchor
privateinherited

◆ m_mouseAxes

◆ m_mouseCurrent

QPoint QtHandles::Canvas::m_mouseCurrent
privateinherited

◆ m_mouseMode

◆ m_octave_qobj

octave::base_qobject& QtHandles::Canvas::m_octave_qobj
protectedinherited

◆ m_rectMode

bool QtHandles::Canvas::m_rectMode
privateinherited

◆ m_redrawBlocked

bool QtHandles::Canvas::m_redrawBlocked
privateinherited

◆ m_renderer

octave::opengl_renderer QtHandles::GLCanvas::m_renderer
private

Definition at line 95 of file GLCanvas.h.

Referenced by do_getPixels(), draw(), and drawZoomBox().


The documentation for this class was generated from the following files: