]> git.lyx.org Git - lyx.git/blob - src/frontends/qt3/QRef.h
Extracted from r14281
[lyx.git] / src / frontends / qt3 / 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 protected:
34         virtual bool isValid();
35 private:
36         /// apply changes
37         virtual void apply();
38         /// build dialog
39         virtual void build_dialog();
40         /// update dialog
41         virtual void update_contents();
42
43         /// is name allowed for this ?
44         bool nameAllowed();
45
46         /// is type allowed for this ?
47         bool typeAllowed();
48
49         /// go to current reference
50         void gotoRef();
51
52         /// set go back button
53         void setGoBack();
54
55         /// set goto ref button
56         void setGotoRef();
57
58         /// re-enter references
59         void redoRefs();
60
61         /// update references
62         void updateRefs();
63
64         /// sort or not persistent state
65         bool sort_;
66
67         /// at a reference ?
68         bool at_ref_;
69
70         /// store the buffer settings
71         int restored_buffer_;
72
73         /// the references
74         std::vector<std::string> refs_;
75 };
76
77 } // namespace frontend
78 } // namespace lyx
79
80 #endif // QREF_H