26 #if defined (HAVE_CONFIG_H)
30 #include <QChildEvent>
31 #include <QVBoxLayout>
46 m_interpreter (interp), m_canvas (
nullptr)
48 setFocusPolicy (Qt::ClickFocus);
61 octave::autolock guard (gh_mgr.graphics_lock ());
63 graphics_object go = gh_mgr.get_object (gh);
67 graphics_object fig = go.get_ancestor (
"figure");
70 fig.get (
"renderer").string_value ());
83 const std::string&)));
123 canvasWidget->lower ();
124 canvasWidget->show ();
125 canvasWidget->setGeometry (0, 0, width (), height ());
140 octave::autolock guard (gh_mgr.graphics_lock ());
142 for (
auto *qObj : children ())
144 if (qObj->isWidgetType ())
150 graphics_object go = obj->
object ();
152 if (go.valid_object ())
154 Matrix bb = go.get_properties ().get_boundingbox (
false);
174 if (xevent->added ())
176 QObject *obj = xevent->child ();
178 if (obj && obj->isWidgetType ())
180 QWidget *widget = qobject_cast<QWidget *> (obj);
183 widget->setMouseTracking (hasMouseTracking ());
static Canvas * create(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_handle &handle, QWidget *parent, const std::string &name)
void interpreter_event(const octave::fcn_callback &fcn)
virtual QWidget * qWidget(void)=0
octave::base_qobject & m_octave_qobj
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value)
void gh_callback_event(const graphics_handle &h, const std::string &name)
octave::interpreter & m_interpreter
void interpreter_event(const octave::fcn_callback &fcn)
Canvas * canvas(const graphics_handle &handle, bool create=true)
void resizeEvent(QResizeEvent *event)
void childEvent(QChildEvent *event)
static Object * fromQObject(QObject *obj)
graphics_object object(void) const
Base class for Octave interfaces that use Qt.
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn