4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
16 #include "GuiDialog.h"
17 #include "GuiSelectionManager.h"
18 #include "ButtonController.h"
19 #include "FancyLineEdit.h"
20 #include "ui_BibtexUi.h"
22 #include "insets/InsetCommandParams.h"
24 #include <QStandardItemModel>
25 #include <QStringListModel>
30 class GuiBibtex : public GuiDialog, public Ui::BibtexUi
35 explicit GuiBibtex(GuiView & lv);
38 void change_adaptor();
39 void on_buttonBox_accepted();
40 void browseBstPressed();
41 void browseBibPressed();
42 void databaseChanged();
46 void filterChanged(const QString & text);
53 void updateContents();
55 /// Browse for a .bib file
56 QString browseBib(QString const & in_name) const;
57 /// Browse for a .bst file
58 QString browseBst(QString const & in_name) const;
59 /// get the list of bst files
60 QStringList bibStyles() const;
61 /// get the list of bib files
62 QStringList bibFiles(bool const extension = true) const;
63 /// build filelists of all availabe bib/bst/cls/sty-files. done through
64 /// kpsewhich and an external script, saved in *Files.lst
65 void rescanBibStyles() const;
66 /// do we use bibtopic (for sectioned bibliography)?
67 bool usingBibtopic() const;
68 /// should we put the bibliography to the TOC?
69 bool bibtotoc() const;
70 /// do we use biblatex?
71 bool usingBiblatex() const;
72 /// which stylefile do we use?
73 QString styleFile() const;
74 /// Clear selected keys
75 void clearSelection();
77 void setSelectedBibs(QStringList const);
78 /// prepares a call to GuiCitation::searchKeys when we
79 /// are ready to search the Bib entries
80 void findText(QString const & text);
84 QStringList selectedBibs();
89 bool initialiseParams(std::string const & data);
91 void clearParams() { params_.clear(); }
93 void dispatchParams();
95 bool isBufferDependent() const { return true; }
99 InsetCommandParams params_;
101 GuiSelectionManager * selectionManager;
103 QStringListModel available_model_;
105 QStandardItemModel selected_model_;
107 QStringList all_bibs_;
109 QStringList selected_bibs_;
110 /// contains the search box
111 FancyLineEdit * filter_;
114 } // namespace frontend
117 #endif // GUIBIBTEX_H