]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiThesaurus.h
move Controller inheritance further up the tree
[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(LyXView & 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         void closeEvent(QCloseEvent * e);
41         /// update
42         void updateContents();
43         ///
44         void updateLists();
45         ///
46         bool initialiseParams(std::string const & data);
47         ///
48         void clearParams();
49         ///
50         void dispatchParams() {}
51         ///
52         bool isBufferDependent() const { return true; }
53
54         /// replace the particular string
55         void replace(docstring const & newstr);
56
57         /// get meanings
58         Thesaurus::Meanings const & getMeanings(docstring const & str);
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         /// not needed.
71         void apply() {}
72 };
73
74 } // namespace frontend
75 } // namespace lyx
76
77 #endif // GUITHESAURUS_H