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 "ButtonController.h"
18 #include "ui_BibtexUi.h"
19 #include "ui_BibtexAddUi.h"
21 #include "insets/InsetCommandParams.h"
27 class GuiBibtexAddDialog : public QDialog, public Ui::BibtexAddUi
30 GuiBibtexAddDialog(QWidget * parent) : QDialog(parent)
32 Ui::BibtexAddUi::setupUi(this);
33 QDialog::setModal(true);
34 setWindowModality(Qt::WindowModal);
39 class GuiBibtex : public GuiDialog, public Ui::BibtexUi
44 explicit GuiBibtex(GuiView & lv);
47 void change_adaptor();
49 void browseBibPressed();
55 void databaseChanged();
56 void availableChanged();
66 void updateContents();
68 /// Browse for a .bib file
69 QString browseBib(QString const & in_name) const;
70 /// Browse for a .bst file
71 QString browseBst(QString const & in_name) const;
72 /// get the list of bst files
73 QStringList bibStyles() const;
74 /// get the list of bib files
75 QStringList bibFiles() const;
76 /// build filelists of all availabe bib/bst/cls/sty-files. done through
77 /// kpsewhich and an external script, saved in *Files.lst
78 void rescanBibStyles() const;
79 /// do we use bibtopic (for sectioned bibliography)?
80 bool usingBibtopic() const;
81 /// should we put the bibliography to the TOC?
82 bool bibtotoc() const;
83 /// do we use biblatex?
84 bool usingBiblatex() const;
85 /// which stylefile do we use?
86 QString styleFile() const;
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 GuiBibtexAddDialog * add_;
103 ButtonController add_bc_;
106 } // namespace frontend
109 #endif // GUIBIBTEX_H