#include <config.h>
-#include "GuiNomencl.h"
+#include "GuiNomenclature.h"
#include "qt_helpers.h"
this, SIGNAL(changed()));
connect(descriptionTE, SIGNAL(textChanged()),
this, SIGNAL(changed()));
+ connect(literalCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
setFocusProxy(descriptionTE);
}
prefixED->setText(toqstr(params["prefix"]));
symbolED->setText(toqstr(params["symbol"]));
+ literalCB->setChecked(params["literal"] == "true");
QString description = toqstr(params["description"]);
description.replace("\\\\","\n");
descriptionTE->setPlainText(description);
QString description = descriptionTE->toPlainText();
description.replace('\n',"\\\\");
params["description"] = qstring_to_ucs4(description);
- return from_ascii(InsetNomencl::params2string("nomenclature", params));
+ params["literal"] = literalCB->isChecked()
+ ? from_ascii("true") : from_ascii("false");
+ return from_utf8(InsetNomencl::params2string(params));
+}
+
+
+bool GuiNomenclature::initialiseParams(std::string const & data)
+{
+ InsetCommandParams p(insetCode());
+ if (!InsetCommand::string2params(data, p))
+ return false;
+ symbolED->setText(toqstr(p["symbol"]));
+ return true;
}
-bool GuiNomenclature::checkWidgets() const
+bool GuiNomenclature::checkWidgets(bool readonly) const
{
+ symbolED->setReadOnly(readonly);
+ descriptionTE->setReadOnly(readonly);
if (!InsetParamsWidget::checkWidgets())
return false;
QString const description = descriptionTE->toPlainText();
} // namespace frontend
} // namespace lyx
-#include "moc_GuiNomencl.cpp"
+#include "moc_GuiNomenclature.cpp"