From 0e85a05d42070dee5a6a27019044c7491a74c503 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Mon, 28 Dec 2009 21:55:50 +0000 Subject: [PATCH] Session info for debug window git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32664 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiProgressView.cpp | 16 ++++++++++++++++ src/frontends/qt4/GuiProgressView.h | 5 ++--- src/frontends/qt4/GuiView.cpp | 2 ++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/GuiProgressView.cpp b/src/frontends/qt4/GuiProgressView.cpp index 2e1bb86d0a..4a4c40ab57 100644 --- a/src/frontends/qt4/GuiProgressView.cpp +++ b/src/frontends/qt4/GuiProgressView.cpp @@ -17,6 +17,7 @@ #include "support/debug.h" +#include #include @@ -71,6 +72,21 @@ void GuiProgressView::appendText(QString const & text) widget_->outTE->ensureCursorVisible(); } +void GuiProgressView::saveSession() const +{ + Dialog::saveSession(); + QSettings settings; + settings.setValue( + sessionKey() + "/autoclear", widget_->autoClearCB->isChecked()); +} + +void GuiProgressView::restoreSession() +{ + DockView::restoreSession(); + QSettings settings; + widget_->autoClearCB->setChecked( + settings.value(sessionKey() + "/autoclear", true).toBool()); +} Dialog * createGuiProgressView(GuiView & guiview) diff --git a/src/frontends/qt4/GuiProgressView.h b/src/frontends/qt4/GuiProgressView.h index 81107521fd..9a22b71307 100644 --- a/src/frontends/qt4/GuiProgressView.h +++ b/src/frontends/qt4/GuiProgressView.h @@ -20,9 +20,6 @@ #include -#include -#include "qt_helpers.h" - namespace lyx { namespace frontend { @@ -57,6 +54,8 @@ public: bool canApplyToReadOnly() const { return true; } void updateView() {} bool wantInitialFocus() const { return false; } + void restoreSession(); + void saveSession() const; ///@} private Q_SLOTS: diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 00ca3b55be..f6d38e216f 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -466,6 +466,8 @@ bool GuiView::restoreLayout() dialog->prepareView(); if ((dialog = findOrBuild("view-source", true))) dialog->prepareView(); + if ((dialog = findOrBuild("progress", true))) + dialog->prepareView(); if (!restoreState(settings.value("layout").toByteArray(), 0)) initToolbars();