1/*
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 1999 Simon Hausmann <hausmann@kde.org>
4 SPDX-FileCopyrightText: 1999 David Faure <faure@kde.org>
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 <QEvent>
13#include <kparts/openurlarguments.h>
14#include <memory>
15
16class QUrl;
17
18namespace KParts
19{
20class ReadOnlyPart;
21class OpenUrlEventPrivate;
22
23/*!
24 * \class KParts::OpenUrlEvent
25 * \inheaderfile KParts/OpenUrlEvent
26 * \inmodule KParts
27 *
28 * \brief The KParts::OpenUrlEvent event informs that a given part has opened a given URL.
29 *
30 * Applications can use this event to send this information to interested plugins.
31 *
32 * The event should be sent before opening the URL in the part, so that the plugins
33 * can use part()->url() to get the old URL.
34 */
35class KPARTS_EXPORT OpenUrlEvent : public QEvent
36{
37public:
38 /*!
39 *
40 */
41 OpenUrlEvent(ReadOnlyPart *part, const QUrl &url, const OpenUrlArguments &args = OpenUrlArguments());
42 ~OpenUrlEvent() override;
43
44 /*!
45 *
46 */
47 ReadOnlyPart *part() const;
48
49 /*!
50 *
51 */
52 QUrl url() const;
53
54 /*!
55 *
56 */
57 OpenUrlArguments arguments() const;
58
59 /*!
60 *
61 */
62 static bool test(const QEvent *event);
63
64private:
65 const std::unique_ptr<OpenUrlEventPrivate> d;
66};
67
68}
69
70#endif
71

source code of kparts/src/openurlevent.h