blob: 65314fd20ceebd5993274fde248b03ba4865c53d (
plain)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 | // Copyright (C) 2016 The Qt Company Ltd.// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only#ifndef QDRAG_H#define QDRAG_H#include <QtGui/qtguiglobal.h>#include <QtCore/qobject.h>QT_REQUIRE_CONFIG(draganddrop); QT_BEGIN_NAMESPACE class QMimeData;class QDragPrivate;class QPixmap;class QPoint;class QDragManager;class Q_GUI_EXPORT QDrag :public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDrag)public:explicitQDrag(QObject *dragSource);~QDrag();voidsetMimeData(QMimeData *data); QMimeData *mimeData()const;voidsetPixmap(const QPixmap &); QPixmap pixmap()const;voidsetHotSpot(const QPoint &hotspot); QPoint hotSpot()const; QObject *source()const; QObject *target()const;Qt::DropAction exec(Qt::DropActions supportedActions =Qt::MoveAction);Qt::DropAction exec(Qt::DropActions supportedActions,Qt::DropAction defaultAction);voidsetDragCursor(const QPixmap &cursor,Qt::DropAction action); QPixmap dragCursor(Qt::DropAction action)const;Qt::DropActions supportedActions()const;Qt::DropAction defaultAction()const;static voidcancel(); Q_SIGNALS:voidactionChanged(Qt::DropAction action);voidtargetChanged(QObject *newTarget);private:friend class QDragManager;Q_DISABLE_COPY(QDrag)}; QT_END_NAMESPACE #endif// QDRAG_H
|