Add session to character dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24762 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-05-14 12:03:12 +00:00
parent 074f1bee36
commit c9353904ce
2 changed files with 23 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#include <QAbstractItemModel>
#include <QModelIndex>
#include <QSettings>
#include <QVariant>
using namespace std;
@ -378,6 +379,26 @@ void GuiCharacter::dispatchParams()
}
void GuiCharacter::saveSession() const
{
Dialog::saveSession();
QSettings settings;
settings.setValue(sessionKey() + "/toggleall", toggleallCB->isChecked());
settings.setValue(sessionKey() + "/autoapply", autoapplyCB->isChecked());
}
void GuiCharacter::restoreSession()
{
Dialog::restoreSession();
QSettings settings;
toggleallCB->setChecked(
settings.value(sessionKey() + "/toggleall").toBool());
autoapplyCB->setChecked(
settings.value(sessionKey() + "/autoapply").toBool());
}
Dialog * createGuiCharacter(GuiView & lv) { return new GuiCharacter(lv); }

View File

@ -66,6 +66,8 @@ private:
void dispatchParams();
bool isBufferDependent() const { return true; }
FuncCode getLfun() const { return LFUN_FONT_FREE_UPDATE; }
void saveSession() const;
void restoreSession();
//@}
///