1/*
2 SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KLINEEDITEVENTHANDLER_H
7#define KLINEEDITEVENTHANDLER_H
8
9#include <kwidgetsaddons_export.h>
10
11class QObject;
12
13/**
14 * Event-handling utilities for QLineEdit instances.
15 *
16 * @since 6.0
17 */
18namespace KLineEditEventHandler
19{
20/** Do not propagate Return or Enter key presses in line edits.
21 *
22 * QLineEdit::returnPressed() will still be emitted as normal, but the
23 * key event isn't propagated further up the widget hierarchy. This is
24 * useful to prevent closing a dialog for example.
25 */
26KWIDGETSADDONS_EXPORT void catchReturnKey(QObject *lineEdit);
27
28/**
29 * Handle drop events with URLs and replace the current line edit with the
30 * dropped URL.
31 */
32KWIDGETSADDONS_EXPORT void handleUrlDrops(QObject *lineEdit);
33};
34
35#endif
36

source code of kwidgetsaddons/src/klineediteventhandler.h