2006-06-20 08:39:16 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 22:16:11 +00:00
|
|
|
* \file GuiClipboard.h
|
2006-06-20 08:39:16 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author unknown
|
|
|
|
* \author John Levon
|
|
|
|
* \author Abdelrazak Younes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUICLIPBOARD_H
|
|
|
|
#define GUICLIPBOARD_H
|
2006-06-20 08:39:16 +00:00
|
|
|
|
|
|
|
#include "frontends/Clipboard.h"
|
|
|
|
|
2007-09-30 20:28:15 +00:00
|
|
|
#include <QObject>
|
|
|
|
|
2006-06-20 08:39:16 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2008-05-23 07:52:39 +00:00
|
|
|
class QMacPasteboardMimeGraphics;
|
|
|
|
|
2006-06-20 08:39:16 +00:00
|
|
|
/**
|
|
|
|
* The Qt4 version of the Clipboard.
|
|
|
|
*/
|
2007-09-30 20:28:15 +00:00
|
|
|
class GuiClipboard: public QObject, public Clipboard
|
2006-06-20 08:39:16 +00:00
|
|
|
{
|
2007-09-30 20:28:15 +00:00
|
|
|
Q_OBJECT
|
2006-06-20 08:39:16 +00:00
|
|
|
public:
|
2007-09-30 20:28:15 +00:00
|
|
|
GuiClipboard();
|
2006-06-20 08:39:16 +00:00
|
|
|
|
2006-07-08 13:27:43 +00:00
|
|
|
/** Clipboard overloaded methods
|
2006-06-20 08:39:16 +00:00
|
|
|
*/
|
|
|
|
//@{
|
2007-01-13 18:29:50 +00:00
|
|
|
std::string const getAsLyX() const;
|
2008-02-03 10:43:03 +00:00
|
|
|
FileName getAsGraphics(Cursor const & cur, GraphicsType type) const;
|
2007-01-13 18:29:50 +00:00
|
|
|
docstring const getAsText() const;
|
|
|
|
void put(std::string const & lyx, docstring const & text);
|
|
|
|
bool hasLyXContents() const;
|
2008-02-03 10:43:03 +00:00
|
|
|
bool hasGraphicsContents(GraphicsType type = AnyGraphicsType) const;
|
2009-01-04 23:31:32 +00:00
|
|
|
bool hasTextContents() const;
|
2007-01-03 08:53:54 +00:00
|
|
|
bool isInternal() const;
|
2007-12-28 15:56:05 +00:00
|
|
|
bool hasInternal() const;
|
2007-01-07 16:43:38 +00:00
|
|
|
bool empty() const;
|
2006-06-20 08:39:16 +00:00
|
|
|
//@}
|
2007-09-30 20:28:15 +00:00
|
|
|
|
2008-02-03 10:43:03 +00:00
|
|
|
FileName getPastedGraphicsFileName(Cursor const & cur,
|
|
|
|
Clipboard::GraphicsType & type) const;
|
|
|
|
|
2007-09-30 20:28:15 +00:00
|
|
|
private Q_SLOTS:
|
|
|
|
void on_dataChanged();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool text_clipboard_empty_;
|
|
|
|
bool has_lyx_contents_;
|
2008-02-03 10:43:03 +00:00
|
|
|
bool has_graphics_contents_;
|
2006-06-20 08:39:16 +00:00
|
|
|
};
|
|
|
|
|
2008-05-25 07:49:16 +00:00
|
|
|
QString const lyxMimeType();
|
|
|
|
QString const pdfMimeType();
|
|
|
|
QString const emfMimeType();
|
|
|
|
QString const wmfMimeType();
|
2008-05-25 07:22:45 +00:00
|
|
|
|
2006-06-20 08:39:16 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUICLIPBOARD_H
|