itom
Loading...
Searching...
No Matches
pythonFigure.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef PYTHONFIGURE_H
24#define PYTHONFIGURE_H
25
26#include "pythonCommon.h"
27#include "pythonUi.h"
28#include "pythonQtConversion.h"
29#include "pythonQtSignalMapper.h"
30#include "pythonItomMetaObject.h"
31
32#include <qstring.h>
33#include <qvariant.h>
34#include <qobject.h>
35#include <qhash.h>
36#include <qsharedpointer.h>
37#include <qpointer.h>
38
39namespace ito
40{
41
43{
44public:
45
46 //#################################################################################################
47 // Figure
48 //#################################################################################################
49
50 //-------------------------------------------------------------------------------------------------
51 // typedefs
52 //-------------------------------------------------------------------------------------------------
53
54 typedef struct
55 {
56 PythonUi::PyUiItem uiItem;
57 QSharedPointer<unsigned int> guardedFigHandle;
58 int rows;
59 int cols;
60 int currentSubplotIdx;
61 PythonQtSignalMapper *signalMapper;
62 }
64
65 //-------------------------------------------------------------------------------------------------
66 // macros
67 //-------------------------------------------------------------------------------------------------
68 #define PyFigure_Check(op) PyObject_TypeCheck(op, &ito::PythonFigure::PyFigureType)
69
70 //-------------------------------------------------------------------------------------------------
71 // constructor, deconstructor, alloc, dellaoc
72 //-------------------------------------------------------------------------------------------------
73 static void PyFigure_dealloc(PyFigure *self);
74 static PyObject *PyFigure_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
75 static int PyFigure_init(PyFigure *self, PyObject *args, PyObject *kwds);
76
77 //-------------------------------------------------------------------------------------------------
78 // general members
79 //-------------------------------------------------------------------------------------------------
80 static PyObject* PyFigure_repr(PyFigure *self);
81 static PyObject* PyFigure_show(PyFigure *self, PyObject *args);
82 static PyObject* PyFigure_hide(PyFigure *self);
83 static PyObject* PyFigure_plot(PyFigure *self, PyObject *args, PyObject *kwds);
84 static PyObject* PyFigure_plot1(PyFigure *self, PyObject *args, PyObject *kwds);
85 static PyObject* PyFigure_plot2(PyFigure *self, PyObject *args, PyObject *kwds);
86 static PyObject* PyFigure_plot25(PyFigure *self, PyObject *args, PyObject *kwds);
87 static PyObject* PyFigure_liveImage(PyFigure *self, PyObject *args, PyObject *kwds);
88 static PyObject* PyFigure_matplotlib(PyFigure *self, PyObject *args, PyObject *kwds);
89 static PyObject* PyFigure_plotly(PyFigure *self, PyObject *args, PyObject *kwds);
90
91 static PyObject* PyFigure_getSubplot(PyFigure *self, PyObject *args);
92
93 //-------------------------------------------------------------------------------------------------
94 // getter / setter
95 //-------------------------------------------------------------------------------------------------
96 static PyObject* PyFigure_getHandle(PyFigure *self, void *closure);
97 static PyObject* PyFigure_getDocked(PyFigure *self, void *closure);
98 static int PyFigure_setDocked(PyFigure *self, PyObject *value, void *closure);
99
100 //-------------------------------------------------------------------------------------------------
101 // static members
102 //-------------------------------------------------------------------------------------------------
103 static PyObject* PyFigure_close(PyFigure *self, PyObject *args);
104
105 //-------------------------------------------------------------------------------------------------
106 // type structures
107 //-------------------------------------------------------------------------------------------------
108 static PyGetSetDef PyFigure_getseters[];
109 static PyMemberDef PyFigure_members[];
110 static PyMethodDef PyFigure_methods[];
111 static PyTypeObject PyFigureType;
112 static PyModuleDef PyFigureModule;
113 static void PyFigure_addTpDict(PyObject *tp_dict);
114
115private:
116
117};
118
119}; //end namespace ito
120
121
122#endif
Definition pythonFigure.h:43
This class provides the possibility to redirect any signal emitted in an user-defined GUI to differen...
Definition pythonQtSignalMapper.h:162
Definition apiFunctionsGraph.cpp:40
Definition pythonFigure.h:55
Definition pythonUi.h:51