X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiThesaurus.h;h=5fab7f69781279d9c38225f2387a245e048d8bac;hb=161f7b7f62cb33dab681add6c5b5b68a887e2ea1;hp=2a008be6728e83310445315675442b403b912c4b;hpb=212386be8a1573fb52b5da718961835816a3c8e2;p=lyx.git diff --git a/src/frontends/qt4/GuiThesaurus.h b/src/frontends/qt4/GuiThesaurus.h index 2a008be672..5fab7f6978 100644 --- a/src/frontends/qt4/GuiThesaurus.h +++ b/src/frontends/qt4/GuiThesaurus.h @@ -12,67 +12,67 @@ #ifndef GUITHESAURUS_H #define GUITHESAURUS_H -#include "GuiDialogView.h" -#include "ControlThesaurus.h" +#include "GuiDialog.h" +#include "Thesaurus.h" #include "ui_ThesaurusUi.h" -#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); + GuiThesaurus(GuiView & lv); - 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_; -}; + void checkStatus(); +private Q_SLOTS: + void change_adaptor(); + void entryChanged(); + void replaceClicked(); + void selectionChanged(); + void selectionClicked(QTreeWidgetItem *, int); + void itemClicked(QTreeWidgetItem *, int); -/// -class GuiThesaurus : public GuiView -{ -public: +private: + /// update + void updateContents(); /// - friend class GuiThesaurusDialog; + void updateLists(); + /// + bool initialiseParams(std::string const & data); + /// + void clearParams(); /// - GuiThesaurus(GuiDialog &); - /// parent controller - ControlThesaurus & controller() - { return static_cast(this->getController()); } - /// parent controller - ControlThesaurus const & controller() const - { return static_cast(this->getController()); } + void dispatchParams() {} + /// + bool isBufferDependent() const { return true; } + + /// replace the particular string + void replace(docstring const & newstr); + + /// get meanings + Thesaurus::Meanings const & getMeanings(WordLangTuple const & wl); + 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