lib Library API Documentation

KoMainWindowIface.cc

00001 /* This file is part of the KDE project
00002    Copyright (c) 2001 David Faure <faure@kde.org>
00003 
00004    $Id: KoMainWindowIface.cc 161643 2002-06-17 15:54:56Z kervel $
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019    Boston, MA 02111-1307, USA.
00020 */
00021 #include "KoMainWindowIface.h"
00022 
00023 #include "koMainWindow.h"
00024 
00025 #include <kapplication.h>
00026 #include <dcopclient.h>
00027 #include <kdcopactionproxy.h>
00028 
00029 KoMainWindowIface::KoMainWindowIface( KoMainWindow *mainwindow )
00030     : DCOPObject( mainwindow )
00031 {
00032     m_pMainWindow = mainwindow;
00033     m_actionProxy = new KDCOPActionProxy( mainwindow->actionCollection(), this );
00034 }
00035 
00036 KoMainWindowIface::~KoMainWindowIface()
00037 {
00038     delete m_actionProxy;
00039 }
00040 
00041 DCOPRef KoMainWindowIface::action( const QCString &name )
00042 {
00043     return DCOPRef( kapp->dcopClient()->appId(), m_actionProxy->actionObjectId( name ) );
00044 }
00045 
00046 QCStringList KoMainWindowIface::actions()
00047 {
00048     QCStringList res;
00049     QValueList<KAction *> lst = m_actionProxy->actions();
00050     QValueList<KAction *>::ConstIterator it = lst.begin();
00051     QValueList<KAction *>::ConstIterator end = lst.end();
00052     for (; it != end; ++it )
00053         res.append( (*it)->name() );
00054 
00055     return res;
00056 }
00057 
00058 QMap<QCString,DCOPRef> KoMainWindowIface::actionMap()
00059 {
00060     return m_actionProxy->actionMap();
00061 }
00062 
00063 ASYNC KoMainWindowIface::print(bool quick) {
00064     m_pMainWindow->print(quick);
00065 }
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:40:02 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003