Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/ElmerGUI/PythonQt/src/PythonQtWrapper.h
3206 views
1
#ifndef _PYTHONQTWRAPPER_H
2
#define _PYTHONQTWRAPPER_H
3
4
/*
5
*
6
* Copyright (C) 2006 MeVis Research GmbH All Rights Reserved.
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public
10
* License as published by the Free Software Foundation; either
11
* version 2.1 of the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* Further, this software is distributed without any warranty that it is
19
* free of the rightful claim of any third person regarding infringement
20
* or the like. Any license provided herein, whether implied or
21
* otherwise, applies only to this software file. Patent licenses, if
22
* any, provided herein do not apply to combinations of this program with
23
* other software, or any other product whatsoever.
24
*
25
* You should have received a copy of the GNU Lesser General Public
26
* License along with this library; if not, write to the Free Software
27
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
*
29
* Contact information: MeVis Research GmbH, Universitaetsallee 29,
30
* 28359 Bremen, Germany or:
31
*
32
* http://www.mevis.de
33
*
34
*/
35
36
//----------------------------------------------------------------------------------
37
/*!
38
// \file PythonQtWrapper.h
39
// \author Florian Link
40
// \author Last changed by $Author: florian $
41
// \date 2006-05
42
*/
43
//----------------------------------------------------------------------------------
44
45
#include <Python.h>
46
47
#include "PythonQtSystem.h"
48
49
#include "structmember.h"
50
#include "methodobject.h"
51
#include "compile.h"
52
#include "eval.h"
53
54
class PythonQtClassInfo;
55
class QObject;
56
57
extern PYTHONQT_EXPORT PyTypeObject PythonQtWrapper_Type;
58
59
//---------------------------------------------------------------
60
//! a Python wrapper object for Qt objects and C++ objects (that are themselves wrapped by wrapper QObjects)
61
typedef struct {
62
PyObject_HEAD
63
64
//! pointer to the wrapped Qt object or if _wrappedPtr is set, the Qt object that wraps the C++ Ptr
65
QObject* _obj;
66
//! optional C++ object Ptr that is wrapped by the above _obj
67
void* _wrappedPtr;
68
69
//! the class information, this is set even if the _obj or _wrappedPtr is NULL to support typed NULL pointers
70
PythonQtClassInfo* _info;
71
72
//! flag that stores if the object is owned by pythonQt
73
bool _ownedByPythonQt;
74
75
} PythonQtWrapper;
76
77
78
#endif
79
80