]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QRef.h
ws change
[lyx.git] / src / frontends / qt2 / QRef.h
1 /**
2  * \file QRef.h
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon
7  */
8
9 #ifndef QREF_H
10 #define QREF_H
11
12 #include <config.h>
13 #include <vector>
14 #include "LString.h"
15
16 #include "Qt2Base.h"
17
18 class ControlRef;
19 class QRefDialog;
20
21 class QRef :
22         public Qt2CB<ControlRef, Qt2DB<QRefDialog> >
23 {
24         friend class QRefDialog;
25
26 public:
27         QRef(ControlRef & c);
28
29 private:
30         /// apply changes
31         virtual void apply();
32         /// build dialog
33         virtual void build_dialog();
34         /// update dialog
35         virtual void update_contents();
36
37         /// is name allowed for this ?
38         bool nameAllowed();
39
40         /// is type allowed for this ?
41         bool typeAllowed();
42
43         /// go to current reference
44         void gotoRef();
45
46         /// set go back button
47         void setGoBack();
48
49         /// set goto ref button
50         void setGotoRef();
51
52         /// re-enter references
53         void redoRefs();
54
55         /// update references
56         void updateRefs();
57
58         /// sort or not persistent state
59         bool sort_;
60
61         /// at a reference ?
62         bool at_ref_;
63
64         /// the references
65         std::vector<string> refs_;
66 };
67
68 #endif // QREF_H