#include "Figure.h"
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) |
Container * | innerContainer (void) |
QWidget * | menu (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 QObject * | qObject (void) |
template<typename T > | |
T * | qWidget (void) |
void | setFileName (const QString &name) |
void | updateStatusBar (ColumnVector pt) |
Static Public Member Functions | |
static Figure * | create (octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go) |
static Object * | fromQObject (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 Object * | parentObject (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 |
QObject * | m_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 |
Container * | m_container |
QToolBar * | m_figureToolBar |
QRect | m_innerRect |
MenuBar * | m_menuBar |
QRect | m_outerRect |
QImage | m_pointer_cdata |
int | m_previousHeight |
bool | m_resizable |
QStatusBar * | m_statusBar |
Friends | |
class | ToolBar |
|
protected |
Figure::Figure | ( | octave::base_qobject & | oct_qobj, |
octave::interpreter & | interp, | ||
const graphics_object & | go, | ||
FigureWindow * | win | ||
) |
Definition at line 118 of file Figure.cc.
References GenericEventNotifySender::addReceiver(), asyncUpdate(), boundingBoxToRect(), Container::canvas(), enableMouseTracking(), figureWindowShown(), FigureWindow::figureWindowShown(), global_menubar_style(), Container::interpreter_event(), interpreter_event(), m_container, Object::m_handle, m_innerRect, m_menuBar, m_outerRect, m_statusBar, Utils::properties(), set_geometry(), Canvas::setEventMask(), showFigureStatusBar(), update(), and updateContainer().
Referenced by create().
|
private |
Definition at line 798 of file Figure.cc.
References m_blockUpdates, m_figureToolBar, r, set_geometry(), and updateBoundingBox().
Referenced by ToolBar::ToolBar().
|
signal |
Referenced by Figure().
|
protectedvirtual |
Reimplemented from Object.
Definition at line 346 of file Figure.cc.
References Canvas::blockRedraw(), Container::canvas(), m_container, Object::m_handle, GenericEventNotifySender::removeReceiver(), and octave_handle::value().
|
static |
Definition at line 112 of file Figure.cc.
References Figure().
Referenced by qt_graphics_toolkit::create_object().
Reimplemented from Object.
Definition at line 593 of file Figure.cc.
References Container::canvas(), Object::do_connections(), m_container, and Object::m_handle.
|
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().
|
virtual |
Implements GenericEventNotifyReceiver.
Definition at line 718 of file Figure.cc.
References enableMouseTracking(), m_blockUpdates, m_container, Object::m_interpreter, m_menuBar, m_previousHeight, update(), updateBoundingBox(), UpdateBoundingBoxPosition, UpdateBoundingBoxSize, and updateFigureHeight().
|
virtual |
Implements GenericEventNotifyReceiver.
Definition at line 664 of file Figure.cc.
References Object::gh_callback_event(), m_blockUpdates, m_container, Object::m_handle, Object::m_interpreter, m_menuBar, m_previousHeight, and Utils::properties().
|
privateslot |
Definition at line 855 of file Figure.cc.
References Object::m_interpreter, Utils::properties(), and screenChanged().
Referenced by Figure().
QString Figure::fileName | ( | void | ) |
Definition at line 196 of file Figure.cc.
References Utils::fromStdString(), Object::m_interpreter, and Utils::properties().
|
protectedvirtualinherited |
Definition at line 167 of file Object.cc.
References Object::m_qobject.
Referenced by Object::slotFinalize().
Definition at line 213 of file Object.cc.
Referenced by ToolBar::ToolBar(), ButtonGroup::buttonClicked(), ButtonGroup::buttonToggled(), redraw(), Container::resizeEvent(), update(), and Menu::updateSiblingPositions().
|
signalinherited |
Referenced by ContextMenu::aboutToShow(), Menu::actionHovered(), Menu::actionTriggered(), ButtonGroup::buttonClicked(), ButtonControl::clicked(), PushTool::clicked(), PopupMenuControl::currentIndexChanged(), Object::do_connections(), EditControl::editingFinished(), BaseControl::eventFilter(), Table::eventFilter(), eventNotifyBefore(), Table::itemSelectionChanged(), EditControl::returnPressed(), Table::sendCellEditCallback(), ListBoxControl::sendSelectionChange(), ButtonControl::toggled(), ToggleTool::triggered(), and SliderControl::valueChanged().
|
signalinherited |
|
signalinherited |
Referenced by ContextMenu::aboutToHide(), ContextMenu::aboutToShow(), ButtonGroup::buttonToggled(), Table::checkBoxClicked(), Table::comboBoxCurrentIndexChanged(), PopupMenuControl::currentIndexChanged(), Object::do_connections(), EditControl::editingFinished(), BaseControl::eventFilter(), Table::eventFilter(), Table::itemChanged(), EditControl::returnPressed(), ListBoxControl::sendSelectionChange(), ButtonControl::toggled(), ToggleTool::triggered(), PopupMenuControl::update(), updateBoundingBox(), Table::updateExtent(), and SliderControl::valueChanged().
|
signalinherited |
|
signalinherited |
|
protectedinherited |
Definition at line 61 of file Object.cc.
References Object::m_qobject, and Object::objectDestroyed().
Referenced by BaseControl::init().
|
virtual |
|
signal |
Referenced by Figure().
|
signal |
|
virtual |
Implements MenuContainer.
MouseMode Figure::mouseMode | ( | void | ) |
Definition at line 222 of file Figure.cc.
References octave_scalar_map::getfield(), Object::m_interpreter, NoMode, PanMode, Utils::properties(), RotateMode, octave_value::string_value(), TextMode, ZoomInMode, and ZoomOutMode.
Referenced by Canvas::canvasMousePressEvent(), Canvas::canvasWheelEvent(), and update().
|
inherited |
Definition at line 82 of file Object.cc.
References Object::m_go, Object::m_handle, Object::m_interpreter, and octave_handle::value().
Referenced by BaseControl::eventFilter(), ButtonGroup::eventFilter(), Panel::eventFilter(), Table::eventFilter(), Object::properties(), Container::resizeEvent(), Table::updateExtent(), updateFigureHeight(), Menu::updateSiblingPositions(), and SliderControl::valueChanged().
|
slotinherited |
Definition at line 193 of file Object.cc.
References Object::m_qobject.
Referenced by Object::init().
|
staticprotectedinherited |
Definition at line 200 of file Object.cc.
References qt_graphics_toolkit::toolkitObject().
Referenced by RadioButtonControl::RadioButtonControl(), ToggleButtonControl::ToggleButtonControl(), ButtonGroup::create(), CheckBoxControl::create(), ContextMenu::create(), EditControl::create(), ListBoxControl::create(), Menu::create(), Panel::create(), PopupMenuControl::create(), PushButtonControl::create(), PushTool::create(), RadioButtonControl::create(), SliderControl::create(), Table::create(), TextControl::create(), ToggleButtonControl::create(), ToggleTool::create(), ToolBar::create(), and ButtonControl::update().
|
protectedvirtual |
Reimplemented from Object.
Definition at line 319 of file Figure.cc.
References Container::canvas(), m_container, Object::m_handle, and Canvas::print().
|
inlineinherited |
Definition at line 56 of file Object.h.
References Object::object().
Referenced by ButtonGroup::buttonClicked(), ButtonGroup::buttonToggled(), ButtonGroup::eventFilter(), Table::eventFilter(), and Utils::figureCurrentPoint().
|
inlineinherited |
Definition at line 63 of file Object.h.
References Object::object(), and Utils::properties().
|
inlineinherited |
Definition at line 59 of file Object.h.
References Object::object().
|
inlineinherited |
Definition at line 70 of file Object.h.
References Object::object(), and Utils::properties().
|
inlinevirtualinherited |
Definition at line 78 of file Object.h.
References Object::m_qobject.
Referenced by BaseControl::BaseControl(), Table::Table(), Menu::create(), ButtonGroup::eventFilter(), Panel::eventFilter(), ToolBar::eventFilter(), and Object::qWidget().
|
inlineinherited |
Definition at line 81 of file Object.h.
References Object::qObject().
Referenced by ContextMenu::create(), PushTool::create(), ToggleTool::create(), ToolBar::create(), ContextMenu::executeAt(), and Container::resizeEvent().
|
protectedvirtual |
Reimplemented from Object.
Definition at line 287 of file Figure.cc.
References Container::canvas(), Object::fromQObject(), m_container, Object::m_handle, Canvas::redraw(), and Object::slotRedraw().
Referenced by screenChanged(), and updateContainer().
|
privateslot |
Definition at line 873 of file Figure.cc.
References Object::m_interpreter, Utils::properties(), and redraw().
Referenced by figureWindowShown().
|
private |
Definition at line 256 of file Figure.cc.
References m_resizable, r, and state.
Referenced by Figure(), addCustomToolBar(), showCustomToolBar(), showFigureStatusBar(), update(), and updateFigureHeight().
void Figure::setFileName | ( | const QString & | name | ) |
Definition at line 210 of file Figure.cc.
References Object::m_interpreter, and Utils::properties().
|
protectedvirtual |
|
private |
Definition at line 825 of file Figure.cc.
References m_blockUpdates, r, set_geometry(), and updateBoundingBox().
Referenced by ToolBar::beingDeleted(), and ToolBar::update().
|
private |
Definition at line 539 of file Figure.cc.
References m_blockUpdates, m_statusBar, r, set_geometry(), and updateBoundingBox().
|
slotinherited |
Definition at line 120 of file Object.cc.
References Object::finalize(), and Object::m_interpreter.
|
slot |
Definition at line 328 of file Figure.cc.
References Container::canvas(), Canvas::getPixels(), m_container, Object::m_handle, and Object::m_interpreter.
|
slotinherited |
Definition at line 152 of file Object.cc.
References Object::m_interpreter, and Object::print().
|
slotinherited |
Definition at line 130 of file Object.cc.
References Object::m_interpreter, and Object::redraw().
Referenced by ObjectProxy::init(), and redraw().
|
slotinherited |
Definition at line 141 of file Object.cc.
References Object::m_interpreter, and Object::show().
Referenced by ObjectProxy::init().
|
slotinherited |
Definition at line 97 of file Object.cc.
References Object::beingDeleted(), Object::m_interpreter, and Object::update().
Referenced by ObjectProxy::init().
|
protectedvirtual |
Reimplemented from Object.
Definition at line 358 of file Figure.cc.
References Canvas::addEventMask(), boundingBoxToRect(), Container::canvas(), Canvas::clearEventMask(), Object::fromQObject(), Utils::fromStdString(), Object::innerContainer(), Canvas::KeyPress, Canvas::KeyRelease, m_blockUpdates, m_container, Object::m_handle, m_innerRect, Object::m_interpreter, m_menuBar, m_pointer_cdata, m_resizable, m_statusBar, mouseMode(), pointer_to_qimage(), Utils::properties(), set_geometry(), Canvas::setCursor(), and showFigureStatusBar().
Referenced by Figure(), and eventNotifyAfter().
|
protected |
Definition at line 606 of file Figure.cc.
References Object::gh_set_event(), m_container, Object::m_handle, m_innerRect, m_outerRect, Utils::properties(), r, UpdateBoundingBoxPosition, and UpdateBoundingBoxSize.
Referenced by addCustomToolBar(), eventNotifyAfter(), showCustomToolBar(), showFigureStatusBar(), and updateFigureHeight().
|
privateslot |
|
privateslot |
Definition at line 562 of file Figure.cc.
References m_blockUpdates, Object::m_interpreter, Object::object(), r, set_geometry(), and updateBoundingBox().
Referenced by eventNotifyAfter().
void Figure::updateStatusBar | ( | ColumnVector | pt | ) |
Definition at line 584 of file Figure.cc.
References m_statusBar.
Referenced by Canvas::canvasMouseMoveEvent().
|
private |
Definition at line 134 of file Figure.h.
Referenced by addCustomToolBar(), eventNotifyAfter(), eventNotifyBefore(), showCustomToolBar(), showFigureStatusBar(), update(), and updateFigureHeight().
|
private |
Definition at line 133 of file Figure.h.
Referenced by Figure(), beingDeleted(), do_connections(), enableMouseTracking(), eventNotifyAfter(), eventNotifyBefore(), innerContainer(), print(), redraw(), slotGetPixels(), update(), and updateBoundingBox().
|
private |
Definition at line 135 of file Figure.h.
Referenced by addCustomToolBar().
|
protectedinherited |
Definition at line 146 of file Object.h.
Referenced by Object::object().
|
protectedinherited |
Definition at line 153 of file Object.h.
Referenced by ButtonGroup::ButtonGroup(), Figure(), Panel::Panel(), ContextMenu::aboutToHide(), ContextMenu::aboutToShow(), Menu::actionHovered(), Menu::actionTriggered(), beingDeleted(), ButtonGroup::buttonClicked(), ButtonGroup::buttonToggled(), Table::checkBoxClicked(), ButtonControl::clicked(), PushTool::clicked(), Table::comboBoxCurrentIndexChanged(), PopupMenuControl::currentIndexChanged(), do_connections(), Panel::do_connections(), EditControl::editingFinished(), enableMouseTracking(), BaseControl::eventFilter(), Table::eventFilter(), eventNotifyBefore(), Table::itemChanged(), Table::itemSelectionChanged(), Object::object(), print(), ButtonGroup::redraw(), redraw(), Panel::redraw(), EditControl::returnPressed(), Table::sendCellEditCallback(), ListBoxControl::sendSelectionChange(), slotGetPixels(), ButtonControl::toggled(), ToggleTool::triggered(), update(), PopupMenuControl::update(), updateBoundingBox(), and SliderControl::valueChanged().
|
private |
Definition at line 138 of file Figure.h.
Referenced by Figure(), update(), and updateBoundingBox().
|
protectedinherited |
Definition at line 136 of file Object.h.
Referenced by ButtonGroup::buttonClicked(), ButtonGroup::buttonToggled(), Table::checkBoxClicked(), Table::comboBoxCurrentIndexChanged(), BaseControl::eventFilter(), ButtonGroup::eventFilter(), Panel::eventFilter(), Table::eventFilter(), eventNotifyAfter(), eventNotifyBefore(), figureWindowShown(), fileName(), Table::itemChanged(), mouseMode(), Object::object(), screenChanged(), setFileName(), Object::slotFinalize(), slotGetPixels(), Object::slotPrint(), Object::slotRedraw(), Object::slotShow(), Object::slotUpdate(), ButtonControl::toggled(), ButtonControl::update(), ButtonGroup::update(), update(), updateFigureHeight(), and SliderControl::valueChanged().
|
private |
Definition at line 136 of file Figure.h.
Referenced by Figure(), eventNotifyAfter(), eventNotifyBefore(), and update().
|
protectedinherited |
|
private |
Definition at line 139 of file Figure.h.
Referenced by Figure(), and updateBoundingBox().
|
private |
|
private |
Definition at line 141 of file Figure.h.
Referenced by eventNotifyAfter(), and eventNotifyBefore().
|
protectedinherited |
Definition at line 155 of file Object.h.
Referenced by ListBoxControl::eventFilter(), Object::finalize(), Object::init(), Object::objectDestroyed(), and Object::qObject().
|
private |
Definition at line 142 of file Figure.h.
Referenced by set_geometry(), and update().
|
private |
Definition at line 137 of file Figure.h.
Referenced by Figure(), showFigureStatusBar(), update(), and updateStatusBar().