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);
38 class GuiBibtex : public GuiDialog, public Ui::BibtexUi
43 explicit GuiBibtex(GuiView & lv);
46 void change_adaptor();
48 void browseBibPressed();
54 void databaseChanged();
55 void availableChanged();
64 void updateContents();
66 /// Browse for a .bib file
67 QString browseBib(QString const & in_name) const;
68 /// Browse for a .bst file
69 QString browseBst(QString const & in_name) const;
70 /// get the list of bst files
71 QStringList bibStyles() const;
72 /// get the list of bib files
73 QStringList bibFiles() const;
74 /// build filelists of all availabe bib/bst/cls/sty-files. done through
75 /// kpsewhich and an external script, saved in *Files.lst
76 void rescanBibStyles() const;
77 /// do we use bibtopic (for sectioned bibliography)?
78 bool usingBibtopic() const;
79 /// should we put the bibliography to the TOC?
80 bool bibtotoc() const;
81 /// which stylefile do we use?
82 QString styleFile() const;
85 bool initialiseParams(std::string const & data);
87 void clearParams() { params_.clear(); }
89 void dispatchParams();
91 bool isBufferDependent() const { return true; }
95 InsetCommandParams params_;
97 GuiBibtexAddDialog * add_;
99 ButtonController add_bc_;
102 } // namespace frontend
105 #endif // GUIBIBTEX_H