From a7b54c0d12b1fdc1e64f880fe730db3073bd1329 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 14 May 2008 14:08:58 +0000 Subject: [PATCH] Add session to paragraph dialog. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24766 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiParagraph.cpp | 19 +++++++++++++++++++ src/frontends/qt4/GuiParagraph.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/src/frontends/qt4/GuiParagraph.cpp b/src/frontends/qt4/GuiParagraph.cpp index b73a5f53ae..470dfeb792 100644 --- a/src/frontends/qt4/GuiParagraph.cpp +++ b/src/frontends/qt4/GuiParagraph.cpp @@ -34,6 +34,8 @@ #include #include #include +#include +#include #include @@ -365,6 +367,23 @@ LyXAlignment GuiParagraph::alignDefault() const } +void GuiParagraph::saveSession() const +{ + Dialog::saveSession(); + QSettings settings; + settings.setValue(sessionKey() + "/autoapply", synchronizedViewCB->isChecked()); +} + + +void GuiParagraph::restoreSession() +{ + Dialog::restoreSession(); + QSettings settings; + synchronizedViewCB->setChecked( + settings.value(sessionKey() + "/autoapply").toBool()); +} + + Dialog * createGuiParagraph(GuiView & lv) { return new GuiParagraph(lv); diff --git a/src/frontends/qt4/GuiParagraph.h b/src/frontends/qt4/GuiParagraph.h index 328acfe547..429284fc4d 100644 --- a/src/frontends/qt4/GuiParagraph.h +++ b/src/frontends/qt4/GuiParagraph.h @@ -47,6 +47,8 @@ public: void enableView(bool enable); bool isBufferDependent() const { return true; } virtual FuncCode getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; } + void saveSession() const; + void restoreSession(); //@} private: