PythonQt
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 
47 {
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 
70 
72  bool callReset(PyObject* wrapper);
73 
74  QByteArray cppType;
75 
82 
83  bool designable;
84  bool scriptable;
85  bool stored;
86  bool user;
87  bool constant;
88  bool final;
89 };
90 
92  PyObject_HEAD
94 };
struct _object PyObject
PYTHONQT_EXPORT PyTypeObject PythonQtProperty_Type
#define PYTHONQT_EXPORT
bool callSetter(PyObject *wrapper, PyObject *newValue)
bool callReset(PyObject *wrapper)
Call the freset method in Python, bound to the wrapper object.
PyObject * callGetter(PyObject *wrapper)
PyObject_HEAD PythonQtPropertyData * data