]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiClipboard.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiClipboard.h
1 // -*- C++ -*-
2 /**
3  * \file GuiClipboard.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author unknown
8  * \author John Levon
9  * \author Abdelrazak Younes
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef GUICLIPBOARD_H
15 #define GUICLIPBOARD_H
16
17 #include "frontends/Clipboard.h"
18
19 #include <QObject>
20
21 namespace lyx {
22 namespace frontend {
23
24 class QMacPasteboardMimeGraphics;
25
26 /**
27  * The Qt4 version of the Clipboard.
28  */
29 class GuiClipboard: public QObject, public Clipboard
30 {
31         Q_OBJECT
32 public:
33         GuiClipboard();
34
35         /** Clipboard overloaded methods
36          */
37         //@{
38         std::string const getAsLyX() const;
39         FileName getAsGraphics(Cursor const & cur, GraphicsType type) const;
40         docstring const getAsText() const;
41         void put(std::string const & lyx, docstring const & text);
42         bool hasLyXContents() const;
43         bool hasGraphicsContents(GraphicsType type = AnyGraphicsType) const;
44         bool hasTextContents() const;
45         bool isInternal() const;
46         bool hasInternal() const;
47         bool empty() const;
48         //@}
49
50         FileName getPastedGraphicsFileName(Cursor const & cur,
51                 Clipboard::GraphicsType & type) const;
52
53 private Q_SLOTS:
54         void on_dataChanged();
55
56 private:
57         bool text_clipboard_empty_;
58         bool has_lyx_contents_;
59         bool has_graphics_contents_;
60 };
61
62 QString const lyxMimeType();
63 QString const pdfMimeType();
64 QString const emfMimeType();
65 QString const wmfMimeType();
66
67 } // namespace frontend
68 } // namespace lyx
69
70 #endif // GUICLIPBOARD_H