mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 06:57:01 +00:00
Add session to view-source dialog.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24767 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a7b54c0d12
commit
c5c65daee4
@ -27,8 +27,10 @@
|
|||||||
#include "support/docstream.h"
|
#include "support/docstream.h"
|
||||||
#include "support/gettext.h"
|
#include "support/gettext.h"
|
||||||
|
|
||||||
|
#include <QSettings>
|
||||||
#include <QTextCursor>
|
#include <QTextCursor>
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -182,6 +184,28 @@ QString GuiViewSource::title() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiViewSource::saveSession() const
|
||||||
|
{
|
||||||
|
Dialog::saveSession();
|
||||||
|
QSettings settings;
|
||||||
|
settings.setValue(
|
||||||
|
sessionKey() + "/fullsource", widget_->viewFullSourceCB->isChecked());
|
||||||
|
settings.setValue(
|
||||||
|
sessionKey() + "/autoupdate", widget_->autoUpdateCB->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GuiViewSource::restoreSession()
|
||||||
|
{
|
||||||
|
Dialog::restoreSession();
|
||||||
|
QSettings settings;
|
||||||
|
widget_->viewFullSourceCB->setChecked(
|
||||||
|
settings.value(sessionKey() + "/fullsource").toBool());
|
||||||
|
widget_->autoUpdateCB->setChecked(
|
||||||
|
settings.value(sessionKey() + "/autoupdate").toBool());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Dialog * createGuiViewSource(GuiView & lv)
|
Dialog * createGuiViewSource(GuiView & lv)
|
||||||
{
|
{
|
||||||
return new GuiViewSource(lv);
|
return new GuiViewSource(lv);
|
||||||
|
@ -77,6 +77,8 @@ public:
|
|||||||
bool canApplyToReadOnly() const { return true; }
|
bool canApplyToReadOnly() const { return true; }
|
||||||
void updateView();
|
void updateView();
|
||||||
void enableView(bool enable);
|
void enableView(bool enable);
|
||||||
|
void saveSession() const;
|
||||||
|
void restoreSession();
|
||||||
///@}
|
///@}
|
||||||
|
|
||||||
/// The title displayed by the dialog reflects source type.
|
/// The title displayed by the dialog reflects source type.
|
||||||
|
Loading…
Reference in New Issue
Block a user