KParts

browserinterface.h
1 /*
2  This file is part of the KDE project
3  SPDX-FileCopyrightText: 2001 Simon Hausmann <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef KPARTS_BROWSERINTERFACE_H
9 #define KPARTS_BROWSERINTERFACE_H
10 
11 #include <kparts/kparts_export.h>
12 
13 #include <QObject>
14 
15 class QVariant;
16 
17 namespace KParts
18 {
19 /**
20  * @class BrowserInterface browserinterface.h <KParts/BrowserInterface>
21  *
22  * @short The purpose of this interface is to allow a direct communication between
23  * a KPart and the hosting browser shell (for example Konqueror) . A
24  * shell implementing this interface can propagate it to embedded kpart
25  * components by using the setBrowserInterface call of the part's
26  * KParts::BrowserExtension object.
27  *
28  * This interface looks not very rich, but the main functionality is
29  * implemented using the callMethod method for part->shell
30  * communication and using Qt properties for allowing a part to
31  * to explicitly query information from the shell.
32  *
33  * Konqueror in particular, as 'reference' implementation, provides
34  * the following functionality through this interface:
35  *
36  * Qt properties:
37  * Q_PROPERTY( uint historyLength READ historyLength );
38  *
39  * Callable methods:
40  * void goHistory( int );
41  *
42  */
43 class KPARTS_EXPORT BrowserInterface : public QObject
44 {
45  Q_OBJECT
46 public:
47  explicit BrowserInterface(QObject *parent);
48  ~BrowserInterface() override;
49 
50  /**
51  * Perform a dynamic invocation of a method in the BrowserInterface
52  * implementation. Methods are to be implemented as simple Qt slots.
53  * You should only include the method name, and not the signature,
54  * in the name argument.
55  */
56  void callMethod(const char *name, const QVariant &argument);
57 };
58 
59 }
60 
61 #endif
The purpose of this interface is to allow a direct communication between a KPart and the hosting brow...
The KParts namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 03:47:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.