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