| 1 |
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd. |
| 2 |
// |
| 3 |
// SPDX-License-Identifier: LGPL-3.0-or-later |
| 4 |
|
| 5 |
#ifndef DCAPMANAGER_H |
| 6 |
#define DCAPMANAGER_H |
| 7 |
|
| 8 |
#include <DObject> |
| 9 |
|
| 10 |
#include <QObject> |
| 11 |
|
| 12 |
DCORE_BEGIN_NAMESPACE |
| 13 |
class DCapManagerPrivate; |
| 14 |
class DCapManager : public QObject, public DObject |
| 15 |
{ |
| 16 |
Q_OBJECT |
| 17 |
Q_DISABLE_COPY(DCapManager) |
| 18 |
D_DECLARE_PRIVATE(DCapManager) |
| 19 |
public: |
| 20 |
static DCapManager *instance(); |
| 21 |
#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0) |
| 22 |
QT_DEPRECATED_X("This api will no longer take effect, please use DCapDir or DCapFile") |
| 23 |
static void registerFileEngine(); |
| 24 |
QT_DEPRECATED_X("This api will no longer take effect, please use DCapDir or DCapFile") |
| 25 |
static void unregisterFileEngine(); |
| 26 |
#endif |
| 27 |
void appendPath(const QString &path); |
| 28 |
void appendPaths(const QStringList &pathList); |
| 29 |
|
| 30 |
void removePath(const QString &path); |
| 31 |
void removePaths(const QStringList &paths); |
| 32 |
|
| 33 |
QStringList paths() const; |
| 34 |
|
| 35 |
protected: |
| 36 |
explicit DCapManager(); |
| 37 |
}; |
| 38 |
|
| 39 |
DCORE_END_NAMESPACE |
| 40 |
#endif // DCAPMANAGER_H |