00001 #ifndef _PYTHONQTWRAPPER_H 00002 #define _PYTHONQTWRAPPER_H 00003 00004 /* 00005 * 00006 * Copyright (C) 2006 MeVis Research GmbH All Rights Reserved. 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * Further, this software is distributed without any warranty that it is 00019 * free of the rightful claim of any third person regarding infringement 00020 * or the like. Any license provided herein, whether implied or 00021 * otherwise, applies only to this software file. Patent licenses, if 00022 * any, provided herein do not apply to combinations of this program with 00023 * other software, or any other product whatsoever. 00024 * 00025 * You should have received a copy of the GNU Lesser General Public 00026 * License along with this library; if not, write to the Free Software 00027 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00028 * 00029 * Contact information: MeVis Research GmbH, Universitaetsallee 29, 00030 * 28359 Bremen, Germany or: 00031 * 00032 * http://www.mevis.de 00033 * 00034 */ 00035 00036 //---------------------------------------------------------------------------------- 00043 //---------------------------------------------------------------------------------- 00044 00045 #include <Python.h> 00046 00047 #include "PythonQtSystem.h" 00048 #include <QPointer> 00049 00050 #include "structmember.h" 00051 #include "methodobject.h" 00052 #include "compile.h" 00053 #include "eval.h" 00054 00055 class PythonQtClassInfo; 00056 class QObject; 00057 00058 extern PYTHONQT_EXPORT PyTypeObject PythonQtWrapper_Type; 00059 00060 //--------------------------------------------------------------- 00062 typedef struct { 00063 PyObject_HEAD 00064 00066 void setQObject(QObject* object) { 00067 _obj = object; 00068 _objPointerCopy = object; 00069 } 00070 00072 QPointer<QObject> _obj; 00075 void* _objPointerCopy; 00076 00078 void* _wrappedPtr; 00079 00081 PythonQtClassInfo* _info; 00082 00084 bool _ownedByPythonQt; 00085 00086 } PythonQtWrapper; 00087 00088 00089 #endif
1.5.8