From: Abdelrazak Younes Date: Wed, 27 Oct 2010 20:05:38 +0000 (+0000) Subject: GuiNomencl.xxx: Rename to be in line with class name. X-Git-Tag: 2.0.0~2219 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=190439eccfb04b3a27b4e85b548245d3b1f4076a;p=features.git GuiNomencl.xxx: Rename to be in line with class name. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35870 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py index 4aff506d17..e3868ef828 100644 --- a/development/scons/scons_manifest.py +++ b/development/scons/scons_manifest.py @@ -750,7 +750,7 @@ src_frontends_qt4_header_files = Split(''' GuiListings.h GuiLog.h GuiMathMatrix.h - GuiNomencl.h + GuiNomenclature.h GuiNote.h GuiPainter.h GuiParagraph.h @@ -854,7 +854,7 @@ src_frontends_qt4_files = Split(''' GuiListings.cpp GuiLog.cpp GuiMathMatrix.cpp - GuiNomencl.cpp + GuiNomenclature.cpp GuiNote.cpp GuiPainter.cpp GuiParagraph.cpp diff --git a/src/frontends/qt4/GuiNomencl.cpp b/src/frontends/qt4/GuiNomencl.cpp deleted file mode 100644 index 8267aab496..0000000000 --- a/src/frontends/qt4/GuiNomencl.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/** - * \file GuiNomencl.cpp - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author John Levon - * \author O. U. Baran - * - * Full author contact details are available in file CREDITS. - */ - -#include - -#include "GuiNomencl.h" - -#include "qt_helpers.h" - -#include "insets/InsetNomencl.h" - -using namespace std; - -namespace lyx { -namespace frontend { - -GuiNomenclature::GuiNomenclature(QWidget * parent) : InsetParamsWidget(parent) -{ - setupUi(this); - connect(symbolED, SIGNAL(textChanged(QString)), - this, SIGNAL(changed())); - connect(descriptionTE, SIGNAL(textChanged()), - this, SIGNAL(changed())); - - setFocusProxy(descriptionTE); -} - - -void GuiNomenclature::paramsToDialog(Inset const * inset) -{ - InsetNomencl const * nomencl = static_cast(inset); - InsetCommandParams const & params = nomencl->params(); - - prefixED->setText(toqstr(params["prefix"])); - symbolED->setText(toqstr(params["symbol"])); - QString description = toqstr(params["description"]); - description.replace("\\\\","\n"); - descriptionTE->setPlainText(description); - descriptionTE->setFocus(); -} - - -docstring GuiNomenclature::dialogToParams() const -{ - InsetCommandParams params(insetCode()); - params["prefix"] = qstring_to_ucs4(prefixED->text()); - params["symbol"] = qstring_to_ucs4(symbolED->text()); - QString description = descriptionTE->toPlainText(); - description.replace('\n',"\\\\"); - params["description"] = qstring_to_ucs4(description); - return from_ascii(InsetNomencl::params2string("nomenclature", params)); -} - - -bool GuiNomenclature::checkWidgets() const -{ - if (!InsetParamsWidget::checkWidgets()) - return false; - QString const description = descriptionTE->toPlainText(); - return !symbolED->text().isEmpty() && !description.isEmpty(); -} - -} // namespace frontend -} // namespace lyx - -#include "moc_GuiNomencl.cpp" diff --git a/src/frontends/qt4/GuiNomencl.h b/src/frontends/qt4/GuiNomencl.h deleted file mode 100644 index 502f8de53a..0000000000 --- a/src/frontends/qt4/GuiNomencl.h +++ /dev/null @@ -1,45 +0,0 @@ -// -*- C++ -*- -/** - * \file GuiNomenclature.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author John Levon - * \author Kalle Dalheimer - * \author O. U. Baran - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef GUINOMENCLATURE_H -#define GUINOMENCLATURE_H - -#include "ui_NomenclUi.h" - -#include "InsetParamsWidget.h" - -namespace lyx { -namespace frontend { - -class GuiNomenclature : public InsetParamsWidget, public Ui::NomenclUi -{ - Q_OBJECT - -public: - GuiNomenclature(QWidget * parent = 0); - -private: - /// \name InsetParamsWidget inherited methods - //@{ - InsetCode insetCode() const { return NOMENCL_CODE; } - FuncCode creationCode() const { return LFUN_INSET_INSERT; } - void paramsToDialog(Inset const *); - docstring dialogToParams() const; - bool checkWidgets() const; - //@} -}; - -} // namespace frontend -} // namespace lyx - -#endif // GUINOMENCLATURE_H diff --git a/src/frontends/qt4/GuiNomenclature.cpp b/src/frontends/qt4/GuiNomenclature.cpp new file mode 100644 index 0000000000..8267aab496 --- /dev/null +++ b/src/frontends/qt4/GuiNomenclature.cpp @@ -0,0 +1,74 @@ +/** + * \file GuiNomencl.cpp + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author John Levon + * \author O. U. Baran + * + * Full author contact details are available in file CREDITS. + */ + +#include + +#include "GuiNomencl.h" + +#include "qt_helpers.h" + +#include "insets/InsetNomencl.h" + +using namespace std; + +namespace lyx { +namespace frontend { + +GuiNomenclature::GuiNomenclature(QWidget * parent) : InsetParamsWidget(parent) +{ + setupUi(this); + connect(symbolED, SIGNAL(textChanged(QString)), + this, SIGNAL(changed())); + connect(descriptionTE, SIGNAL(textChanged()), + this, SIGNAL(changed())); + + setFocusProxy(descriptionTE); +} + + +void GuiNomenclature::paramsToDialog(Inset const * inset) +{ + InsetNomencl const * nomencl = static_cast(inset); + InsetCommandParams const & params = nomencl->params(); + + prefixED->setText(toqstr(params["prefix"])); + symbolED->setText(toqstr(params["symbol"])); + QString description = toqstr(params["description"]); + description.replace("\\\\","\n"); + descriptionTE->setPlainText(description); + descriptionTE->setFocus(); +} + + +docstring GuiNomenclature::dialogToParams() const +{ + InsetCommandParams params(insetCode()); + params["prefix"] = qstring_to_ucs4(prefixED->text()); + params["symbol"] = qstring_to_ucs4(symbolED->text()); + QString description = descriptionTE->toPlainText(); + description.replace('\n',"\\\\"); + params["description"] = qstring_to_ucs4(description); + return from_ascii(InsetNomencl::params2string("nomenclature", params)); +} + + +bool GuiNomenclature::checkWidgets() const +{ + if (!InsetParamsWidget::checkWidgets()) + return false; + QString const description = descriptionTE->toPlainText(); + return !symbolED->text().isEmpty() && !description.isEmpty(); +} + +} // namespace frontend +} // namespace lyx + +#include "moc_GuiNomencl.cpp" diff --git a/src/frontends/qt4/GuiNomenclature.h b/src/frontends/qt4/GuiNomenclature.h new file mode 100644 index 0000000000..502f8de53a --- /dev/null +++ b/src/frontends/qt4/GuiNomenclature.h @@ -0,0 +1,45 @@ +// -*- C++ -*- +/** + * \file GuiNomenclature.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author John Levon + * \author Kalle Dalheimer + * \author O. U. Baran + * + * Full author contact details are available in file CREDITS. + */ + +#ifndef GUINOMENCLATURE_H +#define GUINOMENCLATURE_H + +#include "ui_NomenclUi.h" + +#include "InsetParamsWidget.h" + +namespace lyx { +namespace frontend { + +class GuiNomenclature : public InsetParamsWidget, public Ui::NomenclUi +{ + Q_OBJECT + +public: + GuiNomenclature(QWidget * parent = 0); + +private: + /// \name InsetParamsWidget inherited methods + //@{ + InsetCode insetCode() const { return NOMENCL_CODE; } + FuncCode creationCode() const { return LFUN_INSET_INSERT; } + void paramsToDialog(Inset const *); + docstring dialogToParams() const; + bool checkWidgets() const; + //@} +}; + +} // namespace frontend +} // namespace lyx + +#endif // GUINOMENCLATURE_H diff --git a/src/frontends/qt4/Makefile.am b/src/frontends/qt4/Makefile.am index 03d8423909..86929431d0 100644 --- a/src/frontends/qt4/Makefile.am +++ b/src/frontends/qt4/Makefile.am @@ -100,7 +100,7 @@ SOURCEFILES = \ GuiListings.cpp \ GuiLog.cpp \ GuiMathMatrix.cpp \ - GuiNomencl.cpp \ + GuiNomenclature.cpp \ GuiNote.cpp \ GuiPainter.cpp \ GuiParagraph.cpp \ @@ -207,7 +207,7 @@ MOCHEADER = \ GuiListings.h \ GuiLog.h \ GuiMathMatrix.h \ - GuiNomencl.h \ + GuiNomenclature.h \ GuiNote.h \ GuiParagraph.h \ GuiPhantom.h \