1
/* This file is part of the KDE project
2
Copyright (C) 2005 Ian Reinhart Geiser <geiseri@kde.org>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License as published by the Free Software Foundation; either
7
version 2 of the License, or (at your option) any later version.
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Library General Public License for more details.
14
You should have received a copy of the GNU Library General Public License
15
along with this library; see the file COPYING.LIB. If not, write to
16
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
Boston, MA 02111-1307, USA.
19
#include "kdevdesignerintegrationiface.h"
21
#include "kdevdesignerintegration.h"
23
KDevDesignerIntegrationIface::KDevDesignerIntegrationIface(KDevDesignerIntegration *p)
24
: DCOPObject("GUIDesigner"), m_designer(p)
26
//FIXME figure out what number our interface is...
30
KDevDesignerIntegrationIface::~KDevDesignerIntegrationIface()
34
void KDevDesignerIntegrationIface::addFunction( const QString & formName, QString returnType, QString function, QString specifier, QString access, uint type )
36
KInterfaceDesigner::Function f = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type };
37
m_designer->addFunction(formName, f);
40
void KDevDesignerIntegrationIface::removeFunction( const QString & formName, QString returnType, QString function, QString specifier, QString access, uint type )
42
KInterfaceDesigner::Function f = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type };
43
m_designer->addFunction(formName, f);
46
void KDevDesignerIntegrationIface::editFunction( const QString & formName, QString oldReturnType, QString oldFunction, QString oldSpecifier, QString oldAccess, uint oldType, QString returnType, QString function, QString specifier, QString access, uint type )
48
KInterfaceDesigner::Function fold = {oldReturnType, oldFunction, oldSpecifier, oldAccess, (KInterfaceDesigner::FunctionType)oldType };
49
KInterfaceDesigner::Function fnew = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type };
50
m_designer->editFunction(formName,fold,fnew);
53
void KDevDesignerIntegrationIface::openFunction( const QString & formName, const QString & functionName )
55
m_designer->openFunction(formName,functionName);
58
void KDevDesignerIntegrationIface::openSource( const QString & formName )
60
m_designer->openSource(formName);