Add session to paragraph dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24766 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-05-14 14:08:58 +00:00
parent c9353904ce
commit a7b54c0d12
2 changed files with 21 additions and 0 deletions

View File

@ -34,6 +34,8 @@
#include <QCheckBox> #include <QCheckBox>
#include <QLineEdit> #include <QLineEdit>
#include <QPushButton> #include <QPushButton>
#include <QSettings>
#include <QVariant>
#include <sstream> #include <sstream>
@ -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) Dialog * createGuiParagraph(GuiView & lv)
{ {
return new GuiParagraph(lv); return new GuiParagraph(lv);

View File

@ -47,6 +47,8 @@ public:
void enableView(bool enable); void enableView(bool enable);
bool isBufferDependent() const { return true; } bool isBufferDependent() const { return true; }
virtual FuncCode getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; } virtual FuncCode getLfun() const { return LFUN_PARAGRAPH_PARAMS_APPLY; }
void saveSession() const;
void restoreSession();
//@} //@}
private: private: