Add session to citation dialog.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24768 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-05-14 14:37:33 +00:00
parent c5c65daee4
commit 2cf301033e
2 changed files with 30 additions and 0 deletions

View File

@ -31,7 +31,9 @@
#include "support/lstrings.h"
#include <QCloseEvent>
#include <QSettings>
#include <QShowEvent>
#include <QVariant>
#include <vector>
#include <string>
@ -730,6 +732,32 @@ BiblioInfo const & GuiCitation::bibInfo() const
}
void GuiCitation::saveSession() const
{
Dialog::saveSession();
QSettings settings;
settings.setValue(
sessionKey() + "/regex", regexCB->isChecked());
settings.setValue(
sessionKey() + "/casesensitive", caseCB->isChecked());
settings.setValue(
sessionKey() + "/autofind", asTypeCB->isChecked());
}
void GuiCitation::restoreSession()
{
Dialog::restoreSession();
QSettings settings;
regexCB->setChecked(
settings.value(sessionKey() + "/regex").toBool());
caseCB->setChecked(
settings.value(sessionKey() + "/casesensitive").toBool());
asTypeCB->setChecked(
settings.value(sessionKey() + "/autofind").toBool());
}
Dialog * createGuiCitation(GuiView & lv) { return new GuiCitation(lv); }

View File

@ -73,6 +73,8 @@ private:
void clearParams();
void dispatchParams();
bool isBufferDependent() const { return true; }
void saveSession() const;
void restoreSession();
/** Disconnect from the inset when the Apply button is pressed.
* Allows easy insertion of multiple citations.
*/