2006-03-05 17:24:44 +00:00
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiParagraph.cpp
|
2006-03-05 17:24:44 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Edwin Leuven
|
2007-04-11 14:04:40 +00:00
|
|
|
* \author Richard Heck
|
2007-09-26 13:13:01 +00:00
|
|
|
* \author Abdelrazak Younes
|
2007-10-07 20:00:46 +00:00
|
|
|
* \author Angus Leeming
|
2006-03-05 17:24:44 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2007-08-31 05:53:55 +00:00
|
|
|
#include "GuiParagraph.h"
|
2007-09-05 20:33:29 +00:00
|
|
|
|
2008-02-18 07:14:42 +00:00
|
|
|
#include "qt_helpers.h"
|
|
|
|
|
2007-10-07 20:00:46 +00:00
|
|
|
#include "Buffer.h"
|
|
|
|
#include "BufferParams.h"
|
|
|
|
#include "BufferView.h"
|
|
|
|
#include "Cursor.h"
|
|
|
|
#include "FuncRequest.h"
|
|
|
|
#include "GuiView.h"
|
|
|
|
#include "Lexer.h"
|
|
|
|
#include "Paragraph.h"
|
2006-03-05 17:24:44 +00:00
|
|
|
#include "ParagraphParameters.h"
|
|
|
|
#include "Spacing.h"
|
|
|
|
|
2012-06-28 18:52:20 +00:00
|
|
|
#include "support/debug.h"
|
2007-11-29 21:10:35 +00:00
|
|
|
#include "support/gettext.h"
|
|
|
|
|
2006-05-04 07:31:46 +00:00
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QPushButton>
|
2009-06-16 14:33:29 +00:00
|
|
|
#include <QSettings>
|
2008-05-14 14:08:58 +00:00
|
|
|
#include <QVariant>
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-10-07 20:00:46 +00:00
|
|
|
#include <sstream>
|
|
|
|
|
2007-12-12 10:16:00 +00:00
|
|
|
using namespace std;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-11-23 09:44:02 +00:00
|
|
|
GuiParagraph::GuiParagraph(GuiView & lv)
|
2008-02-05 12:43:19 +00:00
|
|
|
: DialogView(lv, "paragraph", qt_("Paragraph Settings"))
|
2007-04-24 19:37:34 +00:00
|
|
|
{
|
|
|
|
setupUi(this);
|
2007-09-26 13:13:01 +00:00
|
|
|
|
|
|
|
connect(alignDefaultRB, SIGNAL(clicked()), this, SLOT(changed()));
|
|
|
|
connect(alignJustRB, SIGNAL(clicked()), this, SLOT(changed()));
|
|
|
|
connect(alignLeftRB, SIGNAL(clicked()), this, SLOT(changed()));
|
|
|
|
connect(alignRightRB, SIGNAL(clicked()), this, SLOT(changed()));
|
|
|
|
connect(alignCenterRB, SIGNAL(clicked()), this, SLOT(changed()));
|
|
|
|
connect(linespacing, SIGNAL(activated(int)), this, SLOT(changed()));
|
2007-10-09 19:34:27 +00:00
|
|
|
connect(linespacingValue, SIGNAL(textChanged(QString)),
|
2007-09-26 13:13:01 +00:00
|
|
|
this, SLOT(changed()));
|
|
|
|
connect(indentCB, SIGNAL(clicked()), this, SLOT(changed()));
|
2007-10-09 19:34:27 +00:00
|
|
|
connect(labelWidth, SIGNAL(textChanged(QString)),
|
2007-09-26 13:13:01 +00:00
|
|
|
this, SLOT(changed()));
|
2007-04-24 19:37:34 +00:00
|
|
|
|
2014-08-25 18:08:59 +00:00
|
|
|
#ifdef Q_OS_MAC
|
2008-01-25 22:31:33 +00:00
|
|
|
// On Mac it's common to have tool windows which are always in the
|
|
|
|
// foreground and are hidden when the main window is not focused.
|
|
|
|
setWindowFlags(Qt::Tool);
|
|
|
|
synchronizedViewCB->setChecked(true);
|
2008-04-19 16:56:40 +00:00
|
|
|
closePB->setText(qt_("&Cancel"));
|
2008-01-25 22:31:33 +00:00
|
|
|
#else
|
2007-09-28 23:30:19 +00:00
|
|
|
synchronizedViewCB->setChecked(false);
|
2008-01-25 22:31:33 +00:00
|
|
|
#endif
|
|
|
|
|
2007-09-26 13:13:01 +00:00
|
|
|
on_synchronizedViewCB_toggled();
|
2015-05-20 17:12:23 +00:00
|
|
|
QDoubleValidator * val = new QDoubleValidator(linespacingValue);
|
|
|
|
val->setNotation(QDoubleValidator::StandardNotation);
|
|
|
|
linespacingValue->setValidator(val);
|
2007-04-24 19:37:34 +00:00
|
|
|
|
2008-04-18 20:45:21 +00:00
|
|
|
labelWidth->setWhatsThis(qt_(
|
2007-05-01 10:07:29 +00:00
|
|
|
"As described in the User Guide, the width of"
|
|
|
|
" this text determines the width of the label part"
|
|
|
|
" of each item in environments like List and"
|
2007-04-24 19:37:34 +00:00
|
|
|
" Description.\n"
|
|
|
|
"\n"
|
2007-05-01 10:07:29 +00:00
|
|
|
" Normally, you won't need to set this,"
|
2007-04-24 19:37:34 +00:00
|
|
|
" since the largest label width of all the"
|
2007-05-01 10:07:29 +00:00
|
|
|
" items is used."
|
2007-04-24 19:37:34 +00:00
|
|
|
));
|
|
|
|
|
2008-04-18 20:45:21 +00:00
|
|
|
radioMap_[LYX_ALIGN_LAYOUT] = alignDefaultRB;
|
|
|
|
radioMap_[LYX_ALIGN_BLOCK] = alignJustRB;
|
|
|
|
radioMap_[LYX_ALIGN_LEFT] = alignLeftRB;
|
|
|
|
radioMap_[LYX_ALIGN_RIGHT] = alignRightRB;
|
|
|
|
radioMap_[LYX_ALIGN_CENTER] = alignCenterRB;
|
2007-09-05 20:33:29 +00:00
|
|
|
|
2008-04-18 20:45:21 +00:00
|
|
|
alignDefaultLabel_ = alignDefaultRB->text();
|
2007-04-24 19:37:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-26 13:13:01 +00:00
|
|
|
void GuiParagraph::on_linespacing_activated(int index)
|
2007-04-24 19:37:34 +00:00
|
|
|
{
|
2007-09-26 13:13:01 +00:00
|
|
|
linespacingValue->setEnabled(index == 4);
|
2007-04-24 19:37:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-10-07 20:00:46 +00:00
|
|
|
void GuiParagraph::checkAlignmentRadioButtons()
|
|
|
|
{
|
2008-04-18 20:45:21 +00:00
|
|
|
static std::map<LyXAlignment, QString> labelMap_;
|
|
|
|
if (labelMap_.empty()) {
|
|
|
|
labelMap_[LYX_ALIGN_BLOCK] = qt_("Justified");
|
|
|
|
labelMap_[LYX_ALIGN_LEFT] = qt_("Left");
|
|
|
|
labelMap_[LYX_ALIGN_RIGHT] = qt_("Right");
|
|
|
|
labelMap_[LYX_ALIGN_CENTER] = qt_("Center");
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioMap::iterator it = radioMap_.begin();
|
|
|
|
for (; it != radioMap_.end(); ++it) {
|
2007-06-22 22:34:16 +00:00
|
|
|
LyXAlignment const align = it->first;
|
2007-10-07 20:00:46 +00:00
|
|
|
it->second->setEnabled(align & alignPossible());
|
2007-04-24 19:37:34 +00:00
|
|
|
}
|
2008-02-08 16:14:24 +00:00
|
|
|
if (haveMultiParSelection())
|
2008-04-18 20:45:21 +00:00
|
|
|
alignDefaultRB->setText(alignDefaultLabel_);
|
2007-09-26 13:13:01 +00:00
|
|
|
else
|
2008-04-18 20:45:21 +00:00
|
|
|
alignDefaultRB->setText(alignDefaultLabel_ + " ("
|
|
|
|
+ labelMap_[alignDefault()] + ")");
|
2007-04-24 19:37:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-26 13:13:01 +00:00
|
|
|
void GuiParagraph::alignmentToRadioButtons(LyXAlignment align)
|
2007-04-24 19:37:34 +00:00
|
|
|
{
|
2008-04-18 20:45:21 +00:00
|
|
|
RadioMap::const_iterator it = radioMap_.begin();
|
|
|
|
for (;it != radioMap_.end(); ++it) {
|
2007-09-26 13:13:01 +00:00
|
|
|
it->second->blockSignals(true);
|
|
|
|
it->second->setChecked(align == it->first);
|
|
|
|
it->second->blockSignals(false);
|
2007-04-24 19:37:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-09-29 10:29:35 +00:00
|
|
|
LyXAlignment GuiParagraph::getAlignmentFromDialog() const
|
2007-04-24 19:37:34 +00:00
|
|
|
{
|
|
|
|
LyXAlignment alignment = LYX_ALIGN_NONE;
|
2008-04-18 20:45:21 +00:00
|
|
|
RadioMap::const_iterator it = radioMap_.begin();
|
|
|
|
for (; it != radioMap_.end(); ++it) {
|
2007-04-24 19:37:34 +00:00
|
|
|
if (it->second->isChecked()) {
|
|
|
|
alignment = it->first;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return alignment;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-26 13:13:01 +00:00
|
|
|
void GuiParagraph::on_synchronizedViewCB_toggled()
|
|
|
|
{
|
|
|
|
bool in_sync = synchronizedViewCB->isChecked();
|
|
|
|
restorePB->setEnabled(!in_sync);
|
|
|
|
applyPB->setEnabled(!in_sync);
|
2008-04-19 16:56:40 +00:00
|
|
|
okPB->setEnabled(!in_sync);
|
|
|
|
if (!in_sync)
|
|
|
|
closePB->setText(qt_("&Cancel"));
|
|
|
|
else
|
|
|
|
closePB->setText(qt_("&Close"));
|
2007-09-26 13:13:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GuiParagraph::changed()
|
2006-03-05 17:24:44 +00:00
|
|
|
{
|
2015-05-20 17:12:23 +00:00
|
|
|
QLocale loc;
|
2015-06-13 10:16:34 +00:00
|
|
|
// We apply immediately, except if we have custom line spacing
|
|
|
|
// with an intermediate result (trailing decimal separator) or
|
|
|
|
// an invalid value (which might as well be intermediate)
|
2015-05-20 17:12:23 +00:00
|
|
|
if (synchronizedViewCB->isChecked()
|
2015-06-13 10:16:34 +00:00
|
|
|
&& (linespacing->currentIndex() != 4
|
|
|
|
|| (!linespacingValue->text().endsWith(loc.decimalPoint())
|
|
|
|
&& linespacingValue->hasAcceptableInput())))
|
2007-09-26 13:13:01 +00:00
|
|
|
on_applyPB_clicked();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GuiParagraph::on_applyPB_clicked()
|
2008-04-19 16:56:40 +00:00
|
|
|
{
|
|
|
|
applyView();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GuiParagraph::on_okPB_clicked()
|
|
|
|
{
|
|
|
|
applyView();
|
|
|
|
hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GuiParagraph::on_closePB_clicked()
|
|
|
|
{
|
|
|
|
hide();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GuiParagraph::on_restorePB_clicked()
|
|
|
|
{
|
|
|
|
updateView();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GuiParagraph::applyView()
|
2007-09-26 13:13:01 +00:00
|
|
|
{
|
2008-09-29 10:56:45 +00:00
|
|
|
params_ = params();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2008-09-29 10:18:37 +00:00
|
|
|
params_.align(getAlignmentFromDialog());
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
// get spacing
|
2007-09-05 20:33:29 +00:00
|
|
|
Spacing::Space ls = Spacing::Default;
|
2006-03-05 17:24:44 +00:00
|
|
|
string other;
|
2007-09-05 20:33:29 +00:00
|
|
|
switch (linespacing->currentIndex()) {
|
2006-03-05 17:24:44 +00:00
|
|
|
case 0:
|
2007-09-05 20:33:29 +00:00
|
|
|
ls = Spacing::Default;
|
2006-03-05 17:24:44 +00:00
|
|
|
break;
|
|
|
|
case 1:
|
2007-09-05 20:33:29 +00:00
|
|
|
ls = Spacing::Single;
|
2006-03-05 17:24:44 +00:00
|
|
|
break;
|
|
|
|
case 2:
|
2007-09-05 20:33:29 +00:00
|
|
|
ls = Spacing::Onehalf;
|
2006-03-05 17:24:44 +00:00
|
|
|
break;
|
|
|
|
case 3:
|
2007-09-05 20:33:29 +00:00
|
|
|
ls = Spacing::Double;
|
2006-03-05 17:24:44 +00:00
|
|
|
break;
|
|
|
|
case 4:
|
2007-09-05 20:33:29 +00:00
|
|
|
ls = Spacing::Other;
|
2009-07-12 15:44:26 +00:00
|
|
|
other = widgetToDoubleStr(linespacingValue);
|
2006-03-05 17:24:44 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
Spacing const spacing(ls, other);
|
2008-09-29 10:18:37 +00:00
|
|
|
params_.spacing(spacing);
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
// label width
|
2008-09-29 10:18:37 +00:00
|
|
|
params_.labelWidthString(qstring_to_ucs4(labelWidth->text()));
|
2014-05-29 12:10:32 +00:00
|
|
|
// indentation
|
2008-09-29 10:18:37 +00:00
|
|
|
params_.noindent(!indentCB->isChecked());
|
2007-09-26 13:13:01 +00:00
|
|
|
|
2007-10-07 20:00:46 +00:00
|
|
|
dispatchParams();
|
2006-03-05 17:24:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-26 13:13:01 +00:00
|
|
|
void GuiParagraph::updateView()
|
|
|
|
{
|
|
|
|
on_synchronizedViewCB_toggled();
|
|
|
|
|
2007-10-07 20:00:46 +00:00
|
|
|
ParagraphParameters const & pp = params();
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
// label width
|
2007-10-07 20:00:46 +00:00
|
|
|
docstring const & labelwidth = pp.labelWidthString();
|
2009-05-23 07:45:46 +00:00
|
|
|
if (hasLabelwidth()) {
|
2007-09-05 20:33:29 +00:00
|
|
|
labelwidthGB->setEnabled(true);
|
|
|
|
labelWidth->setText(toqstr(labelwidth));
|
2006-03-05 17:24:44 +00:00
|
|
|
} else {
|
2007-09-05 20:33:29 +00:00
|
|
|
labelwidthGB->setEnabled(false);
|
2008-03-15 00:22:54 +00:00
|
|
|
labelWidth->setText(QString());
|
2006-03-05 17:24:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// alignment
|
2007-09-05 20:33:29 +00:00
|
|
|
checkAlignmentRadioButtons();
|
2007-10-07 20:00:46 +00:00
|
|
|
alignmentToRadioButtons(pp.align());
|
2007-04-11 14:04:40 +00:00
|
|
|
|
|
|
|
//indentation
|
2007-10-07 20:00:46 +00:00
|
|
|
bool const canindent = canIndent();
|
2007-09-05 20:33:29 +00:00
|
|
|
indentCB->setEnabled(canindent);
|
2007-10-07 20:00:46 +00:00
|
|
|
indentCB->setChecked(canindent && !pp.noindent());
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
// linespacing
|
2007-09-05 20:33:29 +00:00
|
|
|
int ls;
|
2015-06-13 10:31:03 +00:00
|
|
|
bool pending_input = false;
|
2007-10-07 20:00:46 +00:00
|
|
|
Spacing const & space = pp.spacing();
|
2015-06-13 10:31:03 +00:00
|
|
|
if (synchronizedViewCB->isChecked() && linespacingValue->hasFocus()) {
|
|
|
|
// The user is about to enter custom spacing.
|
|
|
|
// We thus stay in Custom mode.
|
|
|
|
// This prevents the combo from e.g. immediately
|
|
|
|
// switching to single if a user enters "1" in the
|
|
|
|
// linespacingValue widget while aiming at e.g. "1.3"
|
2007-09-05 20:33:29 +00:00
|
|
|
ls = 4;
|
2015-06-13 10:31:03 +00:00
|
|
|
pending_input = true;
|
|
|
|
} else {
|
|
|
|
switch (space.getSpace()) {
|
|
|
|
case Spacing::Single:
|
|
|
|
ls = 1;
|
|
|
|
break;
|
|
|
|
case Spacing::Onehalf:
|
|
|
|
ls = 2;
|
|
|
|
break;
|
|
|
|
case Spacing::Double:
|
|
|
|
ls = 3;
|
|
|
|
break;
|
|
|
|
case Spacing::Other:
|
|
|
|
ls = 4;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ls = 0;
|
|
|
|
break;
|
|
|
|
}
|
2006-03-05 17:24:44 +00:00
|
|
|
}
|
2007-09-05 20:33:29 +00:00
|
|
|
linespacing->setCurrentIndex(ls);
|
2015-06-13 10:31:03 +00:00
|
|
|
if (space.getSpace() == Spacing::Other || pending_input) {
|
2009-07-12 15:44:26 +00:00
|
|
|
doubleToWidget(linespacingValue, space.getValue());
|
2007-09-05 20:33:29 +00:00
|
|
|
linespacingValue->setEnabled(true);
|
2006-03-05 17:24:44 +00:00
|
|
|
} else {
|
2007-09-05 20:33:29 +00:00
|
|
|
linespacingValue->setText(QString());
|
|
|
|
linespacingValue->setEnabled(false);
|
2006-03-05 17:24:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-10-07 10:10:41 +00:00
|
|
|
|
2008-02-08 16:08:45 +00:00
|
|
|
void GuiParagraph::enableView(bool enable)
|
|
|
|
{
|
|
|
|
indentCB->setEnabled(enable);
|
|
|
|
linespacing->setEnabled(enable);
|
|
|
|
labelWidth->setEnabled(enable);
|
|
|
|
synchronizedViewCB->setEnabled(enable);
|
|
|
|
applyPB->setEnabled(enable);
|
|
|
|
restorePB->setEnabled(enable);
|
|
|
|
if (!enable)
|
|
|
|
synchronizedViewCB->setChecked(true);
|
2008-04-18 20:45:21 +00:00
|
|
|
RadioMap::const_iterator it = radioMap_.begin();
|
|
|
|
for (; it != radioMap_.end(); ++it)
|
2008-02-08 16:08:45 +00:00
|
|
|
it->second->setEnabled(enable);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-09-29 10:18:37 +00:00
|
|
|
ParagraphParameters const & GuiParagraph::params() const
|
2007-10-07 20:00:46 +00:00
|
|
|
{
|
2008-02-08 16:14:24 +00:00
|
|
|
if (haveMultiParSelection()) {
|
2008-09-29 10:18:37 +00:00
|
|
|
// FIXME: in case of multi-paragraph selection, it would be nice to
|
|
|
|
// initialise the parameters that are common to all paragraphs.
|
2013-10-07 22:59:05 +00:00
|
|
|
static ParagraphParameters const empty;
|
2008-09-29 10:56:45 +00:00
|
|
|
return empty;
|
2007-10-07 20:00:46 +00:00
|
|
|
}
|
|
|
|
return bufferview()->cursor().innerParagraph().params();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GuiParagraph::dispatchParams()
|
|
|
|
{
|
2008-09-29 10:18:37 +00:00
|
|
|
ostringstream data;
|
|
|
|
params_.write(data);
|
|
|
|
FuncRequest const fr(getLfun(), data.str());
|
|
|
|
dispatch(fr);
|
2007-10-07 20:00:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-09-29 10:18:37 +00:00
|
|
|
bool GuiParagraph::haveMultiParSelection() const
|
2007-10-07 20:00:46 +00:00
|
|
|
{
|
2008-09-29 09:33:36 +00:00
|
|
|
Cursor const & cur = bufferview()->cursor();
|
2007-10-07 20:00:46 +00:00
|
|
|
return cur.selection() && cur.selBegin().pit() != cur.selEnd().pit();
|
|
|
|
}
|
|
|
|
|
2017-07-03 17:53:14 +00:00
|
|
|
|
2007-10-07 20:00:46 +00:00
|
|
|
bool GuiParagraph::canIndent() const
|
|
|
|
{
|
2014-05-29 12:10:32 +00:00
|
|
|
Layout const lay = bufferview()->cursor().innerParagraph().layout();
|
|
|
|
if (buffer().params().paragraph_separation
|
|
|
|
== BufferParams::ParagraphIndentSeparation)
|
|
|
|
return (lay.toggle_indent != ITOGGLE_NEVER);
|
|
|
|
return (lay.toggle_indent == ITOGGLE_ALWAYS);
|
2007-10-07 20:00:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
LyXAlignment GuiParagraph::alignPossible() const
|
|
|
|
{
|
2008-03-06 21:31:27 +00:00
|
|
|
return bufferview()->cursor().innerParagraph().layout().alignpossible;
|
2007-10-07 20:00:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
LyXAlignment GuiParagraph::alignDefault() const
|
|
|
|
{
|
2008-03-06 21:31:27 +00:00
|
|
|
return bufferview()->cursor().innerParagraph().layout().align;
|
2007-10-07 20:00:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-05-23 07:45:46 +00:00
|
|
|
bool GuiParagraph::hasLabelwidth() const
|
|
|
|
{
|
|
|
|
Layout layout = bufferview()->cursor().innerParagraph().layout();
|
|
|
|
return (layout.margintype == MARGIN_MANUAL
|
|
|
|
|| layout.latextype == LATEX_BIB_ENVIRONMENT);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-10-18 11:12:20 +00:00
|
|
|
void GuiParagraph::saveSession(QSettings & settings) const
|
2008-05-14 14:08:58 +00:00
|
|
|
{
|
2017-10-18 11:12:20 +00:00
|
|
|
Dialog::saveSession(settings);
|
2008-05-14 14:08:58 +00:00
|
|
|
settings.setValue(sessionKey() + "/autoapply", synchronizedViewCB->isChecked());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GuiParagraph::restoreSession()
|
|
|
|
{
|
|
|
|
Dialog::restoreSession();
|
|
|
|
QSettings settings;
|
|
|
|
synchronizedViewCB->setChecked(
|
|
|
|
settings.value(sessionKey() + "/autoapply").toBool());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-11-23 09:44:02 +00:00
|
|
|
Dialog * createGuiParagraph(GuiView & lv)
|
2007-10-07 10:10:41 +00:00
|
|
|
{
|
2007-10-07 20:00:46 +00:00
|
|
|
return new GuiParagraph(lv);
|
2007-10-07 10:10:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
2007-04-24 19:37:34 +00:00
|
|
|
|
2008-11-14 14:28:50 +00:00
|
|
|
#include "moc_GuiParagraph.cpp"
|