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 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 */
32class KPARTS_EXPORT OpenUrlEvent : public QEvent
33{
34public:
35 OpenUrlEvent(ReadOnlyPart *part, const QUrl &url, const OpenUrlArguments &args = OpenUrlArguments());
36 ~OpenUrlEvent() override;
37
38 ReadOnlyPart *part() const;
39 QUrl url() const;
40 OpenUrlArguments arguments() const;
41
42 static bool test(const QEvent *event);
43
44private:
45 const std::unique_ptr<OpenUrlEventPrivate> d;
46};
47
48}
49
50#endif
51

source code of kparts/src/openurlevent.h