00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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 }