1/*
2 SPDX-FileCopyrightText: 2009 Rahman Duran <rahman.duran@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef KURLNAVIGATORMENU_P_H
8#define KURLNAVIGATORMENU_P_H
9
10#include <QMenu>
11
12namespace KDEPrivate
13{
14/**
15 * @brief Provides drop-down menus for the URL navigator.
16 *
17 * The implementation extends QMenu with drag & drop support.
18 *
19 * @internal
20 */
21class KUrlNavigatorMenu : public QMenu
22{
23 Q_OBJECT
24
25public:
26 explicit KUrlNavigatorMenu(QWidget *parent);
27 ~KUrlNavigatorMenu() override;
28
29Q_SIGNALS:
30 /**
31 * Is emitted when drop event occurs.
32 */
33 void urlsDropped(QAction *action, QDropEvent *event);
34
35 /**
36 * Is emitted, if the action \p action has been clicked.
37 */
38 void mouseButtonClicked(QAction *action, Qt::MouseButton button);
39
40protected:
41 void dragEnterEvent(QDragEnterEvent *event) override;
42 void dragMoveEvent(QDragMoveEvent *event) override;
43 void dropEvent(QDropEvent *event) override;
44 void mouseMoveEvent(QMouseEvent *event) override;
45 void mouseReleaseEvent(QMouseEvent *event) override;
46
47private:
48 const QPoint m_initialMousePosition;
49 bool m_mouseMoved;
50};
51
52} // namespace KDEPrivate
53
54#endif
55

source code of kio/src/filewidgets/kurlnavigatormenu_p.h