]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiBibtex.h
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiBibtex.h
1 // -*- C++ -*-
2 /**
3  * \file GuiBibtex.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  * \author Angus Leeming
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUIBIBTEX_H
14 #define GUIBIBTEX_H
15
16 #include "GuiDialog.h"
17 #include "ButtonController.h"
18 #include "ui_BibtexUi.h"
19 #include "ui_BibtexAddUi.h"
20
21
22 namespace lyx {
23 namespace frontend {
24
25 class GuiBibtexAddDialog : public QDialog, public Ui::BibtexAddUi
26 {
27 public:
28         GuiBibtexAddDialog(QWidget * parent) : QDialog(parent)
29         {
30                 Ui::BibtexAddUi::setupUi(this);
31                 QDialog::setModal(true);
32         }
33 };
34
35
36 class GuiBibtex : public GuiCommand, public Ui::BibtexUi
37 {
38         Q_OBJECT
39
40 public:
41         explicit GuiBibtex(GuiView & lv);
42
43 private Q_SLOTS:
44         void change_adaptor();
45         void browsePressed();
46         void browseBibPressed();
47         void addPressed();
48         void addDatabase();
49         void deletePressed();
50         void upPressed();
51         void downPressed();
52         void databaseChanged();
53         void availableChanged();
54         void bibEDChanged();
55
56 private:
57         ///
58         bool isValid();
59         /// Apply changes
60         void applyView();
61         /// update
62         void updateContents();
63
64         /// Browse for a .bib file
65         QString browseBib(QString const & in_name) const;
66         /// Browse for a .bst file
67         QString browseBst(QString const & in_name) const;
68         /// get the list of bst files
69         QStringList bibStyles() const;
70         /// get the list of bib files
71         QStringList bibFiles() const;
72         /// build filelists of all availabe bib/bst/cls/sty-files. done through
73         /// kpsewhich and an external script, saved in *Files.lst
74         void rescanBibStyles() const;
75         /// do we use bibtopic (for sectioned bibliography)?
76         bool usingBibtopic() const;
77         /// should we put the bibliography to the TOC?
78         bool bibtotoc() const;
79         /// which stylefile do we use?
80         QString styleFile() const;
81
82         ///
83         GuiBibtexAddDialog * add_;
84         ///
85         ButtonController add_bc_;
86 };
87
88 } // namespace frontend
89 } // namespace lyx
90
91 #endif // GUIBIBTEX_H