]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiThesaurus.h
* fix spelling in comments to please John.
[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 class QTreeWidgetItem;
20
21 namespace lyx {
22 namespace frontend {
23
24 class GuiThesaurus : public GuiDialog, public Ui::ThesaurusUi
25 {
26         Q_OBJECT
27
28 public:
29         GuiThesaurus(GuiView & lv);
30
31 private Q_SLOTS:
32         void change_adaptor();
33         void entryChanged();
34         void replaceClicked();
35         void selectionChanged();
36         void selectionClicked(QTreeWidgetItem *, int);
37         void itemClicked(QTreeWidgetItem *, int);
38
39 private:
40         /// update
41         void updateContents();
42         ///
43         void updateLists();
44         ///
45         bool initialiseParams(std::string const & data);
46         ///
47         void clearParams();
48         ///
49         void dispatchParams() {}
50         ///
51         bool isBufferDependent() const { return true; }
52
53         /// replace the particular string
54         void replace(docstring const & newstr);
55
56         /// get meanings
57         Thesaurus::Meanings const & getMeanings(docstring const & str,
58                 docstring const & lang);
59
60 private:
61         /// last string looked up
62         docstring laststr_;
63
64         /// entries for last string
65         Thesaurus::Meanings meanings_;
66
67         /// original string
68         docstring text_;
69
70         /// language
71         docstring lang_;
72
73         /// not needed.
74         void apply() {}
75 };
76
77 } // namespace frontend
78 } // namespace lyx
79
80 #endif // GUITHESAURUS_H