]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QRef.h
rename LFUN enum values according to their command (as used in th minibuffer/bind...
[lyx.git] / src / frontends / qt4 / QRef.h
1 // -*- C++ -*-
2 /**
3  * \file QRef.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 QREF_H
13 #define QREF_H
14
15 #include "QDialogView.h"
16
17 #include <vector>
18
19 namespace lyx {
20 namespace frontend {
21
22 class ControlRef;
23 class QRefDialog;
24
25
26 class QRef
27         : public QController<ControlRef, QView<QRefDialog> >
28 {
29 public:
30         friend class QRefDialog;
31
32         QRef(Dialog &);
33
34 protected:
35         virtual bool isValid();
36
37 private:
38         /// apply changes
39         virtual void apply();
40         /// build dialog
41         virtual void build_dialog();
42         /// update dialog
43         virtual void update_contents();
44
45         /// is name allowed for this ?
46         bool nameAllowed();
47
48         /// is type allowed for this ?
49         bool typeAllowed();
50
51         /// go to current reference
52         void gotoRef();
53
54         /// set go back button
55         void setGoBack();
56
57         /// set goto ref button
58         void setGotoRef();
59
60         /// re-enter references
61         void redoRefs();
62
63         /// update references
64         void updateRefs();
65
66         /// sort or not persistent state
67         bool sort_;
68
69         /// at a reference ?
70         bool at_ref_;
71
72         /// store the buffer settings
73         int restored_buffer_;
74
75         /// the references
76         std::vector<std::string> refs_;
77 };
78
79 } // namespace frontend
80 } // namespace lyx
81
82 #endif // QREF_H