Kross
#include <wrapperinterface.h>
Public Member Functions | |
virtual | ~WrapperInterface () |
virtual void * | wrappedObject () const =0 |
Detailed Description
Wrapper-class used to provide handlers for custom types.
Custom types are types other than QObject*, QWidget* or one of the base types supported by QVariant. By using the Kross::registerMetaTypeHandler() method such custom handlers can be registered and used to either translate various types to a by QVariant supported type or by providing on the fly an own wrapper class that inherits from QObject and does provide access to the functionality of the wrapped custom type.
Following sample demonstrates the usage by registering a handler for the type "TestObject*". Once such a type got returned by a C++ class, the handler got called. If we return a QObject that implements the WrapperInterface, what is not needed, then the wrappedObject() method will be used to translate the wrapper back to the wrapped object if a C++ function got called and the wrapper is passed as argument.
- Since
- 4.2
Definition at line 73 of file wrapperinterface.h.
Constructor & Destructor Documentation
|
virtual |
Destructor.
Definition at line 546 of file action.cpp.
Member Function Documentation
|
pure virtual |
This method got called by Kross if the wrapper-instance got passed to a C++ slot.
It is recommed to return here the wrapped instance, but you don't need to.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.