mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
fix some index/label issue
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20162 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d21894949b
commit
022a231f3e
@ -838,7 +838,7 @@ void GuiDocumentDialog::updatePagestyle(string const & items, string const & sel
|
|||||||
toqstr(pagestyles[i].second));
|
toqstr(pagestyles[i].second));
|
||||||
|
|
||||||
if (nn > 0)
|
if (nn > 0)
|
||||||
pageLayoutModule->pagestyleCO->setCurrentIndex(n);
|
pageLayoutModule->pagestyleCO->setCurrentIndex(nn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,14 +28,20 @@ using std::string;
|
|||||||
namespace lyx {
|
namespace lyx {
|
||||||
namespace frontend {
|
namespace frontend {
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Base implementation
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
GuiIndexDialogBase::GuiIndexDialogBase(LyXView & lv,
|
GuiIndexDialogBase::GuiIndexDialogBase(LyXView & lv,
|
||||||
docstring const & title, QString const & label)
|
docstring const & title, QString const & label, std::string const & name)
|
||||||
: GuiDialog(lv, "index")
|
: GuiDialog(lv, name)
|
||||||
{
|
{
|
||||||
label_ = label;
|
label_ = label;
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
setViewTitle(title);
|
setViewTitle(title);
|
||||||
setController(new ControlCommand(*this, "index", "index"));
|
setController(new ControlCommand(*this, name, name));
|
||||||
|
|
||||||
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
|
||||||
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
|
||||||
@ -113,6 +119,46 @@ bool GuiIndexDialogBase::isValid()
|
|||||||
return !keywordED->text().isEmpty();
|
return !keywordED->text().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Index Dialog
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
GuiIndexDialog::GuiIndexDialog(LyXView & lv)
|
||||||
|
: GuiIndexDialogBase(lv, _("Index Entry"), qt_("&Keyword:"), "index")
|
||||||
|
{
|
||||||
|
keywordED->setWhatsThis( qt_(
|
||||||
|
"The format of the entry in the index.\n"
|
||||||
|
"\n"
|
||||||
|
"An entry can be specified as a sub-entry of\n"
|
||||||
|
"another with \"!\":\n"
|
||||||
|
"\n"
|
||||||
|
"cars!mileage\n"
|
||||||
|
"\n"
|
||||||
|
"You can cross-refer to another entry like so:\n"
|
||||||
|
"\n"
|
||||||
|
"cars!mileage|see{economy}\n"
|
||||||
|
"\n"
|
||||||
|
"For further details refer to the local LaTeX\n"
|
||||||
|
"documentation.\n")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Label Dialog
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
GuiLabelDialog::GuiLabelDialog(LyXView & lv)
|
||||||
|
: GuiIndexDialogBase(lv, _("Label"), qt_("&Label:"), "label")
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
} // namespace frontend
|
} // namespace frontend
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class GuiIndexDialogBase : public GuiDialog, public Ui::IndexUi
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
GuiIndexDialogBase(LyXView & lv, docstring const & title,
|
GuiIndexDialogBase(LyXView & lv, docstring const & title,
|
||||||
QString const & label);
|
QString const & label, std::string const & name);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void change_adaptor();
|
void change_adaptor();
|
||||||
@ -52,20 +52,17 @@ private:
|
|||||||
class GuiIndexDialog : public GuiIndexDialogBase
|
class GuiIndexDialog : public GuiIndexDialogBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GuiIndexDialog(LyXView & lv)
|
GuiIndexDialog(LyXView & lv);
|
||||||
: GuiIndexDialogBase(lv, _("Index Entry"), qt_("&Keyword:"))
|
|
||||||
{}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class GuiLabelDialog : public GuiIndexDialogBase
|
class GuiLabelDialog : public GuiIndexDialogBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GuiLabelDialog(LyXView & lv)
|
GuiLabelDialog(LyXView & lv);
|
||||||
: GuiIndexDialogBase(lv, _("Label"), qt_("&Label:"))
|
|
||||||
{}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // namespace frontend
|
} // namespace frontend
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user