| 1 |
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 |
|
| 5 |
#ifndef DFILEDRAG_H |
| 6 |
#define DFILEDRAG_H |
| 7 |
|
| 8 |
#include <dtkgui_global.h> |
| 9 |
|
| 10 |
#include <DObject> |
| 11 |
|
| 12 |
#include <QDrag> |
| 13 |
#include <QUrl> |
| 14 |
|
| 15 |
DGUI_BEGIN_NAMESPACE |
| 16 |
|
| 17 |
class DFileDragServer; |
| 18 |
class DFileDragPrivate; |
| 19 |
|
| 20 |
class DFileDrag : public QDrag, public DCORE_NAMESPACE::DObject |
| 21 |
{ |
| 22 |
Q_OBJECT |
| 23 |
public: |
| 24 |
explicit DFileDrag(QObject *source, DFileDragServer *server); |
| 25 |
|
| 26 |
QUrl targetUrl(); |
| 27 |
void setMimeData(QMimeData *data); |
| 28 |
|
| 29 |
Q_SIGNALS: |
| 30 |
void targetUrlChanged(QUrl url); |
| 31 |
|
| 32 |
private: |
| 33 |
D_DECLARE_PRIVATE(DFileDrag) |
| 34 |
}; |
| 35 |
|
| 36 |
DGUI_END_NAMESPACE |
| 37 |
|
| 38 |
#endif // DFILEDRAG_H |