GuiPrintNomencl.{cpp,h}:
[lyx.git] / src / frontends / qt4 / GuiRef.h
blobcf2a3d491c68284b1e8d359ef2c4d7e589a0dd31
1 // -*- C++ -*-
2 /**
3 * \file GuiRef.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author John Levon
9 * Full author contact details are available in file CREDITS.
12 #ifndef GUIREF_H
13 #define GUIREF_H
15 #include "GuiDialog.h"
16 #include "ui_RefUi.h"
18 #include "insets/InsetCommandParams.h"
20 #include <vector>
22 class QListWidgetItem;
24 namespace lyx {
25 namespace frontend {
27 class GuiRef : public GuiDialog, public Ui::RefUi
29 Q_OBJECT
31 public:
32 GuiRef(GuiView & lv);
34 private Q_SLOTS:
35 void changed_adaptor();
36 void gotoClicked();
37 void refHighlighted(QListWidgetItem *);
38 void selectionChanged();
39 void refSelected(QListWidgetItem *);
40 void sortToggled();
41 void caseSensitiveToggled();
42 void updateClicked();
43 void reset_dialog();
44 void dialog_rejected();
46 private:
47 ///
48 bool isBufferDependent() const { return true; }
49 /** disconnect from the inset when the Apply button is pressed.
50 Allows easy insertion of multiple references. */
51 bool disconnectOnApply() const { return true; }
52 ///
53 void gotoRef(std::string const &);
54 ///
55 void gotoBookmark();
56 ///
57 void closeEvent(QCloseEvent * e);
58 ///
59 bool isValid();
60 /// apply changes
61 void applyView();
62 /// update dialog
63 void updateContents();
65 /// is name allowed for this ?
66 bool nameAllowed();
67 /// is type allowed for this ?
68 bool typeAllowed();
69 /// go to current reference
70 void gotoRef();
71 /// set go back button
72 void setGoBack();
73 /// set goto ref button
74 void setGotoRef();
75 /// re-enter references
76 void redoRefs();
77 /// update references
78 void updateRefs();
79 ///
80 bool initialiseParams(std::string const & data);
81 /// clean-up on hide.
82 void clearParams() { params_.clear(); }
83 /// clean-up on hide.
84 void dispatchParams();
86 private:
87 ///
88 InsetCommandParams params_;
90 /// went to a reference ?
91 bool at_ref_;
92 /// the last reference entered or examined
93 QString last_reference_;
94 /// store the buffer settings
95 int restored_buffer_;
96 /// store the last active buffer
97 int active_buffer_;
98 /// the references
99 std::vector<docstring> refs_;
102 } // namespace frontend
103 } // namespace lyx
105 #endif // GUIREF_H