DtkCore
DTK Core module
dtrashmanager.h
1/*
2 * Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef DTRASHMANAGER_H
19#define DTRASHMANAGER_H
20
21#include <dtkcore_global.h>
22#include <DObject>
23
24#include <QObject>
25
26DCORE_BEGIN_NAMESPACE
27
28class DTrashManagerPrivate;
29class LIBDTKCORESHARED_EXPORT DTrashManager : public QObject, public DObject
30{
31public:
32 static DTrashManager *instance();
33
34 bool trashIsEmpty() const;
35 bool cleanTrash();
36 bool moveToTrash(const QString &filePath, bool followSymlink = false);
37
38protected:
40
41private:
42 D_DECLARE_PRIVATE(DTrashManager)
43};
44
45DCORE_END_NAMESPACE
46
47#endif // DTRASHMANAGER_H
一些宏的定义.
Definition: dobject.h:38
Definition: dtrashmanager.h:30