]> git.lyx.org Git - lyx.git/commitdiff
Implement proper dialog titles in InsetParamsDialogs
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 26 Aug 2016 09:35:12 +0000 (11:35 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 26 Aug 2016 09:35:12 +0000 (11:35 +0200)
Fixes: #10329
15 files changed:
src/frontends/qt4/FloatPlacement.h
src/frontends/qt4/GuiBibitem.h
src/frontends/qt4/GuiBox.h
src/frontends/qt4/GuiBranch.h
src/frontends/qt4/GuiERT.h
src/frontends/qt4/GuiHSpace.h
src/frontends/qt4/GuiHyperlink.h
src/frontends/qt4/GuiInfo.h
src/frontends/qt4/GuiLabel.h
src/frontends/qt4/GuiLine.h
src/frontends/qt4/GuiNomenclature.h
src/frontends/qt4/GuiTabular.h
src/frontends/qt4/GuiVSpace.h
src/frontends/qt4/InsetParamsDialog.cpp
src/frontends/qt4/InsetParamsWidget.h

index 01ddb2ca406bc98e5e972cf59dd118dfa1d05afd..c5f8dd7ef1a508f2f5618baa0607634e400bd73b 100644 (file)
@@ -35,6 +35,7 @@ public:
        //@{
        InsetCode insetCode() const { return FLOAT_CODE; }
        FuncCode creationCode() const { return LFUN_FLOAT_INSERT; }
+       QString dialogTitle() const { return qt_("Float Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index 17d901c1ff9a2f2643532ad88c8804068407c216..d96d7c1fd790845f53cd5cc8d95706f6c657f2f8 100644 (file)
@@ -33,6 +33,7 @@ private:
        //@{
        InsetCode insetCode() const { return BIBITEM_CODE; }
        FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+       QString dialogTitle() const { return qt_("Bibliography Item Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index 955335037fa9f9b935ab61370c70979ddca4ed0e..4c32dcf8fa81b42d189fa3a818091c586c3a444c 100644 (file)
@@ -41,6 +41,7 @@ private:
        //@{
        InsetCode insetCode() const { return BOX_CODE; }
        FuncCode creationCode() const { return LFUN_BOX_INSERT; }
+       QString dialogTitle() const { return qt_("Box Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index 326839758b417db65dcf6e3494c56723b93ba599..69aaa8105262ce1a33199d15f611e05fb1317d93 100644 (file)
@@ -32,6 +32,7 @@ private:
        //@{
        InsetCode insetCode() const { return BRANCH_CODE; }
        FuncCode creationCode() const { return LFUN_BRANCH_INSERT; }
+       QString dialogTitle() const { return qt_("Branch Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index 35ca85c332a7af07980afbc6803068dcf9a28dec..cc4caefbaf7fac0997713c2abce97314eb73727c 100644 (file)
@@ -30,6 +30,7 @@ private:
        //@{
        InsetCode insetCode() const { return ERT_CODE; }
        FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+       QString dialogTitle() const { return qt_("TeX Mode Inset Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index 5b09d7a5d08e92b2da43ae67846ff7bf387e63d1..9be11ab6896c92eeceed25c6432add9bc633e36f 100644 (file)
@@ -36,6 +36,7 @@ private:
        //@{
        InsetCode insetCode() const { return math_mode_ ? MATH_SPACE_CODE : SPACE_CODE; }
        FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+       QString dialogTitle() const { return qt_("Horizontal Space Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index 4e319642680add787ea67301a15c5348fa6f67d5..3f24fce848d0eab4636b2521f863762c27c07cd4 100644 (file)
@@ -32,6 +32,7 @@ private:
        //@{
        InsetCode insetCode() const { return HYPERLINK_CODE; }
        FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+       QString dialogTitle() const { return qt_("Hyperlink Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index 2fecdbed7fb396e525a6bb6ffefe7f96aed28e45..f0ebfc474cd64a07fa7c501b9f1e593a74001df6 100644 (file)
@@ -33,6 +33,7 @@ private:
        //@{
        InsetCode insetCode() const { return INFO_CODE; }
        FuncCode creationCode() const { return LFUN_INFO_INSERT; }
+       QString dialogTitle() const { return qt_("Info Inset Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index 0b7afd21f8ebe19ab00f8fedd63327086ebca557..261f145a5e32b24932eed16cf5b18058249c2f8e 100644 (file)
@@ -32,6 +32,7 @@ private:
        //@{
        InsetCode insetCode() const { return LABEL_CODE; }
        FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+       QString dialogTitle() const { return qt_("Label Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index a1fded8ecc79e8865fcf78f297e16a8c4c954496..076d5444b129f21cd7f89d4461f4fc824a1de9d3 100644 (file)
@@ -31,6 +31,7 @@ private:
        //@{
        InsetCode insetCode() const { return LINE_CODE; }
        FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+       QString dialogTitle() const { return qt_("Line Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index 7e4c7f5c181a11787a04a3f4f2cc7328cc3f4248..30fb2c846fe02f6ffa304757cee8da6006ca81d7 100644 (file)
@@ -33,6 +33,7 @@ private:
        //@{
        InsetCode insetCode() const { return NOMENCL_CODE; }
        FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+       QString dialogTitle() const { return qt_("Nomenclature Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index c19e066ddb3be9fea0be77f76f6f0630bae05f42..20f7681780566eafe394a416c43dc7dccc19d5cb 100644 (file)
@@ -42,6 +42,7 @@ private:
        //@{
        InsetCode insetCode() const { return TABULAR_CODE; }
        FuncCode creationCode() const { return LFUN_TABULAR_INSERT; }
+       QString dialogTitle() const { return qt_("Tabular Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index f26d40e763ef2d54793a37941368da158220e199..36b4fecffa2f8192d7e21da3684e457d59084728 100644 (file)
@@ -37,6 +37,7 @@ private:
        //@{
        InsetCode insetCode() const { return VSPACE_CODE; }
        FuncCode creationCode() const { return LFUN_INSET_INSERT; }
+       QString dialogTitle() const { return qt_("Vertical Space Settings"); }
        void paramsToDialog(Inset const *);
        docstring dialogToParams() const;
        bool checkWidgets(bool readonly) const;
index 81652af61a88081ae4a933996478e92715793248..44f49b5a44e01d74c1db0e2b2c7c0c9cf92fea5b 100644 (file)
@@ -74,7 +74,7 @@ struct InsetParamsDialog::Private
 
 InsetParamsDialog::InsetParamsDialog(GuiView & lv, InsetParamsWidget * widget)
        : DialogView(lv, toqstr(insetName(widget->insetCode())),
-       toqstr(insetName(widget->insetCode()))), d(new Private)
+       widget->dialogTitle()), d(new Private)
 {
        setupUi(this);
        setInsetParamsWidget(widget);
index a5316454d2ec3b291ed2cf1c2c138a9a49993c86..96f90d180161eacb653646d29c2d5fa460776580 100644 (file)
@@ -13,6 +13,9 @@
 #define INSET_PARAMS_WIDGET_H
 
 #include "insets/InsetCode.h"
+#include "insets/Inset.h"
+
+#include "qt_helpers.h"
 
 #include "FuncCode.h"
 
@@ -58,6 +61,8 @@ public:
        /// This is a base class; destructor must exist and be virtual.
        virtual ~InsetParamsWidget() {}
        ///
+       virtual QString dialogTitle() const { return toqstr(insetName(insetCode())); }
+       ///
        virtual InsetCode insetCode() const = 0;
        ///
        virtual FuncCode creationCode() const = 0;