X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiClipboard.h;h=d0552a828136292e6e9aafd2ced55dc513d43f72;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=cce918c9f00d386eb4f232d377456e6060a0d18a;hpb=d8ae51dbe178d6b10a56c747cfd399a4dbba8117;p=lyx.git diff --git a/src/frontends/qt4/GuiClipboard.h b/src/frontends/qt4/GuiClipboard.h index cce918c9f0..d0552a8281 100644 --- a/src/frontends/qt4/GuiClipboard.h +++ b/src/frontends/qt4/GuiClipboard.h @@ -11,34 +11,60 @@ * Full author contact details are available in file CREDITS. */ -#ifndef CLIPBOARD_H -#define CLIPBOARD_H +#ifndef GUICLIPBOARD_H +#define GUICLIPBOARD_H #include "frontends/Clipboard.h" +#include + namespace lyx { namespace frontend { +class QMacPasteboardMimeGraphics; + /** * The Qt4 version of the Clipboard. */ -class GuiClipboard: public Clipboard +class GuiClipboard: public QObject, public Clipboard { + Q_OBJECT public: - GuiClipboard() {} + GuiClipboard(); - virtual ~GuiClipboard() {} - - /** ClipBoard overloaded methods + /** Clipboard overloaded methods */ //@{ - void haveSelection(bool own); - std::string const get() const; - void put(std::string const & str); + std::string const getAsLyX() const; + FileName getAsGraphics(Cursor const & cur, GraphicsType type) const; + docstring const getAsText() const; + void put(std::string const & lyx, docstring const & text); + bool hasLyXContents() const; + bool hasGraphicsContents(GraphicsType type = AnyGraphicsType) const; + bool hasTextContents() const; + bool isInternal() const; + bool hasInternal() const; + bool empty() const; //@} + + FileName getPastedGraphicsFileName(Cursor const & cur, + Clipboard::GraphicsType & type) const; + +private Q_SLOTS: + void on_dataChanged(); + +private: + bool text_clipboard_empty_; + bool has_lyx_contents_; + bool has_graphics_contents_; }; +QString const lyxMimeType(); +QString const pdfMimeType(); +QString const emfMimeType(); +QString const wmfMimeType(); + } // namespace frontend } // namespace lyx -#endif // CLIPBOARD_H +#endif // GUICLIPBOARD_H