Path: blob/devel/ElmerGUI/PythonQt/src/PythonQtObjectPtr.cpp
3206 views
/*1*2* Copyright (C) 2006 MeVis Research GmbH All Rights Reserved.3*4* This library is free software; you can redistribute it and/or5* modify it under the terms of the GNU Lesser General Public6* License as published by the Free Software Foundation; either7* version 2.1 of the License, or (at your option) any later version.8*9* This library is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU12* Lesser General Public License for more details.13*14* Further, this software is distributed without any warranty that it is15* free of the rightful claim of any third person regarding infringement16* or the like. Any license provided herein, whether implied or17* otherwise, applies only to this software file. Patent licenses, if18* any, provided herein do not apply to combinations of this program with19* other software, or any other product whatsoever.20*21* You should have received a copy of the GNU Lesser General Public22* License along with this library; if not, write to the Free Software23* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA24*25* Contact information: MeVis Research GmbH, Universitaetsallee 29,26* 28359 Bremen, Germany or:27*28* http://www.mevis.de29*30*/3132//----------------------------------------------------------------------------------33/*!34// \file PythonQtObjectPtr.cpp35// \author Florian Link36// \author Last changed by $Author: florian $37// \date 2006-0538*/39//----------------------------------------------------------------------------------4041#include <PythonQt.h>4243QVariant PythonQtObjectPtr::evalScript(const QString& script, int start)44{45return PythonQt::self()->evalScript(_object, script, start);46}4748void PythonQtObjectPtr::evalFile(const QString& file)49{50PythonQt::self()->evalFile(_object, file);51}5253QVariant PythonQtObjectPtr::evalCode(PyObject* pycode)54{55return PythonQt::self()->evalCode(_object, pycode);56}5758void PythonQtObjectPtr::addObject(const QString& name, QObject* object)59{60PythonQt::self()->addObject(_object, name, object);61}6263void PythonQtObjectPtr::addVariable(const QString& name, const QVariant& v)64{65PythonQt::self()->addVariable(_object, name, v);66}6768void PythonQtObjectPtr::removeVariable(const QString& name)69{70PythonQt::self()->removeVariable(_object, name);71}7273QVariant PythonQtObjectPtr::getVariable(const QString& name)74{75return PythonQt::self()->getVariable(_object, name);76}777879QVariant PythonQtObjectPtr::call(const QString& callable, const QVariantList& args)80{81return PythonQt::self()->call(_object, callable, args);82}83848586