X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiThesaurus.h;h=57544a6b3e96c477d33661529cd80ac40bce2241;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=57b6cadd7d3c66a0a2a5582de1ee4f2b09a08e51;hpb=a1cec91afaca91968b46e695533c10ad2a3f73d3;p=lyx.git diff --git a/src/frontends/qt4/GuiThesaurus.h b/src/frontends/qt4/GuiThesaurus.h index 57b6cadd7d..57544a6b3e 100644 --- a/src/frontends/qt4/GuiThesaurus.h +++ b/src/frontends/qt4/GuiThesaurus.h @@ -9,67 +9,72 @@ * Full author contact details are available in file CREDITS. */ -#ifndef QTHESAURUS_H -#define QTHESAURUS_H +#ifndef GUITHESAURUS_H +#define GUITHESAURUS_H -#include "GuiDialogView.h" +#include "GuiDialog.h" +#include "Thesaurus.h" #include "ui_ThesaurusUi.h" -#include -#include - - class QTreeWidgetItem; namespace lyx { namespace frontend { -class ControlThesaurus; - -class GuiThesaurus; - -class GuiThesaurusDialog : public QDialog, public Ui::ThesaurusUi { +class GuiThesaurus : public GuiDialog, public Ui::ThesaurusUi +{ Q_OBJECT -public: - GuiThesaurusDialog(GuiThesaurus * form); - void updateLists(); -protected Q_SLOTS: - virtual void change_adaptor(); - virtual void entryChanged(); - virtual void replaceClicked(); - virtual void selectionChanged(); - virtual void selectionClicked(QTreeWidgetItem *, int); - virtual void itemClicked(QTreeWidgetItem *, int); -protected: - virtual void closeEvent(QCloseEvent * e); -private: - GuiThesaurus * form_; -}; +public: + GuiThesaurus(GuiView & lv); +private Q_SLOTS: + void change_adaptor(); + void entryChanged(); + void replaceClicked(); + void selectionChanged(); + void selectionClicked(QTreeWidgetItem *, int); + void itemClicked(QTreeWidgetItem *, int); -/// -class GuiThesaurus - : public QController > -{ -public: +private: + /// update + void updateContents(); + /// + void updateLists(); /// - friend class GuiThesaurusDialog; + bool initialiseParams(std::string const & data); /// - GuiThesaurus(Dialog &); + void clearParams(); + /// + void dispatchParams() {} + /// + bool isBufferDependent() const { return true; } + + /// replace the particular string + void replace(docstring const & newstr); + + /// get meanings + Thesaurus::Meanings const & getMeanings(docstring const & str, + docstring const & lang); + private: - /// Apply changes - virtual void apply() {} - /// update - virtual void update_contents(); - /// build the dialog - virtual void build_dialog(); + /// last string looked up + docstring laststr_; + + /// entries for last string + Thesaurus::Meanings meanings_; + + /// original string + docstring text_; + + /// language + docstring lang_; - /// replace the word - void replace(); + /// not needed. + void apply() {} }; } // namespace frontend } // namespace lyx -#endif // QTHESAURUS_H +#endif // GUITHESAURUS_H