mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
put citation dialog in good state:
- natbib style (the combox) works - when moving/up down the item stays selected (allowing sequential ups/downs) - when deleting the next selected entry gets focus (allowing sequential deletes) - the info is now shown and updated - find subsets the available entries as you type - no additional find dialog (removed QCitationFind.ui) - selecting with double-click - removal of unused: Citation class, toVector() function git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14252 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a5a508bdaa
commit
1f0a608b99
@ -23,7 +23,6 @@ UIFILES = \
|
||||
QChangesUi.ui \
|
||||
QCharacterUi.ui \
|
||||
QCitationUi.ui \
|
||||
QCitationFindUi.ui \
|
||||
QDelimiterUi.ui \
|
||||
QDocumentUi.ui \
|
||||
QErrorListUi.ui \
|
||||
|
@ -25,9 +25,6 @@
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
@ -46,15 +43,6 @@ QStringList toQStringList(vector<string> const & v)
|
||||
}
|
||||
|
||||
|
||||
void toVector(vector<string> & v, const QStringList & qlist)
|
||||
{
|
||||
v.clear();
|
||||
|
||||
for (size_t i=0; i != qlist.size(); ++i)
|
||||
v.push_back(fromqstr(qlist[i]));
|
||||
}
|
||||
|
||||
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
@ -68,7 +56,8 @@ QCitation::QCitation(Dialog & parent)
|
||||
void QCitation::apply(int const choice, bool const full, bool const force,
|
||||
QString before, QString after)
|
||||
{
|
||||
// InsetCommandParams & params = params();
|
||||
if (!isValid())
|
||||
return;
|
||||
|
||||
vector<biblio::CiteStyle> const & styles =
|
||||
ControlCitation::getCiteStyles();
|
||||
@ -77,25 +66,11 @@ void QCitation::apply(int const choice, bool const full, bool const force,
|
||||
biblio::CitationStyle(styles[choice], full, force)
|
||||
.asLatexStr();
|
||||
|
||||
params().setCmdName(command);
|
||||
params().setContents(fromqstr(selected_keys_.stringList().join(",")));
|
||||
params().setSecOptions(fromqstr(before));
|
||||
params().setOptions(fromqstr(after));
|
||||
dispatchParams();
|
||||
|
||||
/*
|
||||
if (dialog().controller().isBufferDependent()) {
|
||||
if (!dialog().kernel().isBufferAvailable() ||
|
||||
dialog().kernel().isBufferReadonly())
|
||||
return;
|
||||
}
|
||||
dialog().controller().dispatchParams();
|
||||
|
||||
if (dialog().controller().disconnectOnApply()) {
|
||||
dialog().kernel().disconnect(name());
|
||||
dialog().controller().initialiseParams(string());
|
||||
dialog().view().update();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@ -132,95 +107,43 @@ bool QCitation::isValid()
|
||||
}
|
||||
|
||||
|
||||
QModelIndex QCitation::findKey(QString const & str, QModelIndex const & index) const
|
||||
void QCitation::findKey(QString const & str)
|
||||
{
|
||||
QStringList const avail = available_keys_.stringList();
|
||||
int const pos = avail.indexOf(str, index.row());
|
||||
if (pos == -1)
|
||||
return index;
|
||||
return available_keys_.index(pos);
|
||||
QStringList sl = available_keys_.stringList().filter(str, Qt::CaseInsensitive);
|
||||
found_keys_.setStringList(sl);
|
||||
}
|
||||
|
||||
|
||||
QModelIndex QCitation::findKey(QString const & str) const
|
||||
void QCitation::addKey(QModelIndex const & index)
|
||||
{
|
||||
cout << "Find text " << fromqstr(str) << endl;
|
||||
|
||||
QStringList const avail = available_keys_.stringList();
|
||||
QRegExp reg_exp(str);
|
||||
|
||||
int const pos = avail.indexOf(reg_exp);
|
||||
if (pos == -1)
|
||||
return QModelIndex();
|
||||
|
||||
cout << "found key " << fromqstr(avail[pos]) << " at pos " << pos << endl;
|
||||
return available_keys_.index(pos);
|
||||
}
|
||||
|
||||
|
||||
void QCitation::addKeys(QModelIndexList const & indexes)
|
||||
{
|
||||
QModelIndex index;
|
||||
|
||||
if (indexes.empty())
|
||||
return;
|
||||
|
||||
QStringList keys = selected_keys_.stringList();
|
||||
|
||||
foreach(index, indexes) {
|
||||
if (keys.indexOf(index.data().toString()) == -1)
|
||||
keys.append(index.data().toString());
|
||||
}
|
||||
|
||||
keys.append(index.data().toString());
|
||||
selected_keys_.setStringList(keys);
|
||||
}
|
||||
|
||||
|
||||
void QCitation::deleteKeys(QModelIndexList const & indexes)
|
||||
void QCitation::deleteKey(QModelIndex const & index)
|
||||
{
|
||||
QModelIndex index;
|
||||
|
||||
if (indexes.empty())
|
||||
return;
|
||||
|
||||
QStringList keys = selected_keys_.stringList();
|
||||
|
||||
foreach(index, indexes) {
|
||||
int const pos = keys.indexOf(index.data().toString());
|
||||
if (pos != -1)
|
||||
keys.removeAt(pos);
|
||||
}
|
||||
|
||||
keys.removeAt(index.row());
|
||||
selected_keys_.setStringList(keys);
|
||||
}
|
||||
|
||||
|
||||
void QCitation::upKey(QModelIndexList const & indexes)
|
||||
void QCitation::upKey(QModelIndex const & index)
|
||||
{
|
||||
if (indexes.empty() || indexes.size() > 1)
|
||||
return;
|
||||
|
||||
int pos = indexes[0].row();
|
||||
if (pos < 1)
|
||||
return;
|
||||
|
||||
QStringList keys = selected_keys_.stringList();
|
||||
keys.swap(pos, pos-1);
|
||||
int pos = index.row();
|
||||
keys.swap(pos, pos - 1);
|
||||
selected_keys_.setStringList(keys);
|
||||
}
|
||||
|
||||
|
||||
void QCitation::downKey(QModelIndexList const & indexes)
|
||||
void QCitation::downKey(QModelIndex const & index)
|
||||
{
|
||||
if (indexes.empty() || indexes.size() > 1)
|
||||
return;
|
||||
|
||||
int pos = indexes[0].row();
|
||||
if (pos >= selected_keys_.rowCount() - 1)
|
||||
return;
|
||||
|
||||
QStringList keys = selected_keys_.stringList();
|
||||
keys.swap(pos, pos+1);
|
||||
int pos = index.row();
|
||||
keys.swap(pos, pos + 1);
|
||||
selected_keys_.setStringList(keys);
|
||||
}
|
||||
|
||||
@ -228,9 +151,18 @@ void QCitation::downKey(QModelIndexList const & indexes)
|
||||
QStringList QCitation::citationStyles(int sel)
|
||||
{
|
||||
string key = fromqstr(selected_keys_.stringList()[sel]);
|
||||
|
||||
return toQStringList(getCiteStrings(key));
|
||||
}
|
||||
|
||||
|
||||
QString QCitation::getKeyInfo(QString const & sel)
|
||||
{
|
||||
if (!bibkeysInfo().empty())
|
||||
return toqstr(biblio::getInfo(bibkeysInfo(), fromqstr(sel) ));
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
@ -25,35 +25,51 @@ class QCitation : public ControlCitation
|
||||
public:
|
||||
///
|
||||
QCitation(Dialog &);
|
||||
|
||||
/// Available keys
|
||||
QStringListModel * available()
|
||||
{ return &available_keys_; }
|
||||
|
||||
/// Selected keys
|
||||
QStringListModel * selected()
|
||||
{ return &selected_keys_; }
|
||||
|
||||
/// Found keys
|
||||
QStringListModel * found()
|
||||
{ return &found_keys_; }
|
||||
|
||||
/// Text before cite
|
||||
QString textBefore();
|
||||
|
||||
/// Text after cite
|
||||
QString textAfter();
|
||||
|
||||
QModelIndex findKey(QString const & str, QModelIndex const & index) const;
|
||||
QModelIndex findKey(QString const & str) const;
|
||||
/// Get key description
|
||||
QString getKeyInfo(QString const &);
|
||||
|
||||
void addKeys(QModelIndexList const & indexes);
|
||||
void deleteKeys(QModelIndexList const & indexes);
|
||||
void upKey(QModelIndexList const & indexes);
|
||||
void downKey(QModelIndexList const & indexes);
|
||||
/// Find keys containing the string (not case-sens)
|
||||
void findKey(QString const &);
|
||||
|
||||
QStringList citationStyles(int sel);
|
||||
/// Add key to selected keys
|
||||
void addKey(QModelIndex const &);
|
||||
|
||||
/// Delete key from selected keys
|
||||
void deleteKey(QModelIndex const &);
|
||||
|
||||
/// Move selected key one place up
|
||||
void upKey(QModelIndex const &);
|
||||
|
||||
/// Move selected key one place down
|
||||
void downKey(QModelIndex const &);
|
||||
|
||||
/// List of example cite strings
|
||||
QStringList citationStyles(int);
|
||||
|
||||
/// Check whether there are keys to select
|
||||
virtual bool isValid();
|
||||
|
||||
/// Set the Params variable for the Controller.
|
||||
virtual void apply(int const choice, bool const full, bool const force,
|
||||
QString before, QString After);
|
||||
QString before, QString after);
|
||||
|
||||
/// Update dialog before/whilst showing it.
|
||||
virtual void updateModel();
|
||||
@ -70,46 +86,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#if 0
|
||||
/** A controller for Citation dialogs.
|
||||
*/
|
||||
class Citation {
|
||||
public:
|
||||
///
|
||||
Citation();
|
||||
|
||||
///
|
||||
virtual bool initialiseParams(std::string const & data);
|
||||
|
||||
/// clean-up on hide.
|
||||
virtual void clearParams();
|
||||
|
||||
/** Disconnect from the inset when the Apply button is pressed.
|
||||
* Allows easy insertion of multiple citations.
|
||||
*/
|
||||
virtual bool disconnectOnApply() const { return true; }
|
||||
|
||||
/// Returns a reference to the map of stored keys
|
||||
biblio::InfoMap const & bibkeysInfo() const;
|
||||
|
||||
///
|
||||
biblio::CiteEngine_enum getEngine() const;
|
||||
|
||||
/// Possible citations based on this key
|
||||
std::vector<std::string> const getCiteStrings(std::string const & key) const;
|
||||
|
||||
/// available CiteStyle-s (depends on availability of Natbib/Jurabib)
|
||||
static std::vector<biblio::CiteStyle> const & getCiteStyles() {
|
||||
return citeStyles_;
|
||||
}
|
||||
private:
|
||||
/// The info associated with each key
|
||||
biblio::InfoMap bibkeysInfo_;
|
||||
|
||||
///
|
||||
static std::vector<biblio::CiteStyle> citeStyles_;
|
||||
};
|
||||
#endif
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -13,32 +13,25 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "QCitationDialog.h"
|
||||
#include "ui/QCitationFindUi.h"
|
||||
#include "QCitation.h"
|
||||
#include "Qt2BC.h"
|
||||
#include "qt_helpers.h"
|
||||
|
||||
#include "bufferparams.h"
|
||||
|
||||
#include "controllers/ControlCitation.h"
|
||||
#include "controllers/ButtonController.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <iostream>
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
using std::find;
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
using std::string;
|
||||
|
||||
namespace lyx {
|
||||
|
||||
using support::getStringFromVector;
|
||||
using support::getVectorFromString;
|
||||
using support::trim;
|
||||
|
||||
namespace frontend {
|
||||
|
||||
@ -50,50 +43,31 @@ QCitationDialog::QCitationDialog(Dialog & dialog, QCitation * form)
|
||||
|
||||
setCaption(toqstr("LyX: " + getTitle()));
|
||||
|
||||
/*
|
||||
|
||||
// Manage the ok, apply, restore and cancel/close buttons
|
||||
bcview().setOK(okPB);
|
||||
bcview().setApply(applyPB);
|
||||
bcview().setCancel(closePB);
|
||||
bcview().setRestore(restorePB);
|
||||
|
||||
bcview().addReadOnly(addPB);
|
||||
bcview().addReadOnly(deletePB);
|
||||
bcview().addReadOnly(upPB);
|
||||
bcview().addReadOnly(downPB);
|
||||
bcview().addReadOnly(citationStyleCO);
|
||||
bcview().addReadOnly(forceuppercaseCB);
|
||||
bcview().addReadOnly(fulllistCB);
|
||||
bcview().addReadOnly(textBeforeED);
|
||||
bcview().addReadOnly(textAfterED);
|
||||
*/
|
||||
|
||||
selectedLV->setModel(form_->selected());
|
||||
selectedLV->setModel(form_->selected());
|
||||
availableLV->setModel(form_->available());
|
||||
|
||||
// foundLV.setModel(form_->found());
|
||||
|
||||
connect( citationStyleCO, SIGNAL( activated(int) ), this, SLOT( changed() ) );
|
||||
connect( fulllistCB, SIGNAL( clicked() ), this, SLOT( changed() ) );
|
||||
connect( forceuppercaseCB, SIGNAL( clicked() ), this, SLOT( changed() ) );
|
||||
connect( textBeforeED, SIGNAL( textChanged(const QString&) ), this, SLOT( changed() ) );
|
||||
connect( textAfterED, SIGNAL( textChanged(const QString&) ), this, SLOT( changed() ) );
|
||||
|
||||
|
||||
// find_ = new QCitationFind(form_, this);
|
||||
|
||||
// connect(selectedLV, SIGNAL(doubleClicked(const QModelIndex & index)),
|
||||
// form_, SLOT(on_okPB_clicked()));//SLOT(slotOK()));
|
||||
connect(citationStyleCO, SIGNAL(activated(int)),
|
||||
this, SLOT(changed()));
|
||||
connect(fulllistCB, SIGNAL(clicked()),
|
||||
this, SLOT(changed()));
|
||||
connect(forceuppercaseCB, SIGNAL(clicked()),
|
||||
this, SLOT(changed()));
|
||||
connect(textBeforeED, SIGNAL(textChanged(const QString&)),
|
||||
this, SLOT(changed()));
|
||||
connect(textAfterED, SIGNAL(textChanged(const QString&)),
|
||||
this, SLOT(changed()));
|
||||
}
|
||||
|
||||
|
||||
QCitationDialog::~QCitationDialog()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::apply()
|
||||
{
|
||||
int const choice = std::max(0, citationStyleCO->currentItem());
|
||||
style_ = choice;
|
||||
bool const full = fulllistCB->isChecked();
|
||||
bool const force = forceuppercaseCB->isChecked();
|
||||
|
||||
@ -128,29 +102,40 @@ void QCitationDialog::on_okPB_clicked()
|
||||
accept();
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::on_cancelPB_clicked()
|
||||
{
|
||||
accept();
|
||||
// reject();
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::on_applyPB_clicked()
|
||||
{
|
||||
apply();
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::on_restorePB_clicked()
|
||||
{
|
||||
update();
|
||||
bc().valid(form_->isValid() );
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::update()
|
||||
{
|
||||
form_->updateModel();
|
||||
|
||||
// No keys have been selected yet, so...
|
||||
infoML->document()->clear();
|
||||
QModelIndex idxa = availableLV->currentIndex();
|
||||
if (!idxa.isValid())
|
||||
availableLV->setCurrentIndex(availableLV->model()->index(0,0));
|
||||
|
||||
QModelIndex idx = selectedLV->currentIndex();
|
||||
if (form_->isValid() && !idx.isValid()) {
|
||||
selectedLV->setCurrentIndex(selectedLV->model()->index(0,0));
|
||||
updateInfo(selectedLV->currentIndex());
|
||||
} else
|
||||
updateInfo(availableLV->currentIndex());
|
||||
|
||||
setButtons();
|
||||
|
||||
textBeforeED->setText(form_->textBefore());
|
||||
@ -160,6 +145,7 @@ void QCitationDialog::update()
|
||||
updateStyle();
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::updateStyle()
|
||||
{
|
||||
biblio::CiteEngine const engine = form_->getEngine();
|
||||
@ -233,83 +219,110 @@ void QCitationDialog::fillStyles()
|
||||
}
|
||||
|
||||
|
||||
bool QCitationDialog::isSelected(const QModelIndex & idx)
|
||||
{
|
||||
QString const str = idx.data().toString();
|
||||
return !form_->selected()->stringList().filter(str).isEmpty();
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::setButtons()
|
||||
{
|
||||
// if (form_->readOnly())
|
||||
// return;
|
||||
|
||||
int const row_count = selectedLV->model()->rowCount();
|
||||
|
||||
int sel_nr=-1;
|
||||
if (! selectedLV->selectionModel()->selectedIndexes().empty()) {
|
||||
sel_nr =
|
||||
selectedLV->selectionModel()->selectedIndexes()[0].row();
|
||||
}
|
||||
int const arows = availableLV->model()->rowCount();
|
||||
addPB->setEnabled(arows>0 && !isSelected(availableLV->currentIndex()));
|
||||
|
||||
int const srows = selectedLV->model()->rowCount();
|
||||
int const sel_nr = selectedLV->currentIndex().row();
|
||||
deletePB->setEnabled(sel_nr >= 0);
|
||||
upPB->setEnabled(sel_nr > 0);
|
||||
downPB->setEnabled(sel_nr >= 0 && sel_nr < row_count - 1);
|
||||
downPB->setEnabled(sel_nr >= 0 && sel_nr < srows - 1);
|
||||
applyPB->setEnabled(srows>0);
|
||||
okPB->setEnabled(srows>0);
|
||||
}
|
||||
|
||||
/*
|
||||
void QCitationDialog::on_selectedLV_currentChanged(QListWidgetItem*)
|
||||
|
||||
void QCitationDialog::updateInfo(const QModelIndex & idx)
|
||||
{
|
||||
fillStyles();
|
||||
infoML->document()->clear();
|
||||
if (idx.isValid()) {
|
||||
QString const keytxt = form_->getKeyInfo(idx.data().toString());
|
||||
infoML->document()->setPlainText(keytxt);
|
||||
} else
|
||||
infoML->document()->clear();
|
||||
}
|
||||
|
||||
int const sel = selectedLW->currentItem();
|
||||
if (sel < 0) {
|
||||
setButtons();
|
||||
return;
|
||||
}
|
||||
|
||||
infoML->document()->setPlainText(form_->getKeyInfo(sel));
|
||||
void QCitationDialog::on_selectedLV_clicked(const QModelIndex & idx)
|
||||
{
|
||||
updateInfo(idx);
|
||||
changed();
|
||||
}
|
||||
|
||||
void QCitationDialog::on_availableLV_clicked(const QModelIndex & idx)
|
||||
{
|
||||
updateInfo(idx);
|
||||
setButtons();
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
void QCitationDialog::on_availableLV_activated(const QModelIndex & idx)
|
||||
{
|
||||
if (isSelected(idx))
|
||||
return;
|
||||
|
||||
on_addPB_clicked();
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::on_addPB_clicked()
|
||||
{
|
||||
form_->addKeys(availableLV->selectionModel()->selectedIndexes());
|
||||
QModelIndex idx = selectedLV->currentIndex();
|
||||
form_->addKey(availableLV->currentIndex());
|
||||
if (idx.isValid())
|
||||
selectedLV->setCurrentIndex(idx);
|
||||
changed();
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::on_deletePB_clicked()
|
||||
{
|
||||
form_->deleteKeys(selectedLV->selectionModel()->selectedIndexes());
|
||||
QModelIndex idx = selectedLV->currentIndex();
|
||||
int nrows = selectedLV->model()->rowCount();
|
||||
|
||||
form_->deleteKey(idx);
|
||||
|
||||
if (idx.row() == nrows - 1)
|
||||
idx = idx.sibling(idx.row() - 1, idx.column());
|
||||
|
||||
if (nrows>1)
|
||||
selectedLV->setCurrentIndex(idx);
|
||||
|
||||
updateInfo(selectedLV->currentIndex());
|
||||
changed();
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::on_upPB_clicked()
|
||||
{
|
||||
form_->upKey(selectedLV->selectionModel()->selectedIndexes());
|
||||
QModelIndex idx = selectedLV->currentIndex();
|
||||
form_->upKey(idx);
|
||||
selectedLV->setCurrentIndex(idx.sibling(idx.row() - 1, idx.column()));
|
||||
changed();
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::on_downPB_clicked()
|
||||
{
|
||||
form_->downKey(selectedLV->selectionModel()->selectedIndexes());
|
||||
QModelIndex idx = selectedLV->currentIndex();
|
||||
form_->downKey(idx);
|
||||
selectedLV->setCurrentIndex(idx.sibling(idx.row() + 1, idx.column()));
|
||||
changed();
|
||||
}
|
||||
|
||||
|
||||
void QCitationDialog::on_findLE_textChanged(const QString & text)
|
||||
{
|
||||
QModelIndex const index = form_->findKey(text);
|
||||
if (! index.isValid())
|
||||
return;
|
||||
|
||||
// QItemSelection selection(index, index);
|
||||
availableLV->selectionModel()->select(index, QItemSelectionModel::Select);
|
||||
changed();
|
||||
}
|
||||
|
||||
void QCitationDialog::on_advancedSearchPB_clicked()
|
||||
{
|
||||
// find_->exec();
|
||||
form_->findKey(text);
|
||||
availableLV->setModel(form_->found());
|
||||
changed();
|
||||
}
|
||||
|
||||
@ -321,149 +334,6 @@ void QCitationDialog::changed()
|
||||
}
|
||||
|
||||
|
||||
void updateBrowser(QListWidget * browser,
|
||||
vector<string> const & keys)
|
||||
{
|
||||
browser->clear();
|
||||
|
||||
for (vector<string>::const_iterator it = keys.begin();
|
||||
it < keys.end(); ++it) {
|
||||
string const key = trim(*it);
|
||||
// FIXME: why the .empty() test ?
|
||||
if (!key.empty())
|
||||
browser->addItem(toqstr(key));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QCitationFind::QCitationFind(QCitation * form, QWidget * parent, Qt::WFlags f)
|
||||
: form_(form), QDialog(parent, f)
|
||||
{
|
||||
setupUi(this);
|
||||
connect(addPB, SIGNAL(clicked()), this, SLOT(accept()));
|
||||
connect(closePB, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
connect(previousPB, SIGNAL(clicked()), this, SLOT(previous()));
|
||||
connect(nextPB, SIGNAL(clicked()), this, SLOT(next()));
|
||||
}
|
||||
|
||||
void QCitationFind::update()
|
||||
{
|
||||
// updateBrowser(availableLW, form_->availableKeys());
|
||||
}
|
||||
|
||||
void QCitationFind::on_availableLW_currentItemChanged(QListWidgetItem *)
|
||||
{
|
||||
infoML->document()->clear();
|
||||
|
||||
int const sel = availableLW->currentRow();
|
||||
if (sel < 0) {
|
||||
addPB->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
addPB->setEnabled(true);
|
||||
// infoML->document()->setPlainText(form_->getKeyInfo(sel));
|
||||
}
|
||||
|
||||
|
||||
void QCitationFind::on_availableLW_itemActivated(QListWidgetItem *)
|
||||
{
|
||||
// int const sel = availableLW->currentRow();
|
||||
foundkeys.clear();
|
||||
// foundkeys.push_back(form_->availableKeys()[sel]);
|
||||
emit newCitations();
|
||||
accept();
|
||||
}
|
||||
|
||||
void QCitationFind::on_addPB_clicked()
|
||||
{
|
||||
// form_->addKeys(availableLW->selectionModel()->selectedIndexes());
|
||||
|
||||
int const sel = availableLW->currentRow();
|
||||
|
||||
if (sel < 0)
|
||||
return;
|
||||
|
||||
QStringList bibkeys = form_->available()->stringList();
|
||||
|
||||
// Add the selected browser_bib keys to browser_cite
|
||||
// multiple selections are possible
|
||||
for (unsigned int i = 0; i != availableLW->count(); i++) {
|
||||
if (availableLW->isItemSelected(availableLW->item(i))) {
|
||||
foundkeys.push_back(fromqstr(bibkeys[i]));
|
||||
}
|
||||
}
|
||||
|
||||
emit newCitations();
|
||||
accept();
|
||||
}
|
||||
|
||||
|
||||
void QCitationFind::previous()
|
||||
{
|
||||
find(biblio::BACKWARD);
|
||||
}
|
||||
|
||||
|
||||
void QCitationFind::next()
|
||||
{
|
||||
find(biblio::FORWARD);
|
||||
}
|
||||
|
||||
|
||||
void QCitationFind::find(biblio::Direction dir)
|
||||
{
|
||||
/* QStringList bibkeys = form_->available()->stringList();
|
||||
|
||||
biblio::InfoMap const & theMap = form_->bibkeysInfo();
|
||||
|
||||
biblio::Search const type = searchTypeCB->isChecked()
|
||||
? biblio::REGEX : biblio::SIMPLE;
|
||||
|
||||
vector<string>::const_iterator start = bibkeys.begin();
|
||||
int const sel = availableLW->currentItem();
|
||||
if (sel >= 0 && sel <= int(bibkeys.size()-1))
|
||||
start += sel;
|
||||
|
||||
// Find the NEXT instance...
|
||||
if (dir == biblio::FORWARD)
|
||||
start += 1;
|
||||
|
||||
bool const casesens = searchCaseCB->isChecked();
|
||||
string const str = fromqstr(searchED->text());
|
||||
|
||||
vector<string>::const_iterator cit =
|
||||
biblio::searchKeys(theMap, bibkeys, str,
|
||||
start, type, dir, casesens);
|
||||
|
||||
// not found. let's loop round
|
||||
if (cit == bibkeys.end()) {
|
||||
if (dir == biblio::FORWARD) {
|
||||
start = bibkeys.begin();
|
||||
}
|
||||
else start = bibkeys.end() - 1;
|
||||
|
||||
cit = biblio::searchKeys(theMap, bibkeys, str,
|
||||
start, type, dir, casesens);
|
||||
|
||||
if (cit == bibkeys.end())
|
||||
return;
|
||||
}
|
||||
|
||||
int const found = int(cit - bibkeys.begin());
|
||||
if (found == sel) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the display
|
||||
// note that we have multi selection mode!
|
||||
availableLW->setSelected(sel, false);
|
||||
availableLW->setSelected(found, true);
|
||||
availableLW->setCurrentItem(found);
|
||||
availableLW->ensureCurrentVisible();
|
||||
*/
|
||||
}
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -13,24 +13,12 @@
|
||||
#define QCITATIONDIALOG_H
|
||||
|
||||
#include "Dialog.h"
|
||||
|
||||
#include "ui/QCitationUi.h"
|
||||
#include "ui/QCitationFindUi.h"
|
||||
#include "controllers/biblio.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <vector>
|
||||
|
||||
class QListWidget;
|
||||
class QListWidgetItem;
|
||||
|
||||
class InsetCommandParams;
|
||||
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
|
||||
class QCitation;
|
||||
class QCitationFind;
|
||||
|
||||
class QCitationDialog: public QDialog, public Ui::QCitationUi, public Dialog::View {
|
||||
Q_OBJECT
|
||||
@ -38,8 +26,6 @@ class QCitationDialog: public QDialog, public Ui::QCitationUi, public Dialog::Vi
|
||||
public:
|
||||
QCitationDialog(Dialog &, QCitation * form );
|
||||
|
||||
//QCitationDialog(QCitation * form);
|
||||
|
||||
virtual ~QCitationDialog();
|
||||
|
||||
virtual void apply();
|
||||
@ -61,26 +47,27 @@ public:
|
||||
|
||||
protected slots:
|
||||
|
||||
// void on_selectedLB_currentChanged(QListWidgetItem*);
|
||||
|
||||
void on_okPB_clicked();
|
||||
void on_cancelPB_clicked();
|
||||
void on_restorePB_clicked();
|
||||
void on_applyPB_clicked();
|
||||
void on_addPB_clicked();
|
||||
|
||||
void on_deletePB_clicked();
|
||||
void on_upPB_clicked();
|
||||
void on_downPB_clicked();
|
||||
void on_findLE_textChanged(const QString & text);
|
||||
void on_advancedSearchPB_clicked();
|
||||
|
||||
void on_selectedLV_clicked(const QModelIndex &);
|
||||
void on_availableLV_clicked(const QModelIndex &);
|
||||
void on_availableLV_activated(const QModelIndex &);
|
||||
virtual void changed();
|
||||
/// check whether key is already selected
|
||||
bool isSelected(const QModelIndex &);
|
||||
/// update infobox
|
||||
void updateInfo(const QModelIndex &);
|
||||
|
||||
private:
|
||||
/// enable/disable buttons
|
||||
void setButtons();
|
||||
/// open the find dialog if nothing selected
|
||||
void openFind();
|
||||
|
||||
/// fill the styles combo
|
||||
void fillStyles();
|
||||
@ -88,51 +75,13 @@ private:
|
||||
/// set the styles combo
|
||||
void updateStyle();
|
||||
|
||||
/// check if apply has been pressed
|
||||
bool open_find_;
|
||||
|
||||
/// selected keys
|
||||
std::vector<std::string> citekeys;
|
||||
|
||||
/// selected natbib style
|
||||
/// last used citation style
|
||||
int style_;
|
||||
|
||||
QCitation * form_;
|
||||
QCitationFind * find_;
|
||||
};
|
||||
|
||||
|
||||
class QCitationFind: public QDialog, public Ui::QCitationFindUi {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QCitationFind(QCitation * form, QWidget * parent = 0, Qt::WFlags f = 0);
|
||||
|
||||
void update();
|
||||
|
||||
std::vector<std::string> const & foundCitations()
|
||||
{ return foundkeys; }
|
||||
|
||||
signals:
|
||||
void newCitations();
|
||||
|
||||
protected slots:
|
||||
|
||||
void on_availableLW_currentItemChanged(QListWidgetItem *);
|
||||
void on_availableLW_itemActivated(QListWidgetItem *);
|
||||
void on_addPB_clicked();
|
||||
virtual void previous();
|
||||
virtual void next();
|
||||
|
||||
private:
|
||||
void find(biblio::Direction dir);
|
||||
|
||||
/// selected keys
|
||||
std::vector<std::string> foundkeys;
|
||||
|
||||
QCitation * form_;
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
} // namespace lyx
|
||||
|
||||
|
@ -1,219 +0,0 @@
|
||||
<ui version="4.0" >
|
||||
<author></author>
|
||||
<comment></comment>
|
||||
<exportmacro></exportmacro>
|
||||
<class>QCitationFindUi</class>
|
||||
<widget class="QDialog" name="QCitationFindUi" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>375</width>
|
||||
<height>257</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>1</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>LyX: Add Citation</string>
|
||||
</property>
|
||||
<property name="sizeGripEnabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item rowspan="5" row="0" column="0" >
|
||||
<widget class="QListWidget" name="availableLW" />
|
||||
</item>
|
||||
<item row="1" column="2" colspan="3" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>191</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLabel" name="TextLabel1" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>1</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Find:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>searchED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="3" >
|
||||
<widget class="QCheckBox" name="searchTypeCB" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Interpret search entry as a regular expression</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Regular Expression</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4" >
|
||||
<widget class="QPushButton" name="nextPB" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Next</string>
|
||||
</property>
|
||||
<property name="shortcut" >
|
||||
<number>276824142</number>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="3" >
|
||||
<widget class="QCheckBox" name="searchCaseCB" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Make the search case-sensitive</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Case &sensitive</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="4" >
|
||||
<widget class="QLineEdit" name="searchED" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>7</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Browse the available bibliography entries</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4" >
|
||||
<widget class="QPushButton" name="previousPB" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Previous</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="4" >
|
||||
<widget class="QTextEdit" name="infoML" />
|
||||
</item>
|
||||
<item row="5" column="3" >
|
||||
<widget class="QPushButton" name="addPB" >
|
||||
<property name="text" >
|
||||
<string>&Add</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="default" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="4" >
|
||||
<widget class="QPushButton" name="closePB" >
|
||||
<property name="text" >
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" colspan="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||
<tabstops>
|
||||
<tabstop>searchED</tabstop>
|
||||
<tabstop>searchCaseCB</tabstop>
|
||||
<tabstop>searchTypeCB</tabstop>
|
||||
<tabstop>previousPB</tabstop>
|
||||
<tabstop>nextPB</tabstop>
|
||||
<tabstop>addPB</tabstop>
|
||||
<tabstop>closePB</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -8,8 +8,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>401</width>
|
||||
<height>457</height>
|
||||
<width>390</width>
|
||||
<height>415</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
@ -26,370 +26,336 @@
|
||||
<property name="sizeGripEnabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>20</y>
|
||||
<width>79</width>
|
||||
<height>118</height>
|
||||
</rect>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QPushButton" name="applyPB" >
|
||||
<property name="text" >
|
||||
<string>A&pply</string>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2" >
|
||||
<widget class="QLabel" name="availableKeysLA" >
|
||||
<property name="text" >
|
||||
<string>&Available Citations:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>availableLV</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QPushButton" name="addPB" >
|
||||
<property name="toolTip" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Add</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
<widget class="QLabel" name="selectedKeysLA" >
|
||||
<property name="text" >
|
||||
<string>&Selected citations:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>selectedLV</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QPushButton" name="upPB" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Move the selected citation up</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Up</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="5" row="1" column="2" >
|
||||
<widget class="QListView" name="selectedLV" >
|
||||
<property name="editTriggers" >
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item rowspan="5" row="1" column="0" >
|
||||
<widget class="QListView" name="availableLV" >
|
||||
<property name="editTriggers" >
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" >
|
||||
<widget class="QPushButton" name="downPB" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Move the selected citation down</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Down</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QPushButton" name="deletePB" >
|
||||
<property name="text" >
|
||||
<string>D&elete</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="findKeysLA" >
|
||||
<property name="text" >
|
||||
<string>&Find:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>selectedLV</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="findLE" >
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="infoML" />
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="styleGB" >
|
||||
<property name="title" >
|
||||
<string>Formatting</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QPushButton" name="cancelPB" >
|
||||
<property name="text" >
|
||||
<string>&Cancel</string>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QPushButton" name="restorePB" >
|
||||
<property name="text" >
|
||||
<string>&Restore</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QPushButton" name="okPB" >
|
||||
<property name="text" >
|
||||
<string>&OK</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="default" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="GroupBox8" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>220</y>
|
||||
<width>201</width>
|
||||
<height>156</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Style</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="citationStyleLA" >
|
||||
<property name="text" >
|
||||
<string>Citation &style:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>citationStyleCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="citationStyleCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Natbib citation style to use</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2" >
|
||||
<widget class="QCheckBox" name="forceuppercaseCB" >
|
||||
<property name="toolTip" >
|
||||
<string>Force upper case in citation</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Force &upper case</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="textAfterLA" >
|
||||
<property name="text" >
|
||||
<string>&Text after:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>textAfterED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QLineEdit" name="textAfterED" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Text to place after citation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="textBeforeED" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Text to place before citation</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>textAfterED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<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>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="downPB" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>110</y>
|
||||
<width>41</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Move the selected citation down</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Down</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="upPB" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>80</y>
|
||||
<width>41</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>0</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Move the selected citation up</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Up</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="deletePB" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>50</y>
|
||||
<width>41</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>D&elete</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="addPB" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>20</y>
|
||||
<width>41</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Add</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="selectedKeysLA" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>0</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Citations to insert:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>selectedLV</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="availableKeysLA" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>0</y>
|
||||
<width>111</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Available Citations:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>selectedLB</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="findKeysLA" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>206</y>
|
||||
<width>23</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Find:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>selectedLV</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTextEdit" name="infoML" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>380</y>
|
||||
<width>371</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="documentTitle" >
|
||||
<string>Citation Information</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QListView" name="selectedLV" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>120</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QListView" name="availableLV" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>20</y>
|
||||
<width>120</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="findLE" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>204</y>
|
||||
<width>120</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="advancedSearchPB" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>240</y>
|
||||
<width>111</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Advanced &Search...</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="0" column="1" colspan="2" >
|
||||
<widget class="QComboBox" name="citationStyleCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Natbib citation style to use</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="citationStyleLA" >
|
||||
<property name="text" >
|
||||
<string>Citation &style:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>citationStyleCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2" >
|
||||
<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 row="3" column="2" >
|
||||
<widget class="QCheckBox" name="forceuppercaseCB" >
|
||||
<property name="toolTip" >
|
||||
<string>Force upper case in citation</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Force &upper case</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="textAfterLA" >
|
||||
<property name="text" >
|
||||
<string>&Text after:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>textAfterED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="textAfterED" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Text to place after citation</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>textAfterED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="textBeforeED" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>5</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Text to place before citation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="restorePB" >
|
||||
<property name="text" >
|
||||
<string>&Restore</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okPB" >
|
||||
<property name="text" >
|
||||
<string>&OK</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="default" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="applyPB" >
|
||||
<property name="text" >
|
||||
<string>A&pply</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelPB" >
|
||||
<property name="text" >
|
||||
<string>&Cancel</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<tabstops>
|
||||
|
Loading…
Reference in New Issue
Block a user