GuiCitation::GuiCitation(GuiView & lv)
: DialogView(lv, "citation", qt_("Citation")),
- style_(QString()), params_(insetCode("citation"))
+ style_(QString()), literal_(false), params_(insetCode("citation"))
{
setupUi(this);
void GuiCitation::applyView()
{
int const choice = max(0, citationStyleCO->currentIndex());
- style_ = citationStyleCO->currentData().toString();
+ style_ = citationStyleCO->itemData(citationStyleCO->currentIndex()).toString();
bool const full = starredCB->isChecked();
bool const force = forceuppercaseCB->isChecked();
forceuppercaseCB->setEnabled(force && haveSelection);
if (force && haveSelection)
- forceuppercaseCB->setToolTip("Force upper case in names (\"Del Piero\", not \"del Piero\").");
+ forceuppercaseCB->setToolTip(qt_("Force upper case in names (\"Del Piero\", not \"del Piero\")."));
else
- forceuppercaseCB->setToolTip("Force upper case in names (\"Del Piero\", not \"del Piero\"), "
- "if the current citation style supports this.");
+ forceuppercaseCB->setToolTip(qt_("Force upper case in names (\"Del Piero\", not \"del Piero\"), "
+ "if the current citation style supports this."));
starredCB->setEnabled(full && haveSelection);
textBeforeED->setEnabled(textbefore && haveSelection);
textBeforeLA->setEnabled(textbefore && haveSelection);
citationStyleCO->blockSignals(true);
// save old style selection
- QString const curdata = citationStyleCO->currentData().toString();
+ QString const curdata =
+ citationStyleCO->itemData(citationStyleCO->currentIndex()).toString();
QString const olddata = (curdata.isEmpty()) ? style_ : curdata;
citationStyleCO->clear();
BiblioInfo::CiteStringMap::const_iterator cit = sty.begin();
}
-void GuiCitation::saveSession() const
+void GuiCitation::saveSession(QSettings & settings) const
{
- Dialog::saveSession();
- QSettings settings;
+ Dialog::saveSession(settings);
settings.setValue(
sessionKey() + "/regex", regexp_->isChecked());
settings.setValue(