]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiThesaurus.h
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[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
59 private:
60         /// last string looked up
61         docstring laststr_;
62
63         /// entries for last string
64         Thesaurus::Meanings meanings_;
65
66         /// original string
67         docstring text_;
68
69         /// not needed.
70         void apply() {}
71 };
72
73 } // namespace frontend
74 } // namespace lyx
75
76 #endif // GUITHESAURUS_H