]> git.lyx.org Git - features.git/blob - src/frontends/qt2/QRef.h
Replace LString.h with support/std_string.h,
[features.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
16 #include "QDialogView.h"
17 #include <vector>
18 #include "support/std_string.h"
19
20 class ControlRef;
21 class QRefDialog;
22
23
24 class QRef
25         : public QController<ControlRef, QView<QRefDialog> >
26 {
27 public:
28         friend class QRefDialog;
29
30         QRef(Dialog &);
31 private:
32         /// apply changes
33         virtual void apply();
34         /// build dialog
35         virtual void build_dialog();
36         /// update dialog
37         virtual void update_contents();
38
39         /// is name allowed for this ?
40         bool nameAllowed();
41
42         /// is type allowed for this ?
43         bool typeAllowed();
44
45         /// go to current reference
46         void gotoRef();
47
48         /// set go back button
49         void setGoBack();
50
51         /// set goto ref button
52         void setGotoRef();
53
54         /// re-enter references
55         void redoRefs();
56
57         /// update references
58         void updateRefs();
59
60         /// sort or not persistent state
61         bool sort_;
62
63         /// at a reference ?
64         bool at_ref_;
65
66         /// the references
67         std::vector<string> refs_;
68 };
69
70 #endif // QREF_H