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 addBBClicked(QAbstractButton * button);
48 void change_adaptor();
50 void browseBibPressed();
56 void databaseChanged();
57 void availableChanged();
67 void updateContents();
69 /// Browse for a .bib file
70 QString browseBib(QString const & in_name) const;
71 /// Browse for a .bst file
72 QString browseBst(QString const & in_name) const;
73 /// get the list of bst files
74 QStringList bibStyles() const;
75 /// get the list of bib files
76 QStringList bibFiles() const;
77 /// build filelists of all availabe bib/bst/cls/sty-files. done through
78 /// kpsewhich and an external script, saved in *Files.lst
79 void rescanBibStyles() const;
80 /// do we use bibtopic (for sectioned bibliography)?
81 bool usingBibtopic() const;
82 /// should we put the bibliography to the TOC?
83 bool bibtotoc() const;
84 /// do we use biblatex?
85 bool usingBiblatex() const;
86 /// which stylefile do we use?
87 QString styleFile() const;
90 bool initialiseParams(std::string const & data);
92 void clearParams() { params_.clear(); }
94 void dispatchParams();
96 bool isBufferDependent() const { return true; }
100 InsetCommandParams params_;
102 GuiBibtexAddDialog * add_;
104 ButtonController add_bc_;
107 } // namespace frontend
110 #endif // GUIBIBTEX_H