/* SPDX-FileCopyrightText: 2008-2013 Aaron Seigo SPDX-FileCopyrightText: 2010-2013 Marco Martin SPDX-License-Identifier: LGPL-2.0-or-later */ #ifndef DROPMENU_H #define DROPMENU_H #include #include class QJSValue; class QMenu; class QAction; namespace KIO { class DropJob; } class ContainmentItem; class DropMenu : public QObject { Q_OBJECT public: DropMenu(KIO::DropJob *dropJob, const QPoint &dropPoint, ContainmentItem *parent = nullptr); ~DropMenu() override; QList urls() const; QPoint dropPoint() const; void setUrls(const QList &urls); void setMultipleMimetypes(bool multipleMimetypes); void addAction(QAction *action); bool isDropjobMenu() const; bool isMultipleMimetypes() const; void show(); private: QPoint m_dropPoint; QMenu *m_menu = nullptr; KIO::DropJob *m_dropJob = nullptr; QList m_dropActions = QList(); QList m_urls = QList(); bool m_multipleMimetypes = false; }; #endif