GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Figure Class Reference

#include "Figure.h"

Inheritance diagram for Figure:
Collaboration diagram for Figure:

Public Slots

void objectDestroyed (QObject *obj=nullptr)
 
void slotFinalize (void)
 
uint8NDArray slotGetPixels (void)
 
void slotPrint (const QString &file_cmd, const QString &term)
 
void slotRedraw (void)
 
void slotShow (void)
 
void slotUpdate (int pId)
 

Signals

void asyncUpdate (void)
 
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

 Figure (octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go, FigureWindow *win)
 
 ~Figure (void)
 
void do_connections (const QObject *receiver, const QObject *emitter=nullptr)
 
void eventNotifyAfter (QObject *watched, QEvent *event)
 
bool eventNotifyBefore (QObject *watched, QEvent *event)
 
QString fileName (void)
 
ContainerinnerContainer (void)
 
QWidgetmenu (void)
 
MouseMode mouseMode (void)
 
graphics_object object (void) const
 
base_properties & properties (void)
 
template<typename T >
T::properties & properties (void)
 
const base_properties & properties (void) const
 
template<typename T >
const T::properties & properties (void) const
 
virtual QObjectqObject (void)
 
template<typename T >
T * qWidget (void)
 
void setFileName (const QString &name)
 
void updateStatusBar (ColumnVector pt)
 

Static Public Member Functions

static Figurecreate (octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go)
 
static ObjectfromQObject (QObject *obj)
 

Protected Types

enum  UpdateBoundingBoxFlag { UpdateBoundingBoxPosition = 0x1 , UpdateBoundingBoxSize = 0x2 , UpdateBoundingBoxAll = 0x3 }
 

Protected Member Functions

void beingDeleted (void)
 
virtual void finalize (void)
 
void init (QObject *obj, bool callBase=false)
 
void print (const QString &file_cmd, const QString &term)
 
void redraw (void)
 
void show (void)
 
void update (int pId)
 
void updateBoundingBox (bool internal=false, int flags=0)
 

Static Protected Member Functions

static ObjectparentObject (octave::interpreter &interp, const graphics_object &go)
 

Protected Attributes

graphics_object m_go
 
graphics_handle m_handle
 
octave::interpreter & m_interpreter
 
octave::base_qobject & m_octave_qobj
 
QObjectm_qobject
 

Private Slots

void figureWindowShown ()
 
void screenChanged (QScreen *)
 
void updateContainer (void)
 
void updateFigureHeight (int delta_h)
 

Private Member Functions

void addCustomToolBar (QToolBar *bar, bool visible, bool isdefault)
 
void enableMouseTracking (void)
 
void set_geometry (QRect r)
 
void showCustomToolBar (QToolBar *bar, bool visible)
 
void showFigureStatusBar (bool visible)
 

Private Attributes

bool m_blockUpdates
 
Containerm_container
 
QToolBar * m_figureToolBar
 
QRect m_innerRect
 
MenuBarm_menuBar
 
QRect m_outerRect
 
QImage m_pointer_cdata
 
int m_previousHeight
 
bool m_resizable
 
QStatusBar * m_statusBar
 

Friends

class ToolBar
 

Detailed Description

Definition at line 61 of file Figure.h.

Member Enumeration Documentation

◆ UpdateBoundingBoxFlag

Enumerator
UpdateBoundingBoxPosition 
UpdateBoundingBoxSize 
UpdateBoundingBoxAll 

Definition at line 95 of file Figure.h.

Constructor & Destructor Documentation

◆ Figure()

◆ ~Figure()

Figure::~Figure ( void  )

Definition at line 192 of file Figure.cc.

Member Function Documentation

◆ addCustomToolBar()

void Figure::addCustomToolBar ( QToolBar *  bar,
bool  visible,
bool  isdefault 
)
private

Definition at line 798 of file Figure.cc.

References m_blockUpdates, m_figureToolBar, r, set_geometry(), and updateBoundingBox().

Referenced by ToolBar::ToolBar().

◆ asyncUpdate

void Figure::asyncUpdate ( void  )
signal

Referenced by Figure().

◆ beingDeleted()

void Figure::beingDeleted ( void  )
protectedvirtual

◆ create()

Figure * Figure::create ( octave::base_qobject &  oct_qobj,
octave::interpreter &  interp,
const graphics_object &  go 
)
static

Definition at line 112 of file Figure.cc.

References Figure().

Referenced by qt_graphics_toolkit::create_object().

◆ do_connections()

void Figure::do_connections ( const QObject receiver,
const QObject emitter = nullptr 
)
virtual

Reimplemented from Object.

Definition at line 593 of file Figure.cc.

References Container::canvas(), Object::do_connections(), m_container, and Object::m_handle.

◆ enableMouseTracking()

void Figure::enableMouseTracking ( void  )
private

Definition at line 897 of file Figure.cc.

References Container::canvas(), m_container, Object::m_handle, Canvas::qWidget(), and Faddeeva::w().

Referenced by Figure(), and eventNotifyAfter().

◆ eventNotifyAfter()

void Figure::eventNotifyAfter ( QObject watched,
QEvent *  event 
)
virtual

◆ eventNotifyBefore()

bool Figure::eventNotifyBefore ( QObject watched,
QEvent *  event 
)
virtual

◆ figureWindowShown

void Figure::figureWindowShown ( )
privateslot

Definition at line 855 of file Figure.cc.

References Object::m_interpreter, Utils::properties(), and screenChanged().

Referenced by Figure().

◆ fileName()

QString Figure::fileName ( void  )

Definition at line 196 of file Figure.cc.

References Utils::fromStdString(), Object::m_interpreter, and Utils::properties().

◆ finalize()

void Object::finalize ( void  )
protectedvirtualinherited

Definition at line 167 of file Object.cc.

References Object::m_qobject.

Referenced by Object::slotFinalize().

◆ fromQObject()

Object * Object::fromQObject ( QObject obj)
staticinherited

◆ gh_callback_event [1/2]

◆ gh_callback_event [2/2]

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

◆ gh_set_event [1/3]

◆ gh_set_event [2/3]

void Object::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 Object::gh_set_event ( const graphics_handle h,
const std::string &  name,
const octave_value value,
bool  notify_toolkit,
bool  redraw_figure 
)
signalinherited

◆ init()

void Object::init ( QObject obj,
bool  callBase = false 
)
protectedinherited

Definition at line 61 of file Object.cc.

References Object::m_qobject, and Object::objectDestroyed().

Referenced by BaseControl::init().

◆ innerContainer()

Container * Figure::innerContainer ( void  )
virtual

Implements Object.

Definition at line 281 of file Figure.cc.

References m_container.

◆ interpreter_event [1/2]

void Figure::interpreter_event ( const octave::fcn_callback fcn)
signal

Referenced by Figure().

◆ interpreter_event [2/2]

void Figure::interpreter_event ( const octave::meth_callback meth)
signal

◆ menu()

QWidget * Figure::menu ( void  )
virtual

Implements MenuContainer.

Definition at line 600 of file Figure.cc.

◆ mouseMode()

◆ object()

◆ objectDestroyed

void Object::objectDestroyed ( QObject obj = nullptr)
slotinherited

Definition at line 193 of file Object.cc.

References Object::m_qobject.

Referenced by Object::init().

◆ parentObject()

◆ print()

void Figure::print ( const QString &  file_cmd,
const QString &  term 
)
protectedvirtual

Reimplemented from Object.

Definition at line 319 of file Figure.cc.

References Container::canvas(), m_container, Object::m_handle, and Canvas::print().

◆ properties() [1/4]

base_properties& Object::properties ( void  )
inlineinherited

◆ properties() [2/4]

template<typename T >
T::properties& Object::properties ( void  )
inlineinherited

Definition at line 63 of file Object.h.

References Object::object(), and Utils::properties().

◆ properties() [3/4]

const base_properties& Object::properties ( void  ) const
inlineinherited

Definition at line 59 of file Object.h.

References Object::object().

◆ properties() [4/4]

template<typename T >
const T::properties& Object::properties ( void  ) const
inlineinherited

Definition at line 70 of file Object.h.

References Object::object(), and Utils::properties().

◆ qObject()

virtual QObject* Object::qObject ( void  )
inlinevirtualinherited

◆ qWidget()

template<typename T >
T* Object::qWidget ( void  )
inlineinherited

◆ redraw()

void Figure::redraw ( void  )
protectedvirtual

◆ screenChanged

void Figure::screenChanged ( QScreen *  screen)
privateslot

Definition at line 873 of file Figure.cc.

References Object::m_interpreter, Utils::properties(), and redraw().

Referenced by figureWindowShown().

◆ set_geometry()

void Figure::set_geometry ( QRect  r)
private

Definition at line 256 of file Figure.cc.

References m_resizable, r, and state.

Referenced by Figure(), addCustomToolBar(), showCustomToolBar(), showFigureStatusBar(), update(), and updateFigureHeight().

◆ setFileName()

void Figure::setFileName ( const QString &  name)

Definition at line 210 of file Figure.cc.

References Object::m_interpreter, and Utils::properties().

◆ show()

void Figure::show ( void  )
protectedvirtual

Reimplemented from Object.

Definition at line 310 of file Figure.cc.

◆ showCustomToolBar()

void Figure::showCustomToolBar ( QToolBar *  bar,
bool  visible 
)
private

Definition at line 825 of file Figure.cc.

References m_blockUpdates, r, set_geometry(), and updateBoundingBox().

Referenced by ToolBar::beingDeleted(), and ToolBar::update().

◆ showFigureStatusBar()

void Figure::showFigureStatusBar ( bool  visible)
private

Definition at line 539 of file Figure.cc.

References m_blockUpdates, m_statusBar, r, set_geometry(), and updateBoundingBox().

Referenced by Figure(), and update().

◆ slotFinalize

void Object::slotFinalize ( void  )
slotinherited

Definition at line 120 of file Object.cc.

References Object::finalize(), and Object::m_interpreter.

◆ slotGetPixels

uint8NDArray Figure::slotGetPixels ( void  )
slot

◆ slotPrint

void Object::slotPrint ( const QString &  file_cmd,
const QString &  term 
)
slotinherited

Definition at line 152 of file Object.cc.

References Object::m_interpreter, and Object::print().

◆ slotRedraw

void Object::slotRedraw ( void  )
slotinherited

Definition at line 130 of file Object.cc.

References Object::m_interpreter, and Object::redraw().

Referenced by ObjectProxy::init(), and redraw().

◆ slotShow

void Object::slotShow ( void  )
slotinherited

Definition at line 141 of file Object.cc.

References Object::m_interpreter, and Object::show().

Referenced by ObjectProxy::init().

◆ slotUpdate

void Object::slotUpdate ( int  pId)
slotinherited

Definition at line 97 of file Object.cc.

References Object::beingDeleted(), Object::m_interpreter, and Object::update().

Referenced by ObjectProxy::init().

◆ update()

◆ updateBoundingBox()

void Figure::updateBoundingBox ( bool  internal = false,
int  flags = 0 
)
protected

◆ updateContainer

void Figure::updateContainer ( void  )
privateslot

Definition at line 849 of file Figure.cc.

References redraw().

Referenced by Figure().

◆ updateFigureHeight

void Figure::updateFigureHeight ( int  delta_h)
privateslot

◆ updateStatusBar()

void Figure::updateStatusBar ( ColumnVector  pt)

Definition at line 584 of file Figure.cc.

References m_statusBar.

Referenced by Canvas::canvasMouseMoveEvent().

Friends And Related Function Documentation

◆ ToolBar

friend class ToolBar
friend

Definition at line 68 of file Figure.h.

Member Data Documentation

◆ m_blockUpdates

bool Figure::m_blockUpdates
private

◆ m_container

◆ m_figureToolBar

QToolBar* Figure::m_figureToolBar
private

Definition at line 135 of file Figure.h.

Referenced by addCustomToolBar().

◆ m_go

graphics_object Object::m_go
protectedinherited

Definition at line 146 of file Object.h.

Referenced by Object::object().

◆ m_handle

◆ m_innerRect

QRect Figure::m_innerRect
private

Definition at line 138 of file Figure.h.

Referenced by Figure(), update(), and updateBoundingBox().

◆ m_interpreter

◆ m_menuBar

MenuBar* Figure::m_menuBar
private

Definition at line 136 of file Figure.h.

Referenced by Figure(), eventNotifyAfter(), eventNotifyBefore(), and update().

◆ m_octave_qobj

octave::base_qobject& Object::m_octave_qobj
protectedinherited

Definition at line 135 of file Object.h.

◆ m_outerRect

QRect Figure::m_outerRect
private

Definition at line 139 of file Figure.h.

Referenced by Figure(), and updateBoundingBox().

◆ m_pointer_cdata

QImage Figure::m_pointer_cdata
private

Definition at line 140 of file Figure.h.

Referenced by update().

◆ m_previousHeight

int Figure::m_previousHeight
private

Definition at line 141 of file Figure.h.

Referenced by eventNotifyAfter(), and eventNotifyBefore().

◆ m_qobject

QObject* Object::m_qobject
protectedinherited

◆ m_resizable

bool Figure::m_resizable
private

Definition at line 142 of file Figure.h.

Referenced by set_geometry(), and update().

◆ m_statusBar

QStatusBar* Figure::m_statusBar
private

Definition at line 137 of file Figure.h.

Referenced by Figure(), showFigureStatusBar(), update(), and updateStatusBar().


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