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 LINEEDITURLDROPEVENTFILTER_H
8 #define LINEEDITURLDROPEVENTFILTER_H
9 
10 #include <kwidgetsaddons_export.h>
11 
12 #include <QObject>
13 
14 /**
15  * @class LineEditUrlDropEventFilter lineediturldropeventfilter.h LineEditUrlDropEventFilter
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 class KWIDGETSADDONS_EXPORT LineEditUrlDropEventFilter : public QObject
22 {
23     Q_OBJECT
24 
25 public:
26     explicit LineEditUrlDropEventFilter(QObject *parent = nullptr);
27     ~LineEditUrlDropEventFilter() override;
28     bool eventFilter(QObject *obj, QEvent *ev) override;
29 };
30 
31 #endif
32