File indexing completed on 2024-04-28 15:32:17

0001 /*
0002     SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef LINEEDITURLDROPEVENTFILTER_H
0008 #define LINEEDITURLDROPEVENTFILTER_H
0009 
0010 #include <kwidgetsaddons_export.h>
0011 
0012 #include <QObject>
0013 
0014 /**
0015  * @class LineEditUrlDropEventFilter lineediturldropeventfilter.h LineEditUrlDropEventFilter
0016  *
0017  * This class provides an event filter that can be installed on a QLineEdit
0018  * or a subclass of it (KLineEdit) to make it handle url drop events so
0019  * when a url is dropped it replaces the existing content.
0020  */
0021 class KWIDGETSADDONS_EXPORT LineEditUrlDropEventFilter : public QObject
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     explicit LineEditUrlDropEventFilter(QObject *parent = nullptr);
0027     ~LineEditUrlDropEventFilter() override;
0028     bool eventFilter(QObject *obj, QEvent *ev) override;
0029 };
0030 
0031 #endif