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 "ControlCommand.h"
23 #include "support/docstring.h"
29 namespace support { class FileFilterList; }
33 class GuiBibtexAddDialog : public QDialog, public Ui::BibtexAddUi
36 GuiBibtexAddDialog(QWidget * parent) : QDialog(parent)
38 Ui::BibtexAddUi::setupUi(this);
39 QDialog::setModal(true);
44 class GuiBibtex : public GuiDialog, public Ui::BibtexUi, public ControlCommand
49 GuiBibtex(LyXView & lv);
52 void change_adaptor();
54 void browseBibPressed();
58 void databaseChanged();
59 void availableChanged();
63 void closeEvent(QCloseEvent * e);
67 Controller & controller() { return *this; }
69 virtual bool isValid();
71 virtual void applyView();
73 virtual void updateContents();
75 /// Browse for a .bib file
76 docstring const browseBib(docstring const & in_name) const;
78 /// Browse for a .bst file
79 docstring const browseBst(docstring const & in_name) const;
81 /// get the list of bst files
82 void getBibStyles(std::vector<std::string> & data) const;
83 /// get the list of bib files
84 void getBibFiles(std::vector<std::string> & data) const;
85 /// build filelists of all availabe bib/bst/cls/sty-files. done through
86 /// kpsewhich and an external script, saved in *Files.lst
87 void rescanBibStyles() const;
88 /// do we use bibtopic (for sectioned bibliography)?
89 bool usingBibtopic() const;
90 /// should we put the bibliography to the TOC?
91 bool bibtotoc() const;
92 /// which stylefile do we use?
93 std::string const getStylefile() const;
96 GuiBibtexAddDialog * add_;
98 ButtonController add_bc_;
101 } // namespace frontend
104 #endif // GUIBIBTEX_H