26 #if defined (HAVE_CONFIG_H)
44 const graphics_object& go,
QObject *obj)
45 :
QObject (), m_octave_qobj (oct_qobj), m_interpreter (interp),
46 m_go (go), m_handle (go.get_handle ()), m_qobject (
nullptr)
48 gh_manager& gh_mgr = m_interpreter.get_gh_manager ();
50 octave::autolock guard (gh_mgr.graphics_lock ());
53 qCritical (
"octave::Object::Object: "
54 "creating Object (h=%g) without a valid lock!!!",
64 qCritical (
"octave::Object::init: "
65 "resetting QObject while in invalid state");
72 QVariant::fromValue<void *> (
this));
86 octave::autolock guard (gh_mgr.graphics_lock (),
false);
89 qCritical (
"octave::Object::object: "
90 "accessing graphics object (h=%g) without a valid lock!!!",
101 octave::autolock guard (gh_mgr.graphics_lock ());
108 case base_properties::ID_BEINGDELETED:
113 if (
object ().valid_object ())
124 octave::autolock guard (gh_mgr.graphics_lock ());
134 octave::autolock guard (gh_mgr.graphics_lock ());
136 if (
object ().valid_object ())
145 octave::autolock guard (gh_mgr.graphics_lock ());
147 if (
object ().valid_object ())
156 octave::autolock guard (gh_mgr.graphics_lock ());
158 if (
object ().valid_object ())
159 print (file_cmd, term);
202 gh_manager& gh_mgr = interp.get_gh_manager ();
204 octave::autolock guard (gh_mgr.graphics_lock ());
207 (gh_mgr.get_object (go.get_parent ()));
215 QVariant v = obj->property (
"octave::Object");
218 return reinterpret_cast<Object *
> (qvariant_cast<void *> (v));
241 const std::string&)),
244 const std::string&)));
void gh_callback_event(const graphics_handle &h, const std::string &name)
virtual void print(const QString &file_cmd, const QString &term)
static Object * parentObject(octave::interpreter &interp, const graphics_object &go)
virtual void do_connections(const QObject *receiver, const QObject *emitter=nullptr)
static Object * fromQObject(QObject *obj)
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value)
virtual void beingDeleted(void)
graphics_object object(void) const
void objectDestroyed(QObject *obj=nullptr)
void interpreter_event(const octave::fcn_callback &fcn)
void slotPrint(const QString &file_cmd, const QString &term)
virtual void redraw(void)
virtual void finalize(void)
virtual void update(int pId)
octave::interpreter & m_interpreter
void init(QObject *obj, bool callBase=false)
Base class for Octave interfaces that use Qt.
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::function< void(void)> fcn_callback
std::function< void(interpreter &)> meth_callback