KParts

browserhostextension.h
1 /*
2  This file is part of the KDE project
3  SPDX-FileCopyrightText: 1999 Simon Hausmann <[email protected]>
4  SPDX-FileCopyrightText: 1999 David Faure <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef __kparts_browserhostextension_h__
10 #define __kparts_browserhostextension_h__
11 
12 #include <kparts/kparts_export.h>
13 
14 #if KPARTS_ENABLE_DEPRECATED_SINCE(5, 78)
15 
16 #include <QObject>
17 #include <memory>
18 
19 class QStringList;
20 class QString;
21 template<typename T>
22 class QList;
23 
24 namespace KParts
25 {
26 class ReadOnlyPart;
27 class OpenUrlArguments;
28 struct BrowserArguments;
29 class BrowserHostExtensionPrivate;
30 
31 /**
32  * @class BrowserHostExtension browserhostextension.h <KParts/BrowserHostExtension>
33  *
34  * @short An extension class for container parts, i.e. parts that contain
35  * other parts.
36  * For instance a KHTMLPart hosts one part per frame.
37  * @deprecated since 5.78 for lack of usage
38  */
39 class KPARTS_EXPORT BrowserHostExtension : public QObject
40 {
41  Q_OBJECT
42 public:
43  KPARTS_DEPRECATED_VERSION(5, 78, "Deprecated for lack of usage")
45 
46  ~BrowserHostExtension() override;
47 
48  /**
49  * Returns a list of the names of all hosted child objects.
50  *
51  * Note that this method does not query the child objects recursively.
52  */
53  virtual QStringList frameNames() const;
54 
55  /**
56  * Returns a list of pointers to all hosted child objects.
57  *
58  * Note that this method does not query the child objects recursively.
59  */
60  virtual const QList<KParts::ReadOnlyPart *> frames() const;
61 
62  /**
63  * Returns the part that contains @p frame and that may be accessed
64  * by @p callingPart
65  */
66  virtual BrowserHostExtension *findFrameParent(KParts::ReadOnlyPart *callingPart, const QString &frame);
67 
68  /**
69  * Opens the given url in a hosted child frame. The frame name is specified in the
70  * frameName variable in the @p browserArguments parameter (see KParts::BrowserArguments ) .
71  */
72  virtual bool openUrlInFrame(const QUrl &url, const KParts::OpenUrlArguments &arguments, const KParts::BrowserArguments &browserArguments);
73 
74  /**
75  * Queries @p obj for a child object which inherits from this
76  * BrowserHostExtension class. Convenience method.
77  */
78  static BrowserHostExtension *childObject(QObject *obj);
79 
80 private:
81  std::unique_ptr<BrowserHostExtensionPrivate> const d;
82 };
83 
84 }
85 
86 #endif
87 #endif
BrowserArguments is a set of web-browsing-specific arguments, which allow specifying how a URL should...
An extension class for container parts, i.e.
The KParts namespace,.
OpenUrlArguments is the set of arguments that specify how a URL should be opened by KParts::ReadOnlyP...
Base class for any "viewer" part.
Definition: readonlypart.h:51
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 22:49:11 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.