Am Samstag, den 15.10.2016, 11:11 +0200 schrieb Jürgen Spitzmüller: > * Citation dialog redesign: > http://www.lyx.org/trac/changeset/824e24ca/lyxgit > http://www.lyx.org/trac/changeset/5225418d/lyxgit > http://www.lyx.org/trac/changeset/0c1a023c/lyxgit > > * Keep citation style settings both within and between sessions > (#10256): > http://www.lyx.org/trac/changeset/3294b16b/lyxgit
Combined patch for these fixes attached. Jürgen
diff --git a/src/frontends/qt4/GuiCitation.cpp b/src/frontends/qt4/GuiCitation.cpp index 44118c7..872d304 100644 --- a/src/frontends/qt4/GuiCitation.cpp +++ b/src/frontends/qt4/GuiCitation.cpp @@ -16,6 +16,7 @@ #include "GuiCitation.h" +#include "GuiApplication.h" #include "GuiSelectionManager.h" #include "LyXToolBox.h" #include "qt_helpers.h" @@ -34,6 +35,7 @@ #include "support/lstrings.h" #include <QCloseEvent> +#include <QMenu> #include <QSettings> #include <QShowEvent> #include <QVariant> @@ -93,6 +95,36 @@ GuiCitation::GuiCitation(GuiView & lv) { setupUi(this); + // The filter bar + filter_ = new FancyLineEdit(this); +#if QT_VERSION >= 0x040600 + filter_->setButtonPixmap(FancyLineEdit::Right, getPixmap("images/", "editclear", "svgz,png")); + filter_->setButtonVisible(FancyLineEdit::Right, true); + filter_->setButtonToolTip(FancyLineEdit::Right, qt_("Clear text")); + filter_->setAutoHideButton(FancyLineEdit::Right, true); +#endif +#if QT_VERSION >= 0x040700 + filter_->setPlaceholderText(qt_("All avail. citations")); +#endif + + filterBarL->addWidget(filter_, 0); + findKeysLA->setBuddy(filter_); + + // Add search options as button menu + regexp_ = new QAction(qt_("Regular e&xpression"), this); + regexp_->setCheckable(true); + casesense_ = new QAction(qt_("Case se&nsitive"), this); + casesense_->setCheckable(true); + instant_ = new QAction(qt_("Search as you &type"), this); + instant_->setCheckable(true); + instant_->setChecked(true); + + QMenu * searchOpts = new QMenu(this); + searchOpts->addAction(regexp_); + searchOpts->addAction(casesense_); + searchOpts->addAction(instant_); + searchOptionsPB->setMenu(searchOpts); + connect(citationStyleCO, SIGNAL(activated(int)), this, SLOT(on_citationStyleCO_currentIndexChanged(int))); connect(fulllistCB, SIGNAL(clicked()), @@ -103,8 +135,6 @@ GuiCitation::GuiCitation(GuiView & lv) this, SLOT(updateStyles())); connect(textAfterED, SIGNAL(textChanged(QString)), this, SLOT(updateStyles())); - connect(findLE, SIGNAL(returnPressed()), - this, SLOT(on_searchPB_clicked())); connect(textBeforeED, SIGNAL(returnPressed()), this, SLOT(on_okPB_clicked())); connect(textAfterED, SIGNAL(returnPressed()), @@ -119,7 +149,20 @@ GuiCitation::GuiCitation(GuiView & lv) connect(selectionManager, SIGNAL(okHook()), this, SLOT(on_okPB_clicked())); - setFocusProxy(availableLV); + connect(filter_, SIGNAL(rightButtonClicked()), + this, SLOT(resetFilter())); + connect(filter_, SIGNAL(textEdited(QString)), + this, SLOT(filterChanged(QString))); + connect(filter_, SIGNAL(returnPressed()), + this, SLOT(filterPressed())); + connect(regexp_, SIGNAL(triggered()), + this, SLOT(regexChanged())); + connect(casesense_, SIGNAL(triggered()), + this, SLOT(caseChanged())); + connect(instant_, SIGNAL(triggered(bool)), + this, SLOT(instantChanged(bool))); + + setFocusProxy(filter_); } @@ -152,42 +195,12 @@ void GuiCitation::applyView() void GuiCitation::showEvent(QShowEvent * e) { - findLE->clear(); + filter_->clear(); availableLV->setFocus(); - - // Set the minimal size of the QToolbox. Without this, the size of the - // QToolbox is only determined by values in the ui file (e.g. computed by - // qtcreator) and therefore causes portability and localisation issues. Note - // that the page widgets must have a layout with layoutSizeContraint = - // SetMinimumSize or similar. KNOWN ISSUE: the calculations are incorrect - // the first time the dialog is shown. This problem is mitigated by the fact - // that LyX remembers the dialog sizes between sessions. - QSize minimum_size = QSize(0,0); - // Compute the max of the minimal sizes of the pages - QWidget * page; - for (int i = 0; (page = citationTB->widget(i)); ++i) - minimum_size = minimum_size.expandedTo(page->minimumSizeHint()); - // Add the height of the tabs - if (citationTB->currentWidget()) - minimum_size.rheight() += citationTB->height() - - citationTB->currentWidget()->height(); - citationTB->setMinimumSize(minimum_size); - DialogView::showEvent(e); } -void GuiCitation::on_citationTB_currentChanged(int i) -{ - if (i == 0) - findLE->setFocus(); - else if (citationStyleCO->isEnabled()) - citationStyleCO->setFocus(); - else - textAfterED->setFocus(); -} - - void GuiCitation::on_okPB_clicked() { applyView(); @@ -212,6 +225,7 @@ void GuiCitation::on_applyPB_clicked() void GuiCitation::on_restorePB_clicked() { init(); + updateFilterHint(); } @@ -355,9 +369,11 @@ void GuiCitation::updateInfo(BiblioInfo const & bi, QModelIndex const & idx) { if (!idx.isValid() || bi.empty()) { infoML->document()->clear(); + infoML->setToolTip(qt_("Displays a sketchy preview if a citation is selected above")); return; } + infoML->setToolTip(qt_("Sketchy preview of the selected citation")); QString const keytxt = toqstr( bi.getInfo(qstring_to_ucs4(idx.data().toString()), documentBuffer(), true)); infoML->document()->setHtml(keytxt); @@ -390,8 +406,9 @@ void GuiCitation::findText(QString const & text, bool reset) else entry_type = entries[index]; - bool const case_sentitive = caseCB->checkState(); - bool const reg_exp = regexCB->checkState(); + bool const case_sentitive = casesense_->isChecked(); + bool const reg_exp = regexp_->isChecked(); + findKey(bi, text, onlyKeys, field, entry_type, case_sentitive, reg_exp, reset); //FIXME @@ -405,13 +422,13 @@ void GuiCitation::findText(QString const & text, bool reset) void GuiCitation::on_fieldsCO_currentIndexChanged(int /*index*/) { - findText(findLE->text(), true); + findText(filter_->text(), true); } void GuiCitation::on_entriesCO_currentIndexChanged(int /*index*/) { - findText(findLE->text(), true); + findText(filter_->text(), true); } @@ -425,43 +442,58 @@ void GuiCitation::on_citationStyleCO_currentIndexChanged(int index) } -void GuiCitation::on_findLE_textChanged(const QString & text) +void GuiCitation::filterChanged(const QString & text) { - bool const searchAsWeGo = (asTypeCB->checkState() == Qt::Checked); - searchPB->setDisabled(text.isEmpty() || searchAsWeGo); if (!text.isEmpty()) { - if (searchAsWeGo) - findText(findLE->text()); + if (instant_->isChecked()) + findText(filter_->text()); return; } - findText(findLE->text()); - findLE->setFocus(); + findText(filter_->text()); + filter_->setFocus(); +} + + +void GuiCitation::filterPressed() +{ + findText(filter_->text(), true); } -void GuiCitation::on_searchPB_clicked() + +void GuiCitation::resetFilter() +{ + filter_->setText(QString()); + findText(filter_->text(), true); +} + + +void GuiCitation::caseChanged() { - findText(findLE->text(), true); + findText(filter_->text()); } -void GuiCitation::on_caseCB_stateChanged(int) +void GuiCitation::regexChanged() { - findText(findLE->text()); + findText(filter_->text()); } -void GuiCitation::on_regexCB_stateChanged(int) +void GuiCitation::updateFilterHint() { - findText(findLE->text()); + QString const hint = instant_->isChecked() ? + qt_("Enter string to filter the list of available citations") : + qt_("Enter string to filter the list of available citations and press <Enter>"); + filter_->setToolTip(hint); } -void GuiCitation::on_asTypeCB_stateChanged(int) +void GuiCitation::instantChanged(bool checked) { - bool const searchAsWeGo = (asTypeCB->checkState() == Qt::Checked); - searchPB->setDisabled(findLE->text().isEmpty() || searchAsWeGo); - if (searchAsWeGo) - findText(findLE->text(), true); + if (checked) + findText(filter_->text(), true); + + updateFilterHint(); } @@ -785,11 +817,11 @@ void GuiCitation::saveSession() const Dialog::saveSession(); QSettings settings; settings.setValue( - sessionKey() + "/regex", regexCB->isChecked()); + sessionKey() + "/regex", regexp_->isChecked()); settings.setValue( - sessionKey() + "/casesensitive", caseCB->isChecked()); + sessionKey() + "/casesensitive", casesense_->isChecked()); settings.setValue( - sessionKey() + "/autofind", asTypeCB->isChecked()); + sessionKey() + "/autofind", instant_->isChecked()); } @@ -797,12 +829,10 @@ void GuiCitation::restoreSession() { Dialog::restoreSession(); QSettings settings; - regexCB->setChecked( - settings.value(sessionKey() + "/regex").toBool()); - caseCB->setChecked( - settings.value(sessionKey() + "/casesensitive").toBool()); - asTypeCB->setChecked( - settings.value(sessionKey() + "/autofind").toBool()); + regexp_->setChecked(settings.value(sessionKey() + "/regex").toBool()); + casesense_->setChecked(settings.value(sessionKey() + "/casesensitive").toBool()); + instant_->setChecked(settings.value(sessionKey() + "/autofind").toBool()); + updateFilterHint(); } diff --git a/src/frontends/qt4/GuiCitation.h b/src/frontends/qt4/GuiCitation.h index cc24eb9..035b2d2 100644 --- a/src/frontends/qt4/GuiCitation.h +++ b/src/frontends/qt4/GuiCitation.h @@ -17,6 +17,7 @@ #include "DialogView.h" #include "ui_CitationUi.h" +#include "FancyLineEdit.h" #include "insets/InsetCommandParams.h" @@ -44,19 +45,19 @@ public: ~GuiCitation(); private Q_SLOTS: - void on_citationTB_currentChanged(int i); void on_okPB_clicked(); void on_cancelPB_clicked(); void on_restorePB_clicked(); void on_applyPB_clicked(); - void on_searchPB_clicked(); - void on_findLE_textChanged(const QString & text); + void filterPressed(); + void filterChanged(const QString & text); void on_fieldsCO_currentIndexChanged(int index); void on_entriesCO_currentIndexChanged(int index); void on_citationStyleCO_currentIndexChanged(int index); - void on_caseCB_stateChanged(int); - void on_regexCB_stateChanged(int); - void on_asTypeCB_stateChanged(int); + void resetFilter(); + void caseChanged(); + void regexChanged(); + void instantChanged(bool checked); void changed(); /// set the citation keys, mark as changed void setCitedKeys(); @@ -106,6 +107,8 @@ private: void updateFormatting(CitationStyle currentStyle); /// void updateControls(BiblioInfo const & bi); + /// Set the appropriate hinting text on the filter bar + void updateFilterHint(); /// void init(); /// Clear selected keys @@ -151,6 +154,16 @@ private: /// the like, so it should be avoided. BiblioInfo const & bibInfo() const; + /// contains the search box + FancyLineEdit * filter_; + + /// Regexp action + QAction * regexp_; + /// Case sensitive action + QAction * casesense_; + /// Search as you type action + QAction * instant_; + /// last used citation style int style_; /// diff --git a/src/frontends/qt4/ui/CitationUi.ui b/src/frontends/qt4/ui/CitationUi.ui index ce40759..4eb346b 100644 --- a/src/frontends/qt4/ui/CitationUi.ui +++ b/src/frontends/qt4/ui/CitationUi.ui @@ -6,7 +6,7 @@ <rect> <x>0</x> <y>0</y> - <width>590</width> + <width>614</width> <height>506</height> </rect> </property> @@ -16,66 +16,125 @@ <property name="sizeGripEnabled"> <bool>true</bool> </property> - <layout class="QGridLayout" name="gridLayout_4" rowstretch="1,0,0"> + <layout class="QGridLayout" name="gridLayout_3"> <item row="0" column="0"> - <layout class="QVBoxLayout" name="verticalLayout_2"> + <layout class="QHBoxLayout" name="horizontalLayout_6"> <item> - <layout class="QHBoxLayout"> - <property name="spacing"> - <number>6</number> - </property> - <property name="margin"> - <number>0</number> - </property> + <layout class="QHBoxLayout" name="horizontalLayout_5"> <item> - <widget class="QLabel" name="availableKeysLA"> + <widget class="QLabel" name="findKeysLA"> <property name="text"> - <string>A&vailable Citations:</string> + <string>&Filter:</string> </property> - <property name="buddy"> - <cstring>availableLV</cstring> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> </property> </widget> </item> <item> - <spacer> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>71</width> - <height>20</height> - </size> - </property> - </spacer> + <layout class="QHBoxLayout" name="filterBarL"/> </item> + </layout> + </item> + <item> + <widget class="QComboBox" name="fieldsCO"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Select the fields on which the filter applies</string> + </property> + <property name="maxVisibleItems"> + <number>16</number> + </property> + <property name="insertPolicy"> + <enum>QComboBox::NoInsert</enum> + </property> + <property name="sizeAdjustPolicy"> + <enum>QComboBox::AdjustToContents</enum> + </property> <item> - <widget class="QLabel" name="selectedKeysLA"> - <property name="text"> - <string>S&elected Citations:</string> - </property> - <property name="buddy"> - <cstring>selectedLV</cstring> - </property> - </widget> + <property name="text"> + <string>All fields</string> + </property> </item> - </layout> + </widget> </item> <item> + <widget class="QComboBox" name="entriesCO"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Select the entry types on which the filter applies</string> + </property> + <property name="insertPolicy"> + <enum>QComboBox::NoInsert</enum> + </property> + <property name="sizeAdjustPolicy"> + <enum>QComboBox::AdjustToContents</enum> + </property> + <item> + <property name="text"> + <string>All entry types</string> + </property> + </item> + </widget> + </item> + <item> + <widget class="QPushButton" name="searchOptionsPB"> + <property name="toolTip"> + <string>Click for more filter options</string> + </property> + <property name="text"> + <string>O&ptions</string> + </property> + <property name="autoDefault"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </item> + <item row="1" column="0"> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> <layout class="QGridLayout" name="gridLayout"> <item row="0" column="0"> <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QListView" name="availableLV"> - <property name="editTriggers"> - <set>QAbstractItemView::NoEditTriggers</set> - </property> - </widget> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> + <widget class="QLabel" name="availableKeysLA"> + <property name="text"> + <string>A&vailable Citations:</string> + </property> + <property name="buddy"> + <cstring>availableLV</cstring> + </property> + </widget> + </item> + <item> + <widget class="QListView" name="availableLV"> + <property name="editTriggers"> + <set>QAbstractItemView::NoEditTriggers</set> + </property> + </widget> + </item> + </layout> </item> <item> <layout class="QVBoxLayout" name="verticalLayout"> <item> + <widget class="QLabel" name="spacerLA"/> + </item> + <item> <widget class="QPushButton" name="addPB"> <property name="toolTip"> <string>Click or press Enter to add the selected citation to the list</string> @@ -130,8 +189,7 @@ </property> <property name="icon"> <iconset> - <normaloff/> - </iconset> + <normaloff>.</normaloff>.</iconset> </property> <property name="autoDefault"> <bool>false</bool> @@ -154,8 +212,7 @@ </property> <property name="icon"> <iconset> - <normaloff/> - </iconset> + <normaloff>.</normaloff>.</iconset> </property> <property name="autoDefault"> <bool>false</bool> @@ -165,11 +222,25 @@ </layout> </item> <item> - <widget class="QListView" name="selectedLV"> - <property name="editTriggers"> - <set>QAbstractItemView::NoEditTriggers</set> - </property> - </widget> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <widget class="QLabel" name="selectedKeysLA"> + <property name="text"> + <string>Selected &Citations:</string> + </property> + <property name="buddy"> + <cstring>selectedLV</cstring> + </property> + </widget> + </item> + <item> + <widget class="QListView" name="selectedLV"> + <property name="editTriggers"> + <set>QAbstractItemView::NoEditTriggers</set> + </property> + </widget> + </item> + </layout> </item> </layout> </item> @@ -184,6 +255,9 @@ <property name="acceptDrops"> <bool>false</bool> </property> + <property name="toolTip"> + <string/> + </property> <property name="readOnly"> <bool>true</bool> </property> @@ -193,293 +267,155 @@ </item> </layout> </item> - <item row="1" column="0"> - <widget class="lyx::frontend::LyXToolBox" name="citationTB"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="accessibleName"> - <string/> - </property> - <property name="currentIndex"> - <number>1</number> + <item row="2" column="0"> + <widget class="QGroupBox" name="FormattingGB"> + <property name="title"> + <string>Formatting</string> </property> - <widget class="QWidget" name="page"> - <attribute name="label"> - <string>&Search Citation</string> - </attribute> - <layout class="QGridLayout" name="gridLayout_3" columnstretch="0,1,0,0,0,0"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinimumSize</enum> - </property> - <item row="0" column="0"> - <widget class="QLabel" name="findKeysLA"> - <property name="text"> - <string>Searc&h:</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> - </property> - <property name="buddy"> - <cstring>findLE</cstring> - </property> - </widget> - </item> - <item row="0" column="1" colspan="4"> - <widget class="QLineEdit" name="findLE"> - <property name="toolTip"> - <string>Enter the text to search for and press Enter or click the button to search</string> - </property> - <property name="text"> - <string/> - </property> - </widget> - </item> - <item row="0" column="5"> - <widget class="QPushButton" name="searchPB"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="toolTip"> - <string>Click or press Enter in the search box to search</string> - </property> - <property name="text"> - <string>&Search</string> - </property> - <property name="autoDefault"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="fieldsLA"> - <property name="text"> - <string>Search &field:</string> - </property> - <property name="buddy"> - <cstring>fieldsCO</cstring> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QComboBox" name="fieldsCO"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maxVisibleItems"> - <number>16</number> - </property> - <property name="insertPolicy"> - <enum>QComboBox::NoInsert</enum> - </property> - <property name="sizeAdjustPolicy"> - <enum>QComboBox::AdjustToContents</enum> - </property> - <item> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <widget class="QLabel" name="citationStyleLA"> + <property name="text"> + <string>Citation st&yle:</string> + </property> + <property name="buddy"> + <cstring>citationStyleCO</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="textBeforeLA"> + <property name="text"> + <string>Text &before:</string> + </property> + <property name="buddy"> + <cstring>textBeforeED</cstring> + </property> + </widget> + </item> + </layout> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <item> + <widget class="QComboBox" name="citationStyleCO"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Citation style to use, if different styles are provided</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QLineEdit" name="textBeforeED"> + <property name="toolTip"> + <string>Text that precedes the reference (e.g., "cf.")</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="textAfterLA"> + <property name="text"> + <string>&Text after:</string> + </property> + <property name="buddy"> + <cstring>textAfterED</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="textAfterED"> + <property name="toolTip"> + <string>Text that follows the reference (e.g., pages)</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + </layout> + </item> + <item row="1" column="0"> + <layout class="QHBoxLayout"> + <property name="spacing"> + <number>6</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <spacer> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>21</width> + <height>26</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QCheckBox" name="forceuppercaseCB"> + <property name="toolTip"> + <string>Force upper case in names ("Del Piero", not "del Piero")</string> + </property> <property name="text"> - <string>All fields</string> + <string>Force upcas&ing</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="fulllistCB"> + <property name="toolTip"> + <string>Always list all authors (rather than using "et al.")</string> </property> - </item> - </widget> - </item> - <item row="1" column="2"> - <spacer> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="1" column="3"> - <widget class="QCheckBox" name="regexCB"> - <property name="text"> - <string>Regular e&xpression</string> - </property> - </widget> - </item> - <item row="1" column="4" colspan="2"> - <widget class="QCheckBox" name="caseCB"> - <property name="text"> - <string>Case se&nsitive</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="entriesLA"> - <property name="text"> - <string>Entry t&ypes:</string> - </property> - <property name="buddy"> - <cstring>entriesCO</cstring> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QComboBox" name="entriesCO"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="insertPolicy"> - <enum>QComboBox::NoInsert</enum> - </property> - <property name="sizeAdjustPolicy"> - <enum>QComboBox::AdjustToContents</enum> - </property> - <item> <property name="text"> - <string>All entry types</string> + <string>All aut&hors</string> </property> - </item> - </widget> - </item> - <item row="2" column="2"> - <spacer> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="2" column="4" colspan="2"> - <widget class="QCheckBox" name="asTypeCB"> - <property name="text"> - <string>Search as you &type</string> - </property> - </widget> - </item> - </layout> - </widget> - <widget class="QWidget" name="page_2"> - <attribute name="label"> - <string>For&matting</string> - </attribute> - <layout class="QGridLayout" name="gridLayout_2"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinimumSize</enum> - </property> - <item row="0" column="0"> - <widget class="QLabel" name="citationStyleLA"> - <property name="text"> - <string>Citation st&yle:</string> - </property> - <property name="buddy"> - <cstring>citationStyleCO</cstring> - </property> - </widget> - </item> - <item row="0" column="1" colspan="3"> - <widget class="QComboBox" name="citationStyleCO"> - <property name="toolTip"> - <string>Natbib citation style to use</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="textBeforeLA"> - <property name="text"> - <string>Text &before:</string> - </property> - <property name="buddy"> - <cstring>textBeforeED</cstring> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLineEdit" name="textBeforeED"> - <property name="toolTip"> - <string>Text to place before citation</string> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QLabel" name="textAfterLA"> - <property name="text"> - <string>&Text after:</string> - </property> - <property name="buddy"> - <cstring>textAfterED</cstring> - </property> - </widget> - </item> - <item row="1" column="3"> - <widget class="QLineEdit" name="textAfterED"> - <property name="toolTip"> - <string>Text to place after citation</string> - </property> - </widget> - </item> - <item row="2" column="0" colspan="4"> - <layout class="QHBoxLayout"> - <property name="spacing"> - <number>6</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item> - <spacer> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>21</width> - <height>26</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QCheckBox" name="fulllistCB"> - <property name="toolTip"> - <string>List all authors</string> - </property> - <property name="text"> - <string>&Full author list</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="forceuppercaseCB"> - <property name="toolTip"> - <string>Force upper case in citation</string> - </property> - <property name="text"> - <string>Force u&pper case</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> + </widget> + </item> + </layout> + </item> + </layout> </widget> </item> - <item row="2" column="0"> + <item row="3" column="0"> <layout class="QHBoxLayout"> <property name="spacing"> <number>6</number> </property> - <property name="margin"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> <number>0</number> </property> <item> @@ -542,28 +478,26 @@ </item> </layout> </widget> - <customwidgets> - <customwidget> - <class>lyx::frontend::LyXToolBox</class> - <extends>QToolBox</extends> - <header>LyXToolBox.h</header> - <container>1</container> - </customwidget> - </customwidgets> <tabstops> + <tabstop>fieldsCO</tabstop> + <tabstop>entriesCO</tabstop> + <tabstop>searchOptionsPB</tabstop> <tabstop>availableLV</tabstop> + <tabstop>selectedLV</tabstop> <tabstop>addPB</tabstop> <tabstop>deletePB</tabstop> <tabstop>upPB</tabstop> <tabstop>downPB</tabstop> - <tabstop>selectedLV</tabstop> - <tabstop>infoML</tabstop> - <tabstop>fulllistCB</tabstop> + <tabstop>citationStyleCO</tabstop> + <tabstop>textBeforeED</tabstop> + <tabstop>textAfterED</tabstop> <tabstop>forceuppercaseCB</tabstop> + <tabstop>fulllistCB</tabstop> <tabstop>restorePB</tabstop> <tabstop>okPB</tabstop> <tabstop>applyPB</tabstop> <tabstop>cancelPB</tabstop> + <tabstop>infoML</tabstop> </tabstops> <includes> <include location="local">qt_i18n.h</include> diff --git a/src/frontends/qt4/ui/RefUi.ui b/src/frontends/qt4/ui/RefUi.ui index daad341..3e45726 100644 --- a/src/frontends/qt4/ui/RefUi.ui +++ b/src/frontends/qt4/ui/RefUi.ui @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>RefUi</class> <widget class="QDialog" name="RefUi"> @@ -6,7 +7,7 @@ <x>0</x> <y>0</y> <width>435</width> - <height>500</height> + <height>539</height> </rect> </property> <property name="windowTitle"> @@ -15,45 +16,80 @@ <property name="sizeGripEnabled"> <bool>true</bool> </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0" colspan="2"> - <widget class="QLabel" name="refsL"> - <property name="text"> - <string>La&bels in:</string> - </property> - <property name="buddy"> - <cstring>bufferCO</cstring> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QComboBox" name="bufferCO"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="1" column="0" colspan="3"> - <widget class="Line" name="line"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLabel" name="findKeysLA"> + <property name="text"> + <string>&Filter:</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="refsL"> + <property name="text"> + <string>&In[[buffer]]:</string> + </property> + <property name="buddy"> + <cstring>bufferCO</cstring> + </property> + </widget> + </item> + </layout> + </item> + <item row="0" column="1"> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <layout class="QHBoxLayout" name="filterBarL"/> + </item> + <item> + <widget class="QCheckBox" name="csFindCB"> + <property name="toolTip"> + <string>Filter case-sensitively</string> + </property> + <property name="text"> + <string>Case Sensiti&ve</string> + </property> + </widget> + </item> + </layout> + </item> + <item> + <widget class="QComboBox" name="bufferCO"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>The (sub-)document from which the available labels are displayed</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> </item> - <item row="2" column="0" colspan="3"> + <item row="1" column="0"> <widget class="QLabel" name="label"> <property name="text"> - <string>&References</string> + <string>Available &Labels:</string> </property> <property name="buddy"> <cstring>refsTW</cstring> </property> </widget> </item> - <item row="3" column="0" colspan="3"> + <item row="2" column="0"> <widget class="QTreeWidget" name="refsTW"> <column> <property name="text"> @@ -62,121 +98,98 @@ </column> </widget> </item> - <item row="4" column="0" colspan="3"> + <item row="3" column="0"> <layout class="QHBoxLayout"> <property name="spacing"> <number>6</number> </property> - <property name="margin"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> <number>0</number> </property> <item> - <widget class="QLabel" name="findKeysLA"> + <widget class="QLabel" name="SortLA"> <property name="text"> - <string>Fil&ter:</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + <string>So&rt:</string> </property> <property name="buddy"> - <cstring>findLE</cstring> + <cstring>sortingCO</cstring> </property> </widget> </item> <item> - <widget class="QLineEdit" name="findLE"> + <widget class="QComboBox" name="sortingCO"> <property name="toolTip"> - <string>Enter string to filter the label list</string> - </property> - <property name="text"> - <string/> + <string>Sorting of the list of available labels</string> </property> </widget> </item> <item> - <widget class="QCheckBox" name="csFindCB"> + <widget class="QCheckBox" name="groupCB"> <property name="toolTip"> - <string>Filter case-sensitively</string> + <string>Group the list of available labels by prefix (e.g. "sec:")</string> </property> <property name="text"> - <string>Case-sensiti&ve</string> + <string>Grou&p</string> </property> </widget> </item> - </layout> - </item> - <item row="5" column="0" colspan="3"> - <layout class="QHBoxLayout"> - <property name="spacing"> - <number>6</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item> - <layout class="QHBoxLayout"> - <property name="spacing"> - <number>6</number> - </property> - <property name="margin"> - <number>0</number> - </property> - <item> - <widget class="QCheckBox" name="sortCB"> - <property name="toolTip"> - <string>Sort labels in alphabetical order (case-insensitively unless the Case-sensitive option is checked)</string> - </property> - <property name="text"> - <string>&Sort</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="caseSensitiveCB"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="toolTip"> - <string>Sort labels case-sensitively in alphabetical order</string> - </property> - <property name="text"> - <string>Cas&e-sensitive</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="groupCB"> - <property name="toolTip"> - <string>Group labels by prefix (e.g. "sec:")</string> - </property> - <property name="text"> - <string>Grou&p</string> - </property> - </widget> - </item> - </layout> - </item> <item> - <spacer> + <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> - <width>20</width> + <width>40</width> <height>20</height> </size> </property> </spacer> </item> + </layout> + </item> + <item row="4" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QLabel" name="referenceL"> + <property name="text"> + <string>Sele&cted Label:</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <property name="buddy"> + <cstring>referenceED</cstring> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="referenceED"> + <property name="toolTip"> + <string>Select a label from the list above or enter a label manually</string> + </property> + </widget> + </item> <item> <widget class="QPushButton" name="gotoPB"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> + <property name="toolTip"> + <string>Jump to the selected label</string> + </property> <property name="text"> <string>&Go to Label</string> </property> @@ -184,105 +197,119 @@ </item> </layout> </item> - <item row="6" column="0"> - <widget class="QLabel" name="referenceL"> - <property name="text"> - <string>&Label:</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> - </property> - <property name="buddy"> - <cstring>referenceED</cstring> - </property> - </widget> - </item> - <item row="6" column="1" colspan="2"> - <widget class="QLineEdit" name="referenceED"/> - </item> - <item row="7" column="1" colspan="2"> - <widget class="QComboBox" name="typeCO"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip"> - <string>Cross-reference as it appears in output</string> - </property> + <item row="5" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> <item> - <property name="text"> - <string><reference></string> - </property> - </item> - <item> - <property name="text"> - <string>(<reference>)</string> - </property> - </item> - <item> - <property name="text"> - <string><page></string> - </property> - </item> - <item> - <property name="text"> - <string>on page <page></string> - </property> + <widget class="QLabel" name="typeLA"> + <property name="text"> + <string>Reference For&mat:</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <property name="buddy"> + <cstring>typeCO</cstring> + </property> + </widget> </item> <item> - <property name="text"> - <string><reference> on page <page></string> - </property> + <widget class="QComboBox" name="typeCO"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="toolTip"> + <string>Adjust the style of the cross-reference</string> + </property> + <item> + <property name="text"> + <string><reference></string> + </property> + </item> + <item> + <property name="text"> + <string>(<reference>)</string> + </property> + </item> + <item> + <property name="text"> + <string><page></string> + </property> + </item> + <item> + <property name="text"> + <string>on page <page></string> + </property> + </item> + <item> + <property name="text"> + <string><reference> on page <page></string> + </property> + </item> + <item> + <property name="text"> + <string>Formatted reference</string> + </property> + </item> + <item> + <property name="text"> + <string>Textual reference</string> + </property> + </item> + </widget> </item> + </layout> + </item> + <item row="6" column="0"> + <layout class="QHBoxLayout" name="horizontalLayout_4"> <item> - <property name="text"> - <string>Formatted reference</string> - </property> + <widget class="QLabel" name="nameL"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>&Name:</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <property name="buddy"> + <cstring>nameED</cstring> + </property> + </widget> </item> <item> - <property name="text"> - <string>Textual reference</string> - </property> + <widget class="QLineEdit" name="nameED"> + <property name="enabled"> + <bool>false</bool> + </property> + </widget> </item> - </widget> - </item> - <item row="8" column="0"> - <widget class="QLabel" name="nameL"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>&Name:</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> - </property> - <property name="buddy"> - <cstring>nameED</cstring> - </property> - </widget> - </item> - <item row="8" column="1" colspan="2"> - <widget class="QLineEdit" name="nameED"> - <property name="enabled"> - <bool>false</bool> - </property> - </widget> + </layout> </item> - <item row="9" column="0" colspan="3"> + <item row="7" column="0"> <layout class="QHBoxLayout"> <property name="spacing"> <number>6</number> </property> - <property name="margin"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QPushButton" name="updatePB"> <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -349,30 +376,12 @@ </item> </layout> </item> - <item row="7" column="0"> - <widget class="QLabel" name="typeLA"> - <property name="text"> - <string>&Format:</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> - </property> - <property name="buddy"> - <cstring>typeCO</cstring> - </property> - </widget> - </item> </layout> </widget> <tabstops> - <tabstop>bufferCO</tabstop> <tabstop>refsTW</tabstop> - <tabstop>findLE</tabstop> <tabstop>csFindCB</tabstop> - <tabstop>sortCB</tabstop> - <tabstop>caseSensitiveCB</tabstop> <tabstop>groupCB</tabstop> - <tabstop>gotoPB</tabstop> <tabstop>referenceED</tabstop> <tabstop>typeCO</tabstop> <tabstop>nameED</tabstop>
signature.asc
Description: This is a digitally signed message part