]> git.lyx.org Git - lyx.git/commitdiff
User frontend for the new document-wide bibliography style feature.
authorJulien Rioux <jrioux@lyx.org>
Mon, 12 Dec 2011 14:45:30 +0000 (14:45 +0000)
committerJulien Rioux <jrioux@lyx.org>
Mon, 12 Dec 2011 14:45:30 +0000 (14:45 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40485 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/ui/BiblioUi.ui

index 378149f6170e7af2b97629f638490e1081292819..061b5f6c88d84d28407453ee3930480350900f92 100644 (file)
@@ -1119,9 +1119,13 @@ GuiDocument::GuiDocument(GuiView & lv)
                this, SLOT(bibtexChanged(int)));
        connect(biblioModule->bibtexOptionsLE, SIGNAL(textChanged(QString)),
                this, SLOT(change_adaptor()));
+       connect(biblioModule->bibtexStyleLE, SIGNAL(textChanged(QString)),
+               this, SLOT(change_adaptor()));
 
        biblioModule->bibtexOptionsLE->setValidator(new NoNewLineValidator(
                biblioModule->bibtexOptionsLE));
+       biblioModule->bibtexStyleLE->setValidator(new NoNewLineValidator(
+               biblioModule->bibtexStyleLE));
 
        biblioModule->citeStyleCO->addItem(qt_("Author-year"));
        biblioModule->citeStyleCO->addItem(qt_("Numerical"));
@@ -2240,6 +2244,8 @@ void GuiDocument::applyView()
        bp_.use_bibtopic =
                biblioModule->bibtopicCB->isChecked();
 
+       bp_.biblio_style = fromqstr(biblioModule->bibtexStyleLE->text());
+
        string const bibtex_command =
                fromqstr(biblioModule->bibtexCO->itemData(
                        biblioModule->bibtexCO->currentIndex()).toString());
@@ -2671,6 +2677,8 @@ void GuiDocument::paramsToDialog()
        biblioModule->bibtopicCB->setChecked(
                bp_.use_bibtopic);
 
+       biblioModule->bibtexStyleLE->setText(toqstr(bp_.biblio_style));
+
        string command;
        string options =
                split(bp_.bibtex_command, command, ' ');
index 6c6d5b8cb0641667a3e3beb2a279b38fd2d8f66e..896f99d126263b45bb6e54e5eeb328e90963cc6b 100644 (file)
     </widget>
    </item>
    <item row="1" column="0" >
-    <widget class="QCheckBox" name="bibtopicCB" >
-     <property name="toolTip" >
-      <string>Select this if you want to split your bibliography into sections</string>
+    <widget class="QGroupBox" name="BiblioStyleBG" >
+     <property name="title" >
+      <string>Bibliography Style</string>
      </property>
-     <property name="text" >
-      <string>S&amp;ectioned bibliography</string>
+     <property name="flat" >
+      <bool>true</bool>
      </property>
+     <layout class="QGridLayout" name="gridLayout_1" >
+      <item row="0" column="0" >
+       <layout class="QHBoxLayout" name="horizontalLayout_1" >
+        <item>
+         <widget class="QLabel" name="bibtexStyleLA" >
+          <property name="text" >
+           <string>Default st&amp;yle:</string>
+          </property>
+          <property name="buddy" >
+           <cstring>bibtexStyleLE</cstring>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QLineEdit" name="bibtexStyleLE" >
+          <property name="toolTip" >
+           <string>Define the default BibTeX style</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0" >
+       <widget class="QCheckBox" name="bibtopicCB" >
+        <property name="toolTip" >
+         <string>Select this if you want to split your bibliography into sections</string>
+        </property>
+        <property name="text" >
+         <string>S&amp;ectioned bibliography</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
     </widget>
    </item>
    <item row="2" column="0" >