]> cloud.milkyroute.net Git - dolphin.git/blob - src/trash/dolphintrash.h
Build with QT_NO_KEYWORDS
[dolphin.git] / src / trash / dolphintrash.h
1 /*
2 * SPDX-FileCopyrightText: 2012 Peter Penz <peter.penz19@gmail.com>
3 * SPDX-FileCopyrightText: 2018 Roman Inflianskas <infroma@gmail.com>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8 #ifndef DOLPHINTRASH_H
9 #define DOLPHINTRASH_H
10
11 #include <QWidget>
12
13 #include <KIO/EmptyTrashJob>
14 #include <KIOWidgets/KDirLister>
15
16 class Trash: public QObject
17 {
18 Q_OBJECT
19
20 public:
21 // delete copy and move constructors and assign operators
22 Trash(Trash const&) = delete;
23 Trash(Trash&&) = delete;
24 Trash& operator=(Trash const&) = delete;
25 Trash& operator=(Trash &&) = delete;
26
27 static Trash& instance();
28 static KIO::Job* empty(QWidget *window);
29 static bool isEmpty();
30
31 Q_SIGNALS:
32 void emptinessChanged(bool isEmpty);
33
34 private:
35 KDirLister *m_trashDirLister;
36
37 Trash();
38 ~Trash();
39 };
40
41 #endif // DOLPHINTRASH_H