3 * \file qt4/GuiClipboard.C
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Abdelrazak Younes
10 * Full author contact details are available in file CREDITS.
15 #include "GuiClipboard.h"
16 #include "qt_helpers.h"
20 #include <QApplication>
24 #include "support/lstrings.h"
25 using lyx::support::internalLineEnding;
26 using lyx::support::externalLineEnding;
34 string const GuiClipboard::get() const
36 QString const str = qApp->clipboard()->text(QClipboard::Clipboard);
37 lyxerr[Debug::ACTION] << "GuiClipboard::get: " << fromqstr(str)
42 return internalLineEnding(fromqstr(str));
46 void GuiClipboard::put(string const & str)
48 lyxerr[Debug::ACTION] << "GuiClipboard::put: " << str << endl;
50 qApp->clipboard()->setText(toqstr(externalLineEnding(str)),
51 QClipboard::Clipboard);
54 } // namespace frontend