kate Library API Documentation

katemainwindowiface.cpp

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Ian Reinhart Geiser <geiseri@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00016    Boston, MA 02111-1307, USA.
00017 */
00018 
00019 #include "katemainwindowiface.h"
00020 
00021 #include "katemainwindow.h"
00022 
00023 #include <kdebug.h>
00024 
00025 KateMainWindowDCOPIface::KateMainWindowDCOPIface (KateMainWindow *w) : DCOPObject ((QString("KateMainWindow#%1").arg(w->mainWindowNumber())).latin1()), m_w (w)
00026 {
00027 }
00028 
00029 DCOPRef KateMainWindowDCOPIface::activeProject () const
00030 {
00031   Kate::Project *p = m_w->activeProject ();
00032 
00033   if (p)
00034     return DCOPRef (p->dcopObject ());
00035 
00036   return DCOPRef ();
00037 }
00038 
00039 DCOPRef KateMainWindowDCOPIface::createProject (QString type, QString name, QString filename)
00040 {
00041   Kate::Project *p = m_w->createProject (type, name, filename);
00042 
00043   if (p)
00044     return DCOPRef (p->dcopObject ());
00045 
00046   return DCOPRef ();
00047 }
00048 
00049 DCOPRef KateMainWindowDCOPIface::openProject (QString filename)
00050 {
00051   Kate::Project *p = m_w->openProject (filename);
00052 
00053   if (p)
00054     return DCOPRef (p->dcopObject ());
00055 
00056   return DCOPRef ();
00057 }
KDE Logo
This file is part of the documentation for kate Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jun 14 01:19:50 2006 by doxygen 1.4.0 written by Dimitri van Heesch, © 1997-2003