| 1 |
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 |
|
| 5 |
#ifndef DFILEDRAGSERVER_H |
| 6 |
#define DFILEDRAGSERVER_H |
| 7 |
|
| 8 |
#include "dfiledragcommon.h" |
| 9 |
|
| 10 |
#include <dtkgui_global.h> |
| 11 |
#include <DObject> |
| 12 |
|
| 13 |
#include <QObject> |
| 14 |
|
| 15 |
class QMimeData; |
| 16 |
|
| 17 |
DGUI_BEGIN_NAMESPACE |
| 18 |
|
| 19 |
class DFileDragServerPrivate; |
| 20 |
|
| 21 |
class DFileDragServer : public QObject, public DCORE_NAMESPACE::DObject |
| 22 |
{ |
| 23 |
Q_OBJECT |
| 24 |
public: |
| 25 |
explicit DFileDragServer(QObject *parent = nullptr); |
| 26 |
~DFileDragServer(); |
| 27 |
QVariant targetData(const QString &key) const; |
| 28 |
|
| 29 |
public Q_SLOTS: |
| 30 |
void setProgress(int progress); |
| 31 |
void setState(DFileDragState state); |
| 32 |
|
| 33 |
Q_SIGNALS: |
| 34 |
void targetDataChanged(const QString &key); |
| 35 |
|
| 36 |
private: |
| 37 |
D_DECLARE_PRIVATE(DFileDragServer) |
| 38 |
friend class DDndSourceInterface; |
| 39 |
friend class DFileDrag; |
| 40 |
}; |
| 41 |
|
| 42 |
DGUI_END_NAMESPACE |
| 43 |
|
| 44 |
#endif // DFILEDRAGSERVER_H |