blob: 9428fc0aa585f1dd22f0e7157b0a258457b94f4c (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#ifndef __xparthost_kpart_h__
#define __xparthost_kpart_h__
#include <xparthost.h>
#include <kparts/part.h>
class XPart_stub;
class KBrowserSignals;
class TQXEmbed;
/**
* 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( TTQWidget *parentWidget, const char *widgetName,
TTQObject *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 TTQCString &xmlActions );
/** Emitted by the XPart, to be transfered to the KPart host */
virtual ASYNC setWindowCaption( const TTQString &caption );
/** Emitted by the XPart, to be transfered to the KPart host */
virtual ASYNC setStatusBarText( const TTQString &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 TTQString &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;
TQXEmbed *embed;
};
#endif
|