KParts

openurlevent.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_openurlevent_h__
10 #define __kparts_openurlevent_h__
11 
12 #include <kparts/browserarguments.h>
13 #include <kparts/event.h>
14 #include <kparts/openurlarguments.h>
15 
16 class QUrl;
17 
18 namespace KParts
19 {
20 class ReadOnlyPart;
21 class OpenUrlEventPrivate;
22 
23 /**
24  * @class OpenUrlEvent openurlevent.h <KParts/OpenUrlEvent>
25  *
26  * @short The KParts::OpenUrlEvent event informs that a given part has opened a given URL.
27  * Applications can use this event to send this information to interested plugins.
28  *
29  * The event should be sent before opening the URL in the part, so that the plugins
30  * can use part()->url() to get the old URL.
31  */
32 class KPARTS_EXPORT OpenUrlEvent : public Event
33 {
34 public:
36  const QUrl &url,
37  const OpenUrlArguments &args = OpenUrlArguments(),
38  const BrowserArguments &browserArgs = BrowserArguments());
39  ~OpenUrlEvent() override;
40 
41  ReadOnlyPart *part() const;
42  QUrl url() const;
43  OpenUrlArguments arguments() const;
44  BrowserArguments browserArguments() const;
45 
46  static bool test(const QEvent *event);
47 
48 private:
49  Q_DECLARE_PRIVATE_D(Event::d, OpenUrlEvent)
50 #if KPARTS_BUILD_DEPRECATED_SINCE(5, 79)
51  // Unused, kept for ABI compatibility
52  const void *__kparts_d_do_not_use;
53 #endif
54 };
55 
56 }
57 
58 #endif
BrowserArguments is a set of web-browsing-specific arguments, which allow specifying how a URL should...
Base class for any "viewer" part.
Definition: readonlypart.h:51
OpenUrlArguments is the set of arguments that specify how a URL should be opened by KParts::ReadOnlyP...
The KParts::OpenUrlEvent event informs that a given part has opened a given URL. Applications can use...
Definition: openurlevent.h:32
The KParts namespace,.
Base class for all KParts events.
Definition: event.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 9 2022 03:51:33 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.