]> git.lyx.org Git - lyx.git/blob - src/frontends/qt3/QCitation.h
b185b763286356ff4c012aed6b4766ab1188fa3d
[lyx.git] / src / frontends / qt3 / QCitation.h
1 // -*- C++ -*-
2 /**
3  * \file QCitation.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  * \author Kalle Dalheimer
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef QCITATION_H
14 #define QCITATION_H
15
16 #include "QDialogView.h"
17 #include <vector>
18
19 class QListBox;
20
21 namespace lyx {
22 namespace frontend {
23
24 class ControlCitation;
25 class QCitationDialog;
26
27
28 class QCitation : public QController<ControlCitation, QView<QCitationDialog> >
29 {
30 public:
31         friend class QCitationDialog;
32         ///
33         QCitation(Dialog &);
34 protected:
35         virtual bool isValid();
36 private:
37
38         /// Set the Params variable for the Controller.
39         virtual void apply();
40         /// Build the dialog.
41         virtual void build_dialog();
42         /// Hide the dialog.
43         virtual void hide();
44         /// Update dialog before/whilst showing it.
45         virtual void update_contents();
46
47         /// fill the styles combo
48         void fillStyles();
49
50         /// set the styles combo
51         void updateStyle();
52
53         void updateBrowser(QListBox *, std::vector<std::string> const &) const;
54         /// check if apply has been pressed
55         bool open_find_;
56
57         /// selected keys
58         std::vector<std::string> citekeys;
59         /// available bib keys
60         std::vector<std::string> bibkeys;
61         /// selected natbib style
62         int style_;
63 };
64
65 } // namespace frontend
66 } // namespace lyx
67
68 #endif // QCITATION_H