summaryrefslogtreecommitdiffstats
path: root/xparts/src/kde
diff options
context:
space:
mode:
Diffstat (limited to 'xparts/src/kde')
-rw-r--r--xparts/src/kde/Makefile.am17
-rw-r--r--xparts/src/kde/kbrowsersignals.cpp31
-rw-r--r--xparts/src/kde/kbrowsersignals.h27
-rw-r--r--xparts/src/kde/xparthost_kpart.cpp150
-rw-r--r--xparts/src/kde/xparthost_kpart.h74
5 files changed, 0 insertions, 299 deletions
diff --git a/xparts/src/kde/Makefile.am b/xparts/src/kde/Makefile.am
deleted file mode 100644
index 9b70542e..00000000
--- a/xparts/src/kde/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-
-INCLUDES = -I$(srcdir)/../interfaces $(all_includes)
-
-lib_LTLIBRARIES = libkdexparts.la
-
-libkdexparts_la_SOURCES = xparthost_kpart.cpp xparthost.skel xpart.stub \
- kbrowsersignals.cpp xbrowsersignals.skel xbrowserextension.stub
-libkdexparts_la_LIBADD = $(LIB_TDEPARTS) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) -lDCOP
-libkdexparts_la_LDFLAGS = $(all_libraries) -no-undefined -version-info 1:0
-
-xpart_DIR=$(srcdir)/../interfaces
-xparthost_DIR=$(srcdir)/../interfaces
-xbrowsersignals_DIR=$(srcdir)/../interfaces
-xbrowserextension_DIR=$(srcdir)/../interfaces
-
-METASOURCES = AUTO
-
diff --git a/xparts/src/kde/kbrowsersignals.cpp b/xparts/src/kde/kbrowsersignals.cpp
deleted file mode 100644
index 59a688e4..00000000
--- a/xparts/src/kde/kbrowsersignals.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "kbrowsersignals.h"
-#include "xparthost_kpart.h"
-#include "xbrowserextension_stub.h"
-#include <kurl.h>
-
-KBrowserSignals::KBrowserSignals( XPartHost_KPart *_part, DCOPRef extension )
- : KParts::BrowserExtension( _part )
-{
- tqDebug("KBrowserSignals constructor");
- part = _part;
- ext = new XBrowserExtension_stub( extension.app(), extension.object() );
- ext->setBrowserSignals( DCOPRef( this ) );
-}
-
-KBrowserSignals::~KBrowserSignals()
-{
- delete ext;
-}
-
-void KBrowserSignals::openURLRequest( const TQCString &url)
-{
- KURL u = TQString(url);
- emit KParts::BrowserExtension::openURLRequest(u);
-}
-
-void KBrowserSignals::createNewWindow( const TQCString &url )
-{
-}
-
-#include "kbrowsersignals.moc"
-
diff --git a/xparts/src/kde/kbrowsersignals.h b/xparts/src/kde/kbrowsersignals.h
deleted file mode 100644
index baee95aa..00000000
--- a/xparts/src/kde/kbrowsersignals.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef __kbrowsersignals_h__
-#define __kbrowsersignals_h__
-
-#include <xbrowsersignals.h>
-#include <tdeparts/browserextension.h>
-#include <dcopref.h>
-
-class XBrowserExtension_stub;
-class XPartHost_KPart;
-
-class KBrowserSignals : public KParts::BrowserExtension, virtual public XBrowserSignals
-{
- Q_OBJECT
-public:
- KBrowserSignals( XPartHost_KPart *part, DCOPRef ref );
- virtual ~KBrowserSignals();
-
-
- virtual ASYNC openURLRequest( const TQCString &url);
- virtual ASYNC createNewWindow( const TQCString &url );
-
-protected:
- XPartHost_KPart *part;
- XBrowserExtension_stub *ext;
-};
-
-#endif
diff --git a/xparts/src/kde/xparthost_kpart.cpp b/xparts/src/kde/xparthost_kpart.cpp
deleted file mode 100644
index cfbe57d2..00000000
--- a/xparts/src/kde/xparthost_kpart.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-#include "xparthost_kpart.h"
-#include "kbrowsersignals.h"
-#include "xpart_stub.h"
-
-#include <dcopclient.h>
-#include <tdeapplication.h>
-
-#include <assert.h>
-
-#include <qxembed.h>
-
-#include <tqdom.h>
-#include <tdeaction.h>
-
-#include <kdebug.h>
-
-XPartHost_KPart::XPartHost_KPart( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name )
- : KParts::ReadOnlyPart( parent, name ),
- XPartHost("parthost")
-{
- m_stub = 0;
- be = 0;
- embed = new QXEmbed(parentWidget, widgetName);
- setWidget(embed);
-}
-
-XPartHost_KPart::~XPartHost_KPart()
-{
- delete m_stub;
-}
-
-DCOPRef XPartHost_KPart::part()
-{
- return m_part;
-}
-
-DCOPRef XPartHost_KPart::registerXPart( const DCOPRef &part )
-{
- m_part = part;
-
- assert( m_stub == 0 );
-
- m_stub = new XPart_stub( part.app(), part.object() );
- m_stub->show();
-
- kdDebug() << "embedding window " << m_stub->windowId() << endl;
- embed->embed( static_cast<WId>( m_stub->windowId() ) );
-
- embed->show();
- DCOPRef ref = m_stub->queryExtension("browserextension");
- if( !ref.isNull() ) {
- tqDebug(" found browser extension ");
- be = new KBrowserSignals( this, ref );
- }
- return DCOPRef( kapp->dcopClient()->appId(), objId() );
-}
-
-
-void XPartHost_KPart::createActions( const TQCString &xmlActions )
-{
- tqDebug("--> createActions");
- // creates a set of actions and adds them to the actionCollection
- TQDomDocument d;
- d.setContent( xmlActions );
-
- TQDomElement docElem = d.documentElement();
-
- kdDebug() << "docElement is " << docElem.tagName() << endl;
-
- TQDomNode n = docElem.firstChild();
- while( !n.isNull() ) {
- TQDomElement e = n.toElement();
- if( !e.isNull() ) {
- if ( e.tagName() == "Action") {
- TQString name = e.attribute("name");
- TQString type = e.attribute("type");
-
- if(type.isEmpty())
- new TDEAction( name, 0, this, TQT_SLOT( actionActivated() ), actionCollection(), name.latin1() );
- else if( type == "toggle" )
- new TDEToggleAction( name, 0, this, TQT_SLOT( actionActivated() ), actionCollection(), name.latin1() );
- kdDebug() << "action=" << name << " type=" << type << endl;
- } else if ( e.tagName() == "XMLFile" ) {
- TQString location = e.attribute("location");
- setXMLFile(location);
- }
- }
- n = n.nextSibling();
- }
- emit actionsInitialized();
-}
-
-
-void XPartHost_KPart::setWindowCaption( const TQString &caption )
-{
- emit KParts::ReadOnlyPart::setWindowCaption( caption );
-}
-
-void XPartHost_KPart::setStatusBarText( const TQString &text )
-{
- emit KParts::ReadOnlyPart::setStatusBarText( text );
-}
-
-void XPartHost_KPart::started()
-{
- emit KParts::ReadOnlyPart::started( 0 );
-}
-
-void XPartHost_KPart::completed()
-{
- emit KParts::ReadOnlyPart::completed();
-}
-
-void XPartHost_KPart::canceled( const TQString &errMsg )
-{
- emit KParts::ReadOnlyPart::canceled( errMsg );
-}
-
-bool XPartHost_KPart::openURL( const KURL &url )
-{
- tqDebug("XPartHost_KPart::openUrl()");
- return m_stub->openURL( url.url().latin1() );
-}
-
-bool XPartHost_KPart::closeURL()
-{
- return m_stub->closeURL();
-}
-
-
-void XPartHost_KPart::actionActivated()
-{
- const TQObject *o = sender();
-
- if( !o->inherits("TDEAction") ) return;
-
- const TDEAction *action = static_cast<const TDEAction *>(o);
- TQString name = action->text();
- int state = 0;
-
- if(action->inherits("TDEToggleAction")) {
- const TDEToggleAction *t = static_cast<const TDEToggleAction *>(action);
- state = t->isChecked();
- }
-
- m_stub->activateAction(name, state);
-}
-
-#include "xparthost_kpart.moc"
diff --git a/xparts/src/kde/xparthost_kpart.h b/xparts/src/kde/xparthost_kpart.h
deleted file mode 100644
index 829f7ca7..00000000
--- a/xparts/src/kde/xparthost_kpart.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef __xparthost_kpart_h__
-#define __xparthost_kpart_h__
-
-#include <xparthost.h>
-
-#include <tdeparts/part.h>
-
-class XPart_stub;
-class KBrowserSignals;
-class QXEmbed;
-
-
-/**
- * This class is the middle class between the host of the KPart (usually a
- * KParts::MainWindow) and the XPart. It transfer calls from the XPart to the
- * KPartHost host and from the KPartHost to the XPart.
- *
- * Note : In the XPart white paper, this class is named KXPartHost
- */
-class XPartHost_KPart : public KParts::ReadOnlyPart, public XPartHost
-{
- Q_OBJECT
-public:
- XPartHost_KPart( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name );
- virtual ~XPartHost_KPart();
-
- // DCOP stuff
-
- /** The XPart uses this function to register itself */
- virtual DCOPRef registerXPart( const DCOPRef &part );
-
- /** Return the XPart DCOPRef to someone willing to communicate with it */
- virtual DCOPRef part();
-
- // KPart signals
-
- /** Emitted by the XPart, to be transfered to the KPart host */
- virtual ASYNC createActions( const TQCString &xmlActions );
- /** Emitted by the XPart, to be transfered to the KPart host */
- virtual ASYNC setWindowCaption( const TQString &caption );
- /** Emitted by the XPart, to be transfered to the KPart host */
- virtual ASYNC setStatusBarText( const TQString &text );
-
- /** Emitted by the XPart, to be transfered to the KPart host */
- virtual ASYNC started();
- /** Emitted by the XPart, to be transfered to the KPart host */
- virtual ASYNC completed();
- /** Emitted by the XPart, to be transfered to the KPart host */
- virtual ASYNC canceled( const TQString &errMsg );
-
- // reimplemented from KReadOnlyPart
- /** function called by the KPart host to be forwarded to the XPart */
- virtual bool openURL( const KURL &url );
- /** function called by the KPart host to be forwarded to the XPart */
- virtual bool closeURL();
-
-protected:
- virtual bool openFile() { return false; }
-
-private slots:
- void actionActivated();
-
-signals:
- void actionsInitialized();
-
-private:
- DCOPRef m_part;
- XPart_stub *m_stub;
- KBrowserSignals *be;
- QXEmbed *embed;
-};
-
-#endif