]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiNomenclature.cpp
Use <cstdint> instead of <boost/cstdint.hpp>
[lyx.git] / src / frontends / qt4 / GuiNomenclature.cpp
index 0a52bd1403b8bfff3566672e9857289698d0b4b7..92e7760abeed66d139fceef3fbf97f994f3d3de6 100644 (file)
@@ -29,6 +29,8 @@ GuiNomenclature::GuiNomenclature(QWidget * parent) : InsetParamsWidget(parent)
                this, SIGNAL(changed()));
        connect(descriptionTE, SIGNAL(textChanged()),
                this, SIGNAL(changed()));
+       connect(literalCB, SIGNAL(clicked()),
+               this, SIGNAL(changed()));
 
        setFocusProxy(descriptionTE);
 }
@@ -41,6 +43,7 @@ void GuiNomenclature::paramsToDialog(Inset const * inset)
 
        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);
@@ -56,14 +59,16 @@ docstring GuiNomenclature::dialogToParams() const
        QString description = descriptionTE->toPlainText();
        description.replace('\n',"\\\\");
        params["description"] = qstring_to_ucs4(description);
+       params["literal"] = literalCB->isChecked()
+                       ? from_ascii("true") : from_ascii("false");
        return from_utf8(InsetNomencl::params2string(params));
 }
 
 
-bool GuiNomenclature::initialiseParams(std::string const & data)
+bool GuiNomenclature::initialiseParams(std::string const & sdata)
 {
        InsetCommandParams p(insetCode());
-       if (!InsetCommand::string2params(data, p))
+       if (!InsetCommand::string2params(sdata, p))
                return false;
        symbolED->setText(toqstr(p["symbol"]));
        return true;