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 {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
virtual ~GuiClipboard() {}
|
|
|
|
|
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;
|
|
|
|
docstring const getAsText() const;
|
|
|
|
void put(std::string const & lyx, docstring const & text);
|
|
|
|
bool hasLyXContents() const;
|
2007-01-03 08:53:54 +00:00
|
|
|
bool isInternal() 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
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void on_dataChanged();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool text_clipboard_empty_;
|
|
|
|
bool has_lyx_contents_;
|
2006-06-20 08:39:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUICLIPBOARD_H
|