]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiBibtex.h
cosmetics
[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  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUIBIBTEX_H
13 #define GUIBIBTEX_H
14
15 #include "GuiDialog.h"
16 #include "ControlBibtex.h"
17 #include "ButtonController.h"
18 #include "ui_BibtexUi.h"
19 #include "ui_BibtexAddUi.h"
20
21 namespace lyx {
22 namespace frontend {
23
24 class GuiBibtexAddDialog : public QDialog, public Ui::BibtexAddUi
25 {
26 public:
27         GuiBibtexAddDialog(QWidget * parent) : QDialog(parent)
28         {
29                 Ui::BibtexAddUi::setupUi(this);
30                 QDialog::setModal(true);
31         }
32 };
33
34
35 class GuiBibtexDialog : public GuiDialog, public Ui::BibtexUi
36 {
37         Q_OBJECT
38
39 public:
40         GuiBibtexDialog(LyXView & lv);
41
42 private Q_SLOTS:
43         void change_adaptor();
44         void browsePressed();
45         void browseBibPressed();
46         void addPressed();
47         void addDatabase();
48         void deletePressed();
49         void databaseChanged();
50         void availableChanged();
51         void bibEDChanged();
52
53 private:
54         void closeEvent(QCloseEvent * e);
55
56 private:
57         /// parent controller
58         ControlBibtex & controller();
59         ///
60         virtual bool isValid();
61         /// Apply changes
62         virtual void applyView();
63         /// update
64         virtual void updateContents();
65
66         ///
67         GuiBibtexAddDialog * add_;
68         ///
69         ButtonController add_bc_;
70 };
71
72 } // namespace frontend
73 } // namespace lyx
74
75 #endif // GUIBIBTEX_H