File indexing completed on 2024-04-28 03:59:06
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 KLINEEDITURLDROPEVENTFILTER_H 0008 #define KLINEEDITURLDROPEVENTFILTER_H 0009 0010 #include <kwidgetsaddons_export.h> 0011 0012 #include <QObject> 0013 0014 /** 0015 * @class KLineEditUrlDropEventFilter klineediturldropeventfilter.h KLineEditUrlDropEventFilter 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 * Porting from KF5 to KF6: 0022 * 0023 * The class LineEditUrlDropEventFilter was renamed to KLineEditUrlDropEventFilter. 0024 * 0025 * @Since 6.0 0026 */ 0027 class KWIDGETSADDONS_EXPORT KLineEditUrlDropEventFilter : public QObject 0028 { 0029 Q_OBJECT 0030 0031 public: 0032 explicit KLineEditUrlDropEventFilter(QObject *parent = nullptr); 0033 ~KLineEditUrlDropEventFilter() override; 0034 0035 protected: 0036 bool eventFilter(QObject *object, QEvent *event) override; 0037 }; 0038 0039 #endif