From 7fd83b7f02e2e199ce25db934cac90dd4d6bff06 Mon Sep 17 00:00:00 2001 From: Edwin Leuven Date: Thu, 11 Oct 2007 18:15:30 +0000 Subject: [PATCH] add "copy to clipboard" button to log dialog git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20916 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiLog.cpp | 6 ++ src/frontends/qt4/GuiLog.h | 2 + src/frontends/qt4/ui/LogUi.ui | 101 +++++++++++++++++----------------- 3 files changed, 59 insertions(+), 50 deletions(-) diff --git a/src/frontends/qt4/GuiLog.cpp b/src/frontends/qt4/GuiLog.cpp index f736fc2fe5..f7af07570c 100644 --- a/src/frontends/qt4/GuiLog.cpp +++ b/src/frontends/qt4/GuiLog.cpp @@ -231,6 +231,12 @@ void GuiLog::getContents(std::ostream & ss) const } +void GuiLog::on_copyPB_clicked() +{ + qApp->clipboard()->setText(logTB->toPlainText()); +} + + Dialog * createGuiLog(LyXView & lv) { return new GuiLog(lv); } diff --git a/src/frontends/qt4/GuiLog.h b/src/frontends/qt4/GuiLog.h index 8305e72aeb..bce4b9b6b6 100644 --- a/src/frontends/qt4/GuiLog.h +++ b/src/frontends/qt4/GuiLog.h @@ -33,6 +33,8 @@ public: private Q_SLOTS: void updateContents(); + // copy log to clipboard + void on_copyPB_clicked(); private: void closeEvent(QCloseEvent * e); diff --git a/src/frontends/qt4/ui/LogUi.ui b/src/frontends/qt4/ui/LogUi.ui index c986f461c4..5e98af846a 100644 --- a/src/frontends/qt4/ui/LogUi.ui +++ b/src/frontends/qt4/ui/LogUi.ui @@ -1,12 +1,15 @@ + + + LogUi 0 0 - 420 - 328 + 421 + 359 @@ -22,66 +25,64 @@ 6 - - - - - - 0 + + + Copy to Clip&board + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding - - 6 + + + 111 + 26 + - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - Update the display - - - &Update - - - true - - - - - - - &Close - - - - + + + + + + &Close + + + + + + + Update the display + + + &Update + + + true + + + + + - - qt_helpers.h - logTB + copyPB updatePB closePB + + qt_helpers.h + -- 2.39.2