PythonQt
src
PythonQtProperty.h
Go to the documentation of this file.
1
#pragma once
2
3
/*
4
*
5
* Copyright (C) 2010 MeVis Medical Solutions AG All Rights Reserved.
6
*
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public
9
* License as published by the Free Software Foundation; either
10
* version 2.1 of the License, or (at your option) any later version.
11
*
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
16
*
17
* Further, this software is distributed without any warranty that it is
18
* free of the rightful claim of any third person regarding infringement
19
* or the like. Any license provided herein, whether implied or
20
* otherwise, applies only to this software file. Patent licenses, if
21
* any, provided herein do not apply to combinations of this program with
22
* other software, or any other product whatsoever.
23
*
24
* You should have received a copy of the GNU Lesser General Public
25
* License along with this library; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27
*
28
* Contact information: MeVis Medical Solutions AG, Universitaetsallee 29,
29
* 28359 Bremen, Germany or:
30
*
31
* http://www.mevis.de
32
*
33
*/
34
35
#include "
PythonQtPythonInclude.h
"
36
#include "
PythonQtSystem.h
"
37
#include <QByteArray>
38
#include <QList>
39
40
#include <structmember.h>
41
42
extern
PYTHONQT_EXPORT
PyTypeObject
PythonQtProperty_Type
;
43
44
#define PythonQtProperty_Check(op) (Py_TYPE(op) == &PythonQtProperty_Type)
45
46
struct
PythonQtPropertyData
47
{
48
PythonQtPropertyData
() {
49
fget
=
nullptr
;
50
fset
=
nullptr
;
51
fdel
=
nullptr
;
52
freset
=
nullptr
;
53
notify
=
nullptr
;
54
doc
=
nullptr
;
55
designable
=
true
;
56
scriptable
=
true
;
57
stored
=
true
;
58
user
=
false
;
59
constant
=
false
;
60
final
=
false
;
61
}
62
65
bool
callSetter
(
PyObject
*
wrapper
,
PyObject
*
newValue
);
66
69
PyObject
*
callGetter
(
PyObject
*
wrapper
);
70
72
bool
callReset
(
PyObject
*
wrapper
);
73
74
QByteArray
cppType
;
75
76
PyObject
*
fget
;
77
PyObject
*
fset
;
78
PyObject
*
fdel
;
79
PyObject
*
freset
;
80
PyObject
*
notify
;
81
PyObject
*
doc
;
82
83
bool
designable
;
84
bool
scriptable
;
85
bool
stored
;
86
bool
user
;
87
bool
constant
;
88
bool
final
;
89
};
90
91
struct
PythonQtProperty
{
92
PyObject_HEAD
93
PythonQtPropertyData
*
data
;
94
};
PythonQtConvertPairToPython
PyObject * PythonQtConvertPairToPython(const void *inPair, int metaTypeId)
Definition
PythonQtConversion.h:347
PyObject
struct _object PyObject
Definition
PythonQtMethodInfo.h:55
PythonQtProperty_Type
PYTHONQT_EXPORT PyTypeObject PythonQtProperty_Type
PythonQtPythonInclude.h
PythonQtSystem.h
PYTHONQT_EXPORT
#define PYTHONQT_EXPORT
Definition
PythonQtSystem.h:56
PythonQtPropertyData
Definition
PythonQtProperty.h:47
PythonQtPropertyData::fdel
PyObject * fdel
Definition
PythonQtProperty.h:78
PythonQtPropertyData::callSetter
bool callSetter(PyObject *wrapper, PyObject *newValue)
PythonQtPropertyData::stored
bool stored
Definition
PythonQtProperty.h:85
PythonQtPropertyData::user
bool user
Definition
PythonQtProperty.h:86
PythonQtPropertyData::callGetter
PyObject * callGetter(PyObject *wrapper)
PythonQtPropertyData::scriptable
bool scriptable
Definition
PythonQtProperty.h:84
PythonQtPropertyData::fget
PyObject * fget
Definition
PythonQtProperty.h:76
PythonQtPropertyData::callReset
bool callReset(PyObject *wrapper)
Call the freset method in Python, bound to the wrapper object.
PythonQtPropertyData::freset
PyObject * freset
Definition
PythonQtProperty.h:79
PythonQtPropertyData::doc
PyObject * doc
Definition
PythonQtProperty.h:81
PythonQtPropertyData::notify
PyObject * notify
Definition
PythonQtProperty.h:80
PythonQtPropertyData::PythonQtPropertyData
PythonQtPropertyData()
Definition
PythonQtProperty.h:48
PythonQtPropertyData::designable
bool designable
Definition
PythonQtProperty.h:83
PythonQtPropertyData::cppType
QByteArray cppType
Definition
PythonQtProperty.h:74
PythonQtPropertyData::constant
bool constant
Definition
PythonQtProperty.h:87
PythonQtPropertyData::fset
PyObject * fset
Definition
PythonQtProperty.h:77
PythonQtProperty
Definition
PythonQtProperty.h:91
PythonQtProperty::data
PyObject_HEAD PythonQtPropertyData * data
Definition
PythonQtProperty.h:93
Generated on Wed Feb 19 2025 09:30:52 for PythonQt by
1.9.8