]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QRef.h
Lots and lots of little trivial bits.
[lyx.git] / src / frontends / qt2 / 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 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "Qt2Base.h"
20 #include <vector>
21 #include "LString.h"
22
23 class ControlRef;
24 class QRefDialog;
25
26
27 class QRef :
28         public Qt2CB<ControlRef, Qt2DB<QRefDialog> >
29 {
30         friend class QRefDialog;
31
32 public:
33         QRef();
34
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         /// the references
71         std::vector<string> refs_;
72 };
73
74 #endif // QREF_H