A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mevislab.github.io/pythonqt/classPythonQtClassInfo.html below:

PythonQt: PythonQtClassInfo Class Reference

a class that stores all required information about a Qt object (and an optional associated C++ class name) More...

#include <PythonQtClassInfo.h>

  PythonQtClassInfo ()     ~PythonQtClassInfo ()   void  setupQObject (const QMetaObject *meta)   setup as a QObject, taking the meta object as meta information about the QObject
  void  setupCPPObject (const QByteArray &classname)   setup as a CPP (non-QObject), taking the classname
  void  setTypeSlots (int typeSlots)   set the type capabilities
  int  typeSlots () const   get the type capabilities
  PythonQtMemberInfo  member (const char *member)   get the Python method definition for a given slot name (without return type and signature)
  PythonQtSlotInfoconstructors ()   get access to the constructor slot (which may be overloaded if there are multiple constructors)
  PythonQtSlotInfodestructor ()   get access to the destructor slot
  void  addConstructor (PythonQtSlotInfo *info)   add a constructor, ownership is passed to classinfo
  void  setDestructor (PythonQtSlotInfo *info)   set a destructor, ownership is passed to classinfo
  void  addDecoratorSlot (PythonQtSlotInfo *info)   add a decorator slot, ownership is passed to classinfo
  void  addNestedClass (PythonQtClassInfo *info)   add a nested class, so that it can be shown as outer class member
  const QByteArrayclassName () const   get the classname (either of the QObject or of the wrapped CPP object)
  QByteArray  unscopedClassName () const   get the unscoped classname (without ParentClass::) for nested classes
  bool  isQObject ()   returns if the QObject
  bool  isCPPWrapper ()   returns if the class is a CPP wrapper
  const QMetaObjectmetaObject ()   get the meta object
  void  setMetaObject (const QMetaObject *meta)   set the meta object, this will reset the caching
  bool  inherits (const char *classname)   returns if this class inherits from the given classname
  bool  inherits (PythonQtClassInfo *info)   returns if this class inherits from the given classinfo
  voidcastTo (void *ptr, const char *classname)   QString  help ()   get help string for the metaobject
  QStringList  propertyList ()   get list of all properties (on QObjects only, otherwise the list is empty)
  QStringList  memberList ()   get list of all members (excluding properties, which can be listed with propertyList())
  int  metaTypeId ()   get the meta type id of this class (only valid for isCPPWrapper() == true)
  void  setDecoratorProvider (PythonQtQObjectCreatorFunctionCB *cb)   set an additional decorator provider that offers additional decorator slots for this class
  QObject *  decorator ()   get the decorator qobject instance
  void  addParentClass (const ParentClassInfo &info)   add the parent class info of a CPP object
  void  setPythonQtClassWrapper (PyObject *obj)   set the associated PythonQtClassWrapper (which handles instance creation of this type)
  PyObjectpythonQtClassWrapper ()   get the associated PythonQtClassWrapper (which handles instance creation of this type)
  void  setShellSetInstanceWrapperCB (PythonQtShellSetInstanceWrapperCB *cb)   set the shell set instance wrapper cb
  PythonQtShellSetInstanceWrapperCBshellSetInstanceWrapperCB ()   get the shell set instance wrapper cb
  void  addPolymorphicHandler (PythonQtPolymorphicHandlerCB *cb)   add a handler for polymorphic downcasting
  voidcastDownIfPossible (void *ptr, PythonQtClassInfo **resultClassInfo)   cast the pointer down in the class hierarchy if a polymorphic handler allows to do that
  void  clearNotFoundCachedMembers ()   clear all members that where cached as "NotFound"
  const QList< PythonQtClassInfo * > &  nestedClasses ()   get nested classes
  PyObjectcopyObject (void *cppObject)   PythonQtSlotInfogetCopyConstructor ()   Get the copy constructor for this class.
  void  setReferenceCounting (PythonQtVoidPtrCB *refCB, PythonQtVoidPtrCB *unrefCB)   Sets reference counting callbacks for this class and all its subclasses.
  PythonQtVoidPtrCBreferenceCountingRefCB ()   Returns the ref counting CB, if there is any.
  PythonQtVoidPtrCBreferenceCountingUnrefCB ()   Returns the unref counting CB, if there is any.
  PyObjectgetPythonTypeForProperty (const QString &name)   PythonQtClassInfogetClassInfoForProperty (const QString &name)   Returns the class info for given property, if available.
  bool  supportsRichCompare ()  

a class that stores all required information about a Qt object (and an optional associated C++ class name)

for fast lookup of slots when calling the object from Python

Definition at line 81 of file PythonQtClassInfo.h.

◆ PythonQtClassInfo() PythonQtClassInfo::PythonQtClassInfo ( ) ◆ ~PythonQtClassInfo() PythonQtClassInfo::~PythonQtClassInfo ( ) ◆ addConstructor()

add a constructor, ownership is passed to classinfo

◆ addDecoratorSlot()

add a decorator slot, ownership is passed to classinfo

◆ addGlobalNamespaceWrapper()

Add a wrapper that contains global enums.

◆ addNestedClass()

add a nested class, so that it can be shown as outer class member

◆ addParentClass()

add the parent class info of a CPP object

Definition at line 177 of file PythonQtClassInfo.h.

177

{ _parentClasses.append(

info

); }

PyObject * PythonQtConvertPairToPython(const void *inPair, int metaTypeId)

◆ addPolymorphicHandler()

add a handler for polymorphic downcasting

Definition at line 196 of file PythonQtClassInfo.h.

196

{ _polymorphicHandlers.append(

cb

); }

◆ castDownIfPossible()

cast the pointer down in the class hierarchy if a polymorphic handler allows to do that

◆ castTo()

casts the given ptr to an object of type classname, returns the new pointer which might be different to ptr due to C++ multiple inheritance (if the cast is not possible or if ptr is NULL, NULL is returned)

◆ className() ◆ clearNotFoundCachedMembers() void PythonQtClassInfo::clearNotFoundCachedMembers ( )

clear all members that where cached as "NotFound"

◆ constructors()

get access to the constructor slot (which may be overloaded if there are multiple constructors)

◆ copyObject() PyObject * PythonQtClassInfo::copyObject ( voidcppObject )

Create a copy of the given C++ object (which is known to be of a derived class), wrapped by Python and owned by PythonQt. This will downcast if possible and return a copy of the down casted object. This either requires a copy constructor on the class or it needs to be registered as a meta type.

◆ decorator() QObject * PythonQtClassInfo::decorator ( )

get the decorator qobject instance

◆ destructor()

get access to the destructor slot

◆ escapeReservedNames()

Sometimes enum values use a reserved name in Python. In this case replace it with something that is not reserved

◆ findEnumWrapper()

returns if the localScope has an enum of that type name or if the enum contains a :: scope, if that class contails the enum

◆ getClassInfoForProperty()

Returns the class info for given property, if available.

◆ getCopyConstructor()

Get the copy constructor for this class.

◆ getPythonTypeForProperty()

Returns the Python type object for a given property. (the returned object does not get an extra reference count)

◆ help() QString PythonQtClassInfo::help ( )

get help string for the metaobject

◆ inherits() [1/2]

returns if this class inherits from the given classname

◆ inherits() [2/2]

returns if this class inherits from the given classinfo

◆ isCPPWrapper() bool PythonQtClassInfo::isCPPWrapper ( ) inline

returns if the class is a CPP wrapper

Definition at line 139 of file PythonQtClassInfo.h.

139{ return !_isQObject; }

◆ isQObject() bool PythonQtClassInfo::isQObject ( ) inline ◆ member()

get the Python method definition for a given slot name (without return type and signature)

◆ memberList()

get list of all members (excluding properties, which can be listed with propertyList())

◆ metaObject() ◆ metaTypeId() int PythonQtClassInfo::metaTypeId ( ) inline ◆ nestedClasses() ◆ propertyList()

get list of all properties (on QObjects only, otherwise the list is empty)

◆ pythonQtClassWrapper() PyObject * PythonQtClassInfo::pythonQtClassWrapper ( ) inline ◆ referenceCountingRefCB()

Returns the ref counting CB, if there is any.

◆ referenceCountingUnrefCB()

Returns the unref counting CB, if there is any.

◆ setDecoratorProvider()

set an additional decorator provider that offers additional decorator slots for this class

◆ setDestructor()

set a destructor, ownership is passed to classinfo

◆ setMetaObject()

set the meta object, this will reset the caching

◆ setPythonQtClassWrapper() void PythonQtClassInfo::setPythonQtClassWrapper ( PyObjectobj ) inline ◆ setReferenceCounting()

Sets reference counting callbacks for this class and all its subclasses.

◆ setShellSetInstanceWrapperCB()

set the shell set instance wrapper cb

Definition at line 186 of file PythonQtClassInfo.h.

186 {

187

_shellSetInstanceWrapperCB =

cb

;

188 }

◆ setTypeSlots() void PythonQtClassInfo::setTypeSlots ( int  typeSlots ) inline

set the type capabilities

Definition at line 104 of file PythonQtClassInfo.h.

int typeSlots() const

get the type capabilities

◆ setupCPPObject()

setup as a CPP (non-QObject), taking the classname

◆ setupQObject()

setup as a QObject, taking the meta object as meta information about the QObject

◆ shellSetInstanceWrapperCB()

get the shell set instance wrapper cb

Definition at line 191 of file PythonQtClassInfo.h.

191 {

192 return _shellSetInstanceWrapperCB;

193 }

◆ supportsRichCompare() bool PythonQtClassInfo::supportsRichCompare ( )

Returns if the class supports rich compare. This tests for eq, ne, lt, le, gt, ge slots and if any of the slots is present it returns true and modifies the _typeSlots with Type_RichCompare. The result is cached internally.

◆ typeSlots() int PythonQtClassInfo::typeSlots ( ) const inline ◆ unscopedClassName() QByteArray PythonQtClassInfo::unscopedClassName ( ) const

get the unscoped classname (without ParentClass::) for nested classes

The documentation for this class was generated from the following file:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4