diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 90825e2392b2d70e43c7a25b8a3752299a933894 (patch) | |
tree | e33aa27f02b74604afbfd0ea4f1cfca8833d882a /xparts/src/kde/xparthost_kpart.h | |
download | tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'xparts/src/kde/xparthost_kpart.h')
-rw-r--r-- | xparts/src/kde/xparthost_kpart.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/xparts/src/kde/xparthost_kpart.h b/xparts/src/kde/xparthost_kpart.h new file mode 100644 index 00000000..5a12dec0 --- /dev/null +++ b/xparts/src/kde/xparthost_kpart.h @@ -0,0 +1,74 @@ +#ifndef __xparthost_kpart_h__ +#define __xparthost_kpart_h__ + +#include <xparthost.h> + +#include <kparts/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( QWidget *parentWidget, const char *widgetName, + QObject *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 QCString &xmlActions ); + /** Emitted by the XPart, to be transfered to the KPart host */ + virtual ASYNC setWindowCaption( const QString &caption ); + /** Emitted by the XPart, to be transfered to the KPart host */ + virtual ASYNC setStatusBarText( const QString &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 QString &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 |