1 | /* |
2 | SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #ifndef KLINEEDITURLDROPEVENTFILTER_H |
8 | #define KLINEEDITURLDROPEVENTFILTER_H |
9 | |
10 | #include <kwidgetsaddons_export.h> |
11 | |
12 | #include <QObject> |
13 | |
14 | /** |
15 | * @class KLineEditUrlDropEventFilter klineediturldropeventfilter.h KLineEditUrlDropEventFilter |
16 | * |
17 | * This class provides an event filter that can be installed on a QLineEdit |
18 | * or a subclass of it (KLineEdit) to make it handle URL drop events so |
19 | * when a URL is dropped it replaces the existing content. |
20 | * |
21 | * Porting from KF5 to KF6: |
22 | * |
23 | * The class LineEditUrlDropEventFilter was renamed to KLineEditUrlDropEventFilter. |
24 | * |
25 | * @Since 6.0 |
26 | */ |
27 | class KWIDGETSADDONS_EXPORT KLineEditUrlDropEventFilter : public QObject |
28 | { |
29 | Q_OBJECT |
30 | |
31 | public: |
32 | explicit KLineEditUrlDropEventFilter(QObject *parent = nullptr); |
33 | ~KLineEditUrlDropEventFilter() override; |
34 | |
35 | protected: |
36 | bool eventFilter(QObject *object, QEvent *event) override; |
37 | }; |
38 | |
39 | #endif |
40 | |