]> cloud.milkyroute.net Git - dolphin.git/blob - src/kitemviews/private/kfileitemclipboard.h
Output of licensedigger + manual cleanup afterwards.
[dolphin.git] / src / kitemviews / private / kfileitemclipboard.h
1 /*
2 * SPDX-FileCopyrightText: 2011 Peter Penz <peter.penz19@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #ifndef KFILEITEMCLIPBOARD_H
8 #define KFILEITEMCLIPBOARD_H
9
10 #include "dolphin_export.h"
11
12 #include <QList>
13 #include <QObject>
14 #include <QSet>
15 #include <QUrl>
16
17 /**
18 * @brief Wrapper for QClipboard to provide fast access for checking
19 * whether a KFileItem has been clipped.
20 */
21 class DOLPHIN_EXPORT KFileItemClipboard : public QObject
22 {
23 Q_OBJECT
24
25 public:
26 static KFileItemClipboard* instance();
27
28 bool isCut(const QUrl& url) const;
29
30 QList<QUrl> cutItems() const;
31
32 signals:
33 void cutItemsChanged();
34
35 protected:
36 ~KFileItemClipboard() override;
37
38 private slots:
39 void updateCutItems();
40
41 private:
42 KFileItemClipboard();
43
44 QSet<QUrl> m_cutItems;
45
46 friend class KFileItemClipboardSingleton;
47 };
48
49 #endif