]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/FormCitation.h
started moving citation dialog to MVC
[lyx.git] / src / frontends / qt2 / FormCitation.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2000 The LyX Team.
8  *
9  * ======================================================
10  *
11  * \author Angus Leeming <a.leeming@ic.ac.uk>
12  * \author Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se>
13 */
14
15 #ifndef FORMCITATION_H
16 #define FORMCITATION_H
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22 class QListBox;
23
24 #include "Qt2Base.h"
25 #undef emit
26
27 /** This class provides a Qt2 implementation of the Citation Dialog.
28     @author Kalle Dalheimer
29 */
30 class ControlCitation;
31 class FormCitationDialogImpl;
32
33 class FormCitation : public Qt2CB<ControlCitation, Qt2DB<FormCitationDialogImpl> > {
34 public:
35     ///
36     FormCitation(ControlCitation &);
37
38 private:
39     ///
40     enum State {
41         ///
42         ON,
43         ///
44         OFF
45     };
46
47     /// Set the Params variable for the Controller.
48     virtual void apply();
49     /// Build the dialog.
50     virtual void build();
51     /// Hide the dialog.
52     virtual void hide();
53     /// Update dialog before/whilst showing it.
54     virtual void update();
55     //  /// Filter the inputs on callback from xforms
56     //  virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
57
58     void updateBrowser(QListBox*, std::vector<string> const &) const;
59     ///
60     void setBibButtons(State) const;
61     ///
62     void setCiteButtons(State) const;
63
64     ///
65     std::vector<string> citekeys;
66     ///
67     std::vector<string> bibkeys;
68 };
69
70 #endif // FORMCITATION_H