2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiThesaurus.h
|
2006-03-05 17:24:44 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author John Levon
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUITHESAURUS_H
|
|
|
|
#define GUITHESAURUS_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
#include "GuiDialog.h"
|
2007-10-06 19:59:13 +00:00
|
|
|
#include "Thesaurus.h"
|
2007-08-11 15:48:15 +00:00
|
|
|
#include "ui_ThesaurusUi.h"
|
2007-04-24 14:35:15 +00:00
|
|
|
|
|
|
|
class QTreeWidgetItem;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2007-10-09 19:34:27 +00:00
|
|
|
class GuiThesaurus : public GuiDialog, public Ui::ThesaurusUi
|
2007-08-31 22:16:11 +00:00
|
|
|
{
|
2007-04-24 14:35:15 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
public:
|
2007-11-23 09:44:02 +00:00
|
|
|
GuiThesaurus(GuiView & lv);
|
2007-04-24 14:35:15 +00:00
|
|
|
|
2011-01-15 12:09:23 +00:00
|
|
|
void checkStatus();
|
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
private Q_SLOTS:
|
|
|
|
void change_adaptor();
|
|
|
|
void entryChanged();
|
|
|
|
void replaceClicked();
|
|
|
|
void selectionChanged();
|
|
|
|
void selectionClicked(QTreeWidgetItem *, int);
|
|
|
|
void itemClicked(QTreeWidgetItem *, int);
|
2007-04-24 14:35:15 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
private:
|
|
|
|
/// update
|
2007-09-11 18:33:42 +00:00
|
|
|
void updateContents();
|
2007-09-05 20:33:29 +00:00
|
|
|
///
|
|
|
|
void updateLists();
|
2007-10-06 19:59:13 +00:00
|
|
|
///
|
|
|
|
bool initialiseParams(std::string const & data);
|
|
|
|
///
|
|
|
|
void clearParams();
|
|
|
|
///
|
|
|
|
void dispatchParams() {}
|
|
|
|
///
|
|
|
|
bool isBufferDependent() const { return true; }
|
|
|
|
|
|
|
|
/// replace the particular string
|
|
|
|
void replace(docstring const & newstr);
|
|
|
|
|
|
|
|
/// get meanings
|
2012-03-02 10:20:09 +00:00
|
|
|
Thesaurus::Meanings const & getMeanings(WordLangTuple const & wl);
|
2007-10-06 19:59:13 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
/// last string looked up
|
|
|
|
docstring laststr_;
|
|
|
|
|
|
|
|
/// entries for last string
|
|
|
|
Thesaurus::Meanings meanings_;
|
|
|
|
|
|
|
|
/// original string
|
|
|
|
docstring text_;
|
|
|
|
|
2008-11-16 18:48:25 +00:00
|
|
|
/// language
|
|
|
|
docstring lang_;
|
|
|
|
|
2007-10-06 19:59:13 +00:00
|
|
|
/// not needed.
|
|
|
|
void apply() {}
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUITHESAURUS_H
|