QObjectWrapper class reference
[QObject wrapping module]
Declaration
This class is for internal use only.
#include <internal/QObjectWrapper>
namespace QtLua {
class QObjectWrapper;
};
This class is a member of the QtLua namespace.
This class is declared in internal/qtluaqobjectwrapper.hh source file, line 45.
Description
This internal class implements the QObject wrapper decribed in the QObject wrapping section.
Members
Inherited members
- 30 members inherited from UserData
Types
Private types
- struct LuaSlot
- typedef [...] lua_slots_hash_t
Functions
- ~QObjectWrapper()
- void _lua_connect(int sigindex, const Value &v)
- bool _lua_disconnect(int sigindex, const Value &v)
- void _lua_disconnect_all(int sigindex)
- void _lua_disconnect_all()
- QObject & get_object()
- State * get_state()
- int qt_metacall(QMetaObject::Call c, int id, void **args)
- void set_delete(bool delete_)
- void set_reparent(bool reparent)
- bool valid() const
Private functions
- QObjectWrapper(State *st, QObject *obj)
- QObjectWrapper(const QObjectWrapper &qow)
- virtual void completion_patch(String &path, String &entry, int &offset)
- virtual String get_type_name() const
- virtual String get_value_str() const
- virtual Value meta_index(State *ls, const Value &key)
- virtual void meta_newindex(State *ls, const Value &key, const Value &value)
- virtual Ref<Iterator> new_iterator(State *ls)
- void obj_destroyed()
- virtual void ref_single()
- void reparent(QObject *parent)
- virtual bool support(ValueBase::Operation c) const
Static functions
- static QObject * get_child(QObject &obj, const String &name)
- static Ref<QObjectWrapper> get_wrapper(State *st, QObject *obj)
- static Ref<QObjectWrapper> get_wrapper(State *st, QObject *obj, bool reparent, bool delete_)
- static String qobject_name(QObject &obj)
Private fields
- bool _delete
- State *_ls
- int _lua_next_slot
- QObjectWrapper::lua_slots_hash_t _lua_slots
- QObject *_obj
- bool _reparent
Members detail
This constructor is declared in internal/qtluaqobjectwrapper.hh source file, line 98.
This member access is private.
QObjectWrapper(const QObjectWrapper &qow)
This constructor is declared in internal/qtluaqobjectwrapper.hh source file, line 99.
This member access is private.
This destructor is declared in internal/qtluaqobjectwrapper.hh source file, line 93.
This variable is declared in internal/qtluaqobjectwrapper.hh source file, line 129.
This member access is private.
State *_ls
This variable is declared in internal/qtluaqobjectwrapper.hh source file, line 124.
This member access is private.
void _lua_connect(int sigindex, const Value &v)
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 88.
bool _lua_disconnect(int sigindex, const Value &v)
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 89.
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 90.
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 91.
This variable is declared in internal/qtluaqobjectwrapper.hh source file, line 127.
This member access is private.
QObjectWrapper::lua_slots_hash_t _lua_slots
This variable is declared in internal/qtluaqobjectwrapper.hh source file, line 126.
This member access is private.
QObject *_obj
This variable is declared in internal/qtluaqobjectwrapper.hh source file, line 125.
This member access is private.
This variable is declared in internal/qtluaqobjectwrapper.hh source file, line 128.
This member access is private.
This virtual function is declared in internal/qtluaqobjectwrapper.hh source file, line 106.
This member access is private.
This virtual function overrides the completion_patch
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function may be reimplemented to further modify completion result on console line when completed to a UserData value. This is usefull to append a dot or a pair of brackets access operator to the userdata value name for instance.
Parameters list:
- path: Completion result tables path to userdata value.
- entry: Completion result userdata name. May append to this string directly.
- offset: Cursor offset. May be decreased to place cursor between inserted brackets for instance.
typedef Ref<const QObjectWrapper, QObjectWrapper> const_ptr
This typedef is declared in QTLUA_REFTYPE function like macro expansion, line 3 in internal/qtluaqobjectwrapper.hh source file, line 49.
Shortcut for Ref smart pointer class to QObjectWrapper type provided for convenience
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 84.
Find QObject child non-recursively
QObject & get_object()
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 72.
Get reference to wrapped qobject. Throw if the internal QPointer has become null.
State * get_state()
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 78.
Get reference to state
virtual String get_type_name() const
This virtual function is declared in internal/qtluaqobjectwrapper.hh source file, line 107.
This member access is private.
This virtual function overrides the get_type_name
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function returns an object type name. The default implementation returns the C++ object type name. This is used for error messages and pretty printing.
The return value is Pretty print object type.
virtual String get_value_str() const
This virtual function is declared in internal/qtluaqobjectwrapper.hh source file, line 108.
This member access is private.
This virtual function overrides the get_value_str
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function returns an string value describing object value or content. The default implementation returns an hexadecimal object pointer. This is used for mainly for pretty printing.
static Ref<QObjectWrapper> get_wrapper(State *st, QObject *obj)
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 56.
Create or find existing QObjectWrapper associated with given QObject. QObject will be deleted when wrapper is destroyed only if it flagged as deletable and has no more parent. Deletable flag is set on wrapper creation if QObject has a parent.
static Ref<QObjectWrapper> get_wrapper(State *st, QObject *obj, bool reparent, bool delete_)
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 62.
Same as get_wrapper() but specify if QObject parent change is allowed (default is true) and if QObject must be deleted when no references to wrapper remains and it has no parent (default is true if QObject had a parent on wrapper creation).
This typedef is declared in internal/qtluaqobjectwrapper.hh source file, line 122.
This member access is private.
This virtual function is declared in internal/qtluaqobjectwrapper.hh source file, line 101.
This member access is private.
This virtual function overrides the meta_index
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function is called when a table read access operation is attempted on a userdata object. The default implementation throws an error message. The UserData::support function must be reimplemented along with this function to report ValueBase::OpIndex as supported.
Parameters list:
- key: Value used as table index.
The return value is Table access result value.
This virtual function is declared in internal/qtluaqobjectwrapper.hh source file, line 102.
This member access is private.
This virtual function overrides the meta_newindex
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function is called when a table write access operation is attempted on a userdata object. The default implementation throws an error message. The UserData::support function must be reimplemented along with this function to report ValueBase::OpNewindex as supported.
Parameters list:
- key: Value used as table index.
- value: Value to put in table.
This virtual function is declared in internal/qtluaqobjectwrapper.hh source file, line 103.
This member access is private.
This virtual function overrides the new_iterator
virtual function defined in the UserData
base class.
Documentation inherited from base class:
This function may return an Iterator object used to iterate over an userdata object. The default implementation throws an error message. The UserData::support function must be reimplemented along with this function to report ValueBase::OpIterate as supported.
The return value is an Iterator based iterator object.
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 109.
This member access is private.
typedef Ref<QObjectWrapper, QObjectWrapper> ptr
This typedef is declared in QTLUA_REFTYPE function like macro expansion, line 5 in internal/qtluaqobjectwrapper.hh source file, line 49.
Shortcut for Ref smart pointer class to QObjectWrapper type provided for convenience
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 81.
Return object name, forge a decent one if empty
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 87.
This virtual function is declared in internal/qtluaqobjectwrapper.hh source file, line 110.
This member access is private.
This virtual function overrides the ref_single
virtual function defined in the RefobjBase
base class.
Documentation inherited from base class:
This function is called when a dynamically allocated object has its reference count decreased to 1.
void reparent(QObject *parent)
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 96.
This member access is private.
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 68.
Specify if wrapped QObject must be deleted when no more refenrences to wrapper exists and it has no parent.
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 65.
Specify if wrapped QObject parent change is allowed
virtual bool support(ValueBase::Operation c) const
This virtual function is declared in internal/qtluaqobjectwrapper.hh source file, line 104.
This member access is private.
This virtual function overrides the support
virtual function defined in the UserData
base class.
Documentation inherited from base class:
Check given operation support.
See also ValueBase::support function.
This function is declared in internal/qtluaqobjectwrapper.hh source file, line 75.
Check if wrapped qobject still exist