Debian Codegraph @

src/Gui/ExpressionBindingPy.h

raw
1 /***************************************************************************
2 * Copyright (c) 2020 Werner Mayer <wmayer[at]users.sourceforge.net> *
3 * *
4 * This file is part of the FreeCAD CAx development system. *
5 * *
6 * This library is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU Library General Public *
8 * License as published by the Free Software Foundation; either *
9 * version 2 of the License, or (at your option) any later version. *
10 * *
11 * This library is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU Library General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Library General Public *
17 * License along with this library; see the file COPYING.LIB. If not, *
18 * write to the Free Software Foundation, Inc., 51 Franklin Street, *
19 * Fifth Floor, Boston, MA 02110-1301, USA *
20 * *
21 ***************************************************************************/
22
23 #ifndef EXPRESSIONBINDINGPY_H
24 #define EXPRESSIONBINDINGPY_H
25
26 #include <CXX/Extensions.hxx>
27
28 class QWidget;
29 namespace Gui
30 {
31 class ExpressionBinding;
32
33 class ExpressionBindingPy: public Py::PythonClass<ExpressionBindingPy>
34 {
35 public:
36 static void init_type(); // announce properties and methods
37
38 ExpressionBindingPy(Py::PythonClassInstance* self, Py::Tuple& args, Py::Dict& kwds);
39 ~ExpressionBindingPy() override;
40
41 Py::Object repr() override;
42
43 Py::Object bind(const Py::Tuple&);
44 Py::Object isBound();
45 Py::Object apply(const Py::Tuple&);
46 Py::Object hasExpression();
47 Py::Object autoApply();
48 Py::Object setAutoApply(const Py::Tuple&);
49
50 private:
51 static ExpressionBinding* asBinding(QWidget*);
52
53 private:
54 ExpressionBinding* expr;
55 };
56
57 } // namespace Gui
58
59 #endif // EXPRESSIONBINDING_H