SourceForge.net Logo
PythonQt
Classes | Typedefs | Functions
PythonQt.h File Reference
#include "PythonQtSystem.h"
#include "PythonQtInstanceWrapper.h"
#include "PythonQtClassWrapper.h"
#include "PythonQtSlot.h"
#include "PythonQtObjectPtr.h"
#include "PythonQtStdIn.h"
#include <QObject>
#include <QVariant>
#include <QList>
#include <QHash>
#include <QByteArray>
#include <QStringList>
#include <QtDebug>
#include <iostream>

Go to the source code of this file.

Classes

class  PythonQt
 The main interface to the Python Qt binding, realized as a singleton. More...
class  PythonQtPrivate
 internal PythonQt details More...

Typedefs

typedef void PythonQtQObjectWrappedCB (QObject *object)
typedef void PythonQtQObjectNoLongerWrappedCB (QObject *object)
typedef void * PythonQtPolymorphicHandlerCB (const void *ptr, const char **class_name)
typedef void PythonQtShellSetInstanceWrapperCB (void *object, PythonQtInstanceWrapper *wrapper)
typedef QObject * PythonQtQObjectCreatorFunctionCB ()
 callback to create a QObject lazily

Functions

template<class T >
void PythonQtSetInstanceWrapperOnShell (void *object, PythonQtInstanceWrapper *wrapper)
template<class T1 , class T2 >
int PythonQtUpcastingOffset ()
 returns the offset that needs to be added to upcast an object of type T1 to T2
template<class T >
QObject * PythonQtCreateObject ()
 helper template to create a derived QObject class

Detailed Description

Author:
Florian Link
Last changed by
Author:
florian
Date:
2006-05

Definition in file PythonQt.h.


Typedef Documentation

typedef void* PythonQtPolymorphicHandlerCB(const void *ptr, const char **class_name)

Definition at line 72 of file PythonQt.h.

callback to create a QObject lazily

Definition at line 87 of file PythonQt.h.

typedef void PythonQtQObjectNoLongerWrappedCB(QObject *object)

Definition at line 71 of file PythonQt.h.

typedef void PythonQtQObjectWrappedCB(QObject *object)

Definition at line 70 of file PythonQt.h.

typedef void PythonQtShellSetInstanceWrapperCB(void *object, PythonQtInstanceWrapper *wrapper)

Definition at line 74 of file PythonQt.h.


Function Documentation

template<class T >
QObject* PythonQtCreateObject ( )

helper template to create a derived QObject class

Definition at line 90 of file PythonQt.h.

{ return new T(); };
template<class T >
void PythonQtSetInstanceWrapperOnShell ( void *  object,
PythonQtInstanceWrapper wrapper 
)

Definition at line 76 of file PythonQt.h.

                                                                                                         { 
  (reinterpret_cast<T*>(object))->_wrapper = wrapper;
}
template<class T1 , class T2 >
int PythonQtUpcastingOffset ( )

returns the offset that needs to be added to upcast an object of type T1 to T2

Definition at line 81 of file PythonQt.h.

                                                           {
  return ((reinterpret_cast<char*>(static_cast<T2*>(reinterpret_cast<T1*>(0x100)))) 
          - (reinterpret_cast<char*>(reinterpret_cast<T1*>(0x100))));
}