Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/ElmerGUI/PythonQt/src/PythonQtObjectPtr.cpp
3206 views
1
/*
2
*
3
* Copyright (C) 2006 MeVis Research GmbH All Rights Reserved.
4
*
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
9
*
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
14
*
15
* Further, this software is distributed without any warranty that it is
16
* free of the rightful claim of any third person regarding infringement
17
* or the like. Any license provided herein, whether implied or
18
* otherwise, applies only to this software file. Patent licenses, if
19
* any, provided herein do not apply to combinations of this program with
20
* other software, or any other product whatsoever.
21
*
22
* You should have received a copy of the GNU Lesser General Public
23
* License along with this library; if not, write to the Free Software
24
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
*
26
* Contact information: MeVis Research GmbH, Universitaetsallee 29,
27
* 28359 Bremen, Germany or:
28
*
29
* http://www.mevis.de
30
*
31
*/
32
33
//----------------------------------------------------------------------------------
34
/*!
35
// \file PythonQtObjectPtr.cpp
36
// \author Florian Link
37
// \author Last changed by $Author: florian $
38
// \date 2006-05
39
*/
40
//----------------------------------------------------------------------------------
41
42
#include <PythonQt.h>
43
44
QVariant PythonQtObjectPtr::evalScript(const QString& script, int start)
45
{
46
return PythonQt::self()->evalScript(_object, script, start);
47
}
48
49
void PythonQtObjectPtr::evalFile(const QString& file)
50
{
51
PythonQt::self()->evalFile(_object, file);
52
}
53
54
QVariant PythonQtObjectPtr::evalCode(PyObject* pycode)
55
{
56
return PythonQt::self()->evalCode(_object, pycode);
57
}
58
59
void PythonQtObjectPtr::addObject(const QString& name, QObject* object)
60
{
61
PythonQt::self()->addObject(_object, name, object);
62
}
63
64
void PythonQtObjectPtr::addVariable(const QString& name, const QVariant& v)
65
{
66
PythonQt::self()->addVariable(_object, name, v);
67
}
68
69
void PythonQtObjectPtr::removeVariable(const QString& name)
70
{
71
PythonQt::self()->removeVariable(_object, name);
72
}
73
74
QVariant PythonQtObjectPtr::getVariable(const QString& name)
75
{
76
return PythonQt::self()->getVariable(_object, name);
77
}
78
79
80
QVariant PythonQtObjectPtr::call(const QString& callable, const QVariantList& args)
81
{
82
return PythonQt::self()->call(_object, callable, args);
83
}
84
85
86