Implement proper dialog titles in InsetParamsDialogs

Fixes: #10329
This commit is contained in:
Juergen Spitzmueller 2016-08-26 11:35:12 +02:00
parent c0f5c1dd9f
commit 010284dbe5
16 changed files with 21 additions and 1 deletions

View File

@ -35,6 +35,7 @@ public:
//@{ //@{
InsetCode insetCode() const { return FLOAT_CODE; } InsetCode insetCode() const { return FLOAT_CODE; }
FuncCode creationCode() const { return LFUN_FLOAT_INSERT; } FuncCode creationCode() const { return LFUN_FLOAT_INSERT; }
QString dialogTitle() const { return qt_("Float Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -33,6 +33,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return BIBITEM_CODE; } InsetCode insetCode() const { return BIBITEM_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; } FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Bibliography Item Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -41,6 +41,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return BOX_CODE; } InsetCode insetCode() const { return BOX_CODE; }
FuncCode creationCode() const { return LFUN_BOX_INSERT; } FuncCode creationCode() const { return LFUN_BOX_INSERT; }
QString dialogTitle() const { return qt_("Box Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -32,6 +32,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return BRANCH_CODE; } InsetCode insetCode() const { return BRANCH_CODE; }
FuncCode creationCode() const { return LFUN_BRANCH_INSERT; } FuncCode creationCode() const { return LFUN_BRANCH_INSERT; }
QString dialogTitle() const { return qt_("Branch Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -30,6 +30,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return ERT_CODE; } InsetCode insetCode() const { return ERT_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; } FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("TeX Mode Inset Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -36,6 +36,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return math_mode_ ? MATH_SPACE_CODE : SPACE_CODE; } InsetCode insetCode() const { return math_mode_ ? MATH_SPACE_CODE : SPACE_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; } FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Horizontal Space Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -32,6 +32,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return HYPERLINK_CODE; } InsetCode insetCode() const { return HYPERLINK_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; } FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Hyperlink Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -33,6 +33,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return INFO_CODE; } InsetCode insetCode() const { return INFO_CODE; }
FuncCode creationCode() const { return LFUN_INFO_INSERT; } FuncCode creationCode() const { return LFUN_INFO_INSERT; }
QString dialogTitle() const { return qt_("Info Inset Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -32,6 +32,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return LABEL_CODE; } InsetCode insetCode() const { return LABEL_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; } FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Label Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -31,6 +31,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return LINE_CODE; } InsetCode insetCode() const { return LINE_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; } FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Line Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -33,6 +33,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return NOMENCL_CODE; } InsetCode insetCode() const { return NOMENCL_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; } FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Nomenclature Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -42,6 +42,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return TABULAR_CODE; } InsetCode insetCode() const { return TABULAR_CODE; }
FuncCode creationCode() const { return LFUN_TABULAR_INSERT; } FuncCode creationCode() const { return LFUN_TABULAR_INSERT; }
QString dialogTitle() const { return qt_("Tabular Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -37,6 +37,7 @@ private:
//@{ //@{
InsetCode insetCode() const { return VSPACE_CODE; } InsetCode insetCode() const { return VSPACE_CODE; }
FuncCode creationCode() const { return LFUN_INSET_INSERT; } FuncCode creationCode() const { return LFUN_INSET_INSERT; }
QString dialogTitle() const { return qt_("Vertical Space Settings"); }
void paramsToDialog(Inset const *); void paramsToDialog(Inset const *);
docstring dialogToParams() const; docstring dialogToParams() const;
bool checkWidgets(bool readonly) const; bool checkWidgets(bool readonly) const;

View File

@ -74,7 +74,7 @@ struct InsetParamsDialog::Private
InsetParamsDialog::InsetParamsDialog(GuiView & lv, InsetParamsWidget * widget) InsetParamsDialog::InsetParamsDialog(GuiView & lv, InsetParamsWidget * widget)
: DialogView(lv, toqstr(insetName(widget->insetCode())), : DialogView(lv, toqstr(insetName(widget->insetCode())),
toqstr(insetName(widget->insetCode()))), d(new Private) widget->dialogTitle()), d(new Private)
{ {
setupUi(this); setupUi(this);
setInsetParamsWidget(widget); setInsetParamsWidget(widget);

View File

@ -13,6 +13,9 @@
#define INSET_PARAMS_WIDGET_H #define INSET_PARAMS_WIDGET_H
#include "insets/InsetCode.h" #include "insets/InsetCode.h"
#include "insets/Inset.h"
#include "qt_helpers.h"
#include "FuncCode.h" #include "FuncCode.h"
@ -58,6 +61,8 @@ public:
/// This is a base class; destructor must exist and be virtual. /// This is a base class; destructor must exist and be virtual.
virtual ~InsetParamsWidget() {} virtual ~InsetParamsWidget() {}
/// ///
virtual QString dialogTitle() const { return toqstr(insetName(insetCode())); }
///
virtual InsetCode insetCode() const = 0; virtual InsetCode insetCode() const = 0;
/// ///
virtual FuncCode creationCode() const = 0; virtual FuncCode creationCode() const = 0;

View File

@ -97,6 +97,8 @@ What's new
- Avoid to overwrite end-of-proof character with text on screen (bug - Avoid to overwrite end-of-proof character with text on screen (bug
10344). 10344).
- Use proper dialog titles in InsetParams-derived dialogs (bug 10329).
* INTERNALS * INTERNALS