summaryrefslogtreecommitdiffstats
path: root/xparts/mozilla/kmozillapart.cpp
blob: 3297692dba6ae86f79d16e9bd6a009da22e9b1ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "kmozillapart.h"

#include <dcopclient.h>
#include <dcopobject.h>
#include <kapplication.h>
#include <kstdaction.h>
#include <kaction.h>
#include <kmainwindow.h>
#include <kprocess.h>
#include <kparts/mainwindow.h>
#include <kdebug.h>
#include <kaboutdata.h>
#include <kparts/genericfactory.h>

typedef KParts::GenericFactory<KMozillaPart> KMozillaPartFactory;
K_EXPORT_COMPONENT_FACTORY( libkmozillapart, KMozillaPartFactory );

KMozillaPart::KMozillaPart(TTQWidget *parentWidget, const char *widgetName,
	                   TTQObject *parent, const char *name, const TTQStringList &)
	: XPartHost_KPart(parentWidget, widgetName, parent, name)
{
    setInstance( KMozillaPartFactory::instance() );

    m_partProcess = new KProcess;
    *m_partProcess << "kmozilla"
		   << kapp->dcopClient()->appId() << objId();
    m_partProcess->start();

    qDebug("---->>>>>> enter loop");
    kapp->enter_loop();
    qDebug("----<<<<<< left loop");
}

KMozillaPart::~KMozillaPart()
{
    delete m_partProcess;
}

void KMozillaPart::createActions( const TTQCString &xmlActions )
{
    XPartHost_KPart::createActions( xmlActions );
    qDebug("----<<<<<< exit loop");
    kapp->exit_loop();
}

KAboutData *KMozillaPart::createAboutData()
{
    return new KAboutData( "kmozilla", "kmozilla", "0.1" );
}

#include "kmozillapart.moc"