]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiThesaurus.h
Fix handling of the add branch textfield in GuiBranches
[lyx.git] / src / frontends / qt4 / GuiThesaurus.h
1 // -*- C++ -*-
2 /**
3  * \file GuiThesaurus.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 GUITHESAURUS_H
13 #define GUITHESAURUS_H
14
15 #include "GuiDialog.h"
16 #include "Thesaurus.h"
17 #include "ui_ThesaurusUi.h"
18
19 #include "WordLangTuple.h"
20
21 class QTreeWidgetItem;
22
23 namespace lyx {
24 namespace frontend {
25
26 class GuiThesaurus : public GuiDialog, public Ui::ThesaurusUi
27 {
28         Q_OBJECT
29
30 public:
31         GuiThesaurus(GuiView & lv);
32
33         void checkStatus();
34
35 private Q_SLOTS:
36         void change_adaptor();
37         void entryChanged();
38         void replaceClicked();
39         void selectionChanged();
40         void selectionClicked(QTreeWidgetItem *, int);
41         void itemClicked(QTreeWidgetItem *, int);
42
43 private:
44         /// update
45         void updateContents();
46         ///
47         void updateLists();
48         ///
49         bool initialiseParams(std::string const & data);
50         ///
51         void clearParams();
52         ///
53         void dispatchParams() {}
54         ///
55         bool isBufferDependent() const { return true; }
56
57         /// replace the particular string
58         void replace(docstring const & newstr);
59
60         /// get meanings
61         Thesaurus::Meanings const & getMeanings(WordLangTuple const & wl);
62
63 private:
64         /// last string looked up
65         docstring laststr_;
66
67         /// entries for last string
68         Thesaurus::Meanings meanings_;
69
70         /// original string
71         docstring text_;
72
73         /// language
74         docstring lang_;
75
76         /// not needed.
77         void apply() {}
78 };
79
80 } // namespace frontend
81 } // namespace lyx
82
83 #endif // GUITHESAURUS_H