┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kfileitemclipboard.h
blob: 81820130871fa76c915b3628c3be868f1847f4f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * SPDX-FileCopyrightText: 2011 Peter Penz <[email protected]>
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef KFILEITEMCLIPBOARD_H
#define KFILEITEMCLIPBOARD_H

#include "dolphin_export.h"

#include <QList>
#include <QObject>
#include <QSet>
#include <QUrl>

/**
 * @brief Wrapper for QClipboard to provide fast access for checking
 *        whether a KFileItem has been clipped.
 */
class DOLPHIN_EXPORT KFileItemClipboard : public QObject
{
    Q_OBJECT

public:
    static KFileItemClipboard* instance();

    bool isCut(const QUrl& url) const;

    QList<QUrl> cutItems() const;

Q_SIGNALS:
    void cutItemsChanged();

protected:
    ~KFileItemClipboard() override;

private Q_SLOTS:
    void updateCutItems();

private:
    KFileItemClipboard();

    QSet<QUrl> m_cutItems;

    friend class KFileItemClipboardSingleton;
};

#endif