1 /* This file is part of Step.
2  *   Copyright (C) 2007 Vladimir Kuznetsov <ks.vladimir@gmail.com>
3  *
4  *   Step is free software; you can redistribute it and/or modify
5  *   it under the terms of the GNU General Public License as published by
6  *   the Free Software Foundation; either version 2 of the License, or
7  *   (at your option) any later version.
8  *
9  *   Step 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 General Public License
15  *   along with Step; if not, write to the Free Software
16  *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17  */
18 
19 #ifndef STEP_CLIPBOARD_H
20 #define STEP_CLIPBOARD_H
21 
22 #include <QList>
23 #include <QObject>
24 
25 namespace StepCore
26 {
27     class Factory;
28     class Item;
29 }
30 
31 class Clipboard : public QObject
32 {
33 public:
34     explicit Clipboard(QObject* parent = 0);
35 
36     void copy(const QList<StepCore::Item*>& items);
37     QList<StepCore::Item*> paste(const StepCore::Factory* factory);
38 
canPaste()39     bool canPaste() const { return _canPaste; }
40 
41 signals:
42     void canPasteChanged(bool value);
43 
44 private slots:
45     void dataChanged();
46 
47 private:
48     bool hasData() const;
49 
50     bool _canPaste;
51 
52     Q_OBJECT
53 };
54 
55 #endif
56