Functions related to the QObject class.
More...
|
DOS_API DosQMetaObject * | dos_qobject_qmetaobject (void) |
| Return QMetaObject associated to the QObject class. More...
|
|
DOS_API DosQObject * | dos_qobject_create (void *dObjectPointer, DosQMetaObject *metaObject, DObjectCallback dObjectCallback) |
| Create a new QObject. More...
|
|
DOS_API void | dos_qobject_signal_emit (DosQObject *vptr, const char *name, int parametersCount, void **parameters) |
| Emit a signal definited in a QObject. More...
|
|
DOS_API char * | dos_qobject_objectName (const DosQObject *vptr) |
| Return the DosQObject objectName. More...
|
|
DOS_API void | dos_qobject_setObjectName (DosQObject *vptr, const char *name) |
| Calls the QObject::setObjectName() function. More...
|
|
DOS_API void | dos_qobject_delete (DosQObject *vptr) |
| Free the memory allocated for the QObject. More...
|
|
DOS_API void | dos_qobject_deleteLater (DosQObject *vptr) |
| Free the memory allocated for the QObject in the next event loop cycle. More...
|
|
DOS_API DosQVariant * | dos_qobject_property (DosQObject *vptr, const char *propertyName) |
| Read Value of a property by its name. More...
|
|
DOS_API bool | dos_qobject_setProperty (DosQObject *vptr, const char *propertyName, DosQVariant *value) |
| Write Value to a property by its name. More...
|
|
DOS_API char * | dos_slot_macro (const char *str) |
| Return the equivalent of SLOT(str) macro invokation. More...
|
|
DOS_API char * | dos_signal_macro (const char *str) |
| Return the equivalent of SIGNAL(str) macro invokation. More...
|
|
DOS_API void | dos_qobject_connect_static (DosQObject *sender, const char *signal, DosQObject *receiver, const char *slot, DosQtConnectionType connection_type) |
| Connect an object signal to another object signal or slot. More...
|
|
DOS_API void | dos_qobject_disconnect_static (DosQObject *sender, const char *signal, DosQObject *receiver, const char *slot) |
| Disconnect an object slot or signal from an object signal. More...
|
|
Functions related to the QObject class.
◆ dos_qobject_connect_static()
DOS_API void dos_qobject_connect_static |
( |
DosQObject * |
sender, |
|
|
const char * |
signal, |
|
|
DosQObject * |
receiver, |
|
|
const char * |
slot, |
|
|
DosQtConnectionType |
connection_type |
|
) |
| |
Connect an object signal to another object signal or slot.
- Note
- Use the dos_signal_macro o dos_slot_macro for property format the string arguments
◆ dos_qobject_create()
Create a new QObject.
- Parameters
-
dObjectPointer | The pointer of the QObject in the binded language |
metaObject | The QMetaObject associated to the given QObject |
dObjectCallback | The callback called from QML whenever a slot or property should be in read, write or invoked |
- Returns
- A new QObject
- Note
- The returned QObject should be freed by calling dos_qobject_delete()
-
The
dObjectPointer
is usefull for forwarding a property read/slot to the correct object in the binded language in the callback
◆ dos_qobject_delete()
DOS_API void dos_qobject_delete |
( |
DosQObject * |
vptr | ) |
|
Free the memory allocated for the QObject.
- Parameters
-
◆ dos_qobject_deleteLater()
DOS_API void dos_qobject_deleteLater |
( |
DosQObject * |
vptr | ) |
|
Free the memory allocated for the QObject in the next event loop cycle.
- Parameters
-
◆ dos_qobject_disconnect_static()
DOS_API void dos_qobject_disconnect_static |
( |
DosQObject * |
sender, |
|
|
const char * |
signal, |
|
|
DosQObject * |
receiver, |
|
|
const char * |
slot |
|
) |
| |
Disconnect an object slot or signal from an object signal.
- Note
- Use the dos_signal_macro o dos_slot_macro for property format the string arguments
◆ dos_qobject_objectName()
DOS_API char* dos_qobject_objectName |
( |
const DosQObject * |
vptr | ) |
|
Return the DosQObject objectName.
- Parameters
-
vptr | The DosQObject pointer |
- Returns
- A string in UTF8 format
- Note
- The returned string should be freed using the dos_chararray_delete() function
◆ dos_qobject_property()
Read Value of a property by its name.
- Parameters
-
vptr | The QObject |
propertyName | the Name of the property to be read |
- Returns
- Value of the given property
- Note
- returns an empty QVariant if the propertyName does not exist
◆ dos_qobject_qmetaobject()
Return QMetaObject associated to the QObject class.
- Returns
- The QMetaObject of the QObject class
- Note
- The returned QObject should be freed using dos_qmetaobject_delete().
◆ dos_qobject_setObjectName()
DOS_API void dos_qobject_setObjectName |
( |
DosQObject * |
vptr, |
|
|
const char * |
name |
|
) |
| |
Calls the QObject::setObjectName() function.
- Parameters
-
vptr | The QObject |
name | A pointer to an UTF-8 string |
- Note
- The
name
string is owned by the caller thus it will not be deleted
◆ dos_qobject_setProperty()
DOS_API bool dos_qobject_setProperty |
( |
DosQObject * |
vptr, |
|
|
const char * |
propertyName, |
|
|
DosQVariant * |
value |
|
) |
| |
Write Value to a property by its name.
- Parameters
-
vptr | The QObject |
propertyName | The Name of the property to be written |
value | The value to be written |
- Returns
- Result as bool
◆ dos_qobject_signal_emit()
DOS_API void dos_qobject_signal_emit |
( |
DosQObject * |
vptr, |
|
|
const char * |
name, |
|
|
int |
parametersCount, |
|
|
void ** |
parameters |
|
) |
| |
Emit a signal definited in a QObject.
- Parameters
-
vptr | The QObject |
name | The signal name |
parametersCount | The number of parameters in the parameters array |
parameters | An array of DosQVariant with the values of signal arguments |
◆ dos_signal_macro()
DOS_API char* dos_signal_macro |
( |
const char * |
str | ) |
|
Return the equivalent of SIGNAL(str) macro invokation.
- Note
- The returned string should be freed by calling the dos_chararray_delete() function
◆ dos_slot_macro()
DOS_API char* dos_slot_macro |
( |
const char * |
str | ) |
|
Return the equivalent of SLOT(str) macro invokation.
- Note
- The returned string should be free with dos_chararray_delete