mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-21 05:00:59 +00:00
df4814e026
RegExp experts please have a look at the FIXMEs in GuiThesaurus.cpp. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27572 a592a061-630c-0410-9148-cb99ea01b6c8
81 lines
1.4 KiB
C++
81 lines
1.4 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file GuiThesaurus.h
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef GUITHESAURUS_H
|
|
#define GUITHESAURUS_H
|
|
|
|
#include "GuiDialog.h"
|
|
#include "Thesaurus.h"
|
|
#include "ui_ThesaurusUi.h"
|
|
|
|
class QTreeWidgetItem;
|
|
|
|
namespace lyx {
|
|
namespace frontend {
|
|
|
|
class GuiThesaurus : public GuiDialog, public Ui::ThesaurusUi
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
GuiThesaurus(GuiView & lv);
|
|
|
|
private Q_SLOTS:
|
|
void change_adaptor();
|
|
void entryChanged();
|
|
void replaceClicked();
|
|
void selectionChanged();
|
|
void selectionClicked(QTreeWidgetItem *, int);
|
|
void itemClicked(QTreeWidgetItem *, int);
|
|
|
|
private:
|
|
/// update
|
|
void updateContents();
|
|
///
|
|
void updateLists();
|
|
///
|
|
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
|
|
Thesaurus::Meanings const & getMeanings(docstring const & str,
|
|
docstring const & lang);
|
|
|
|
private:
|
|
/// last string looked up
|
|
docstring laststr_;
|
|
|
|
/// entries for last string
|
|
Thesaurus::Meanings meanings_;
|
|
|
|
/// original string
|
|
docstring text_;
|
|
|
|
/// language
|
|
docstring lang_;
|
|
|
|
/// not needed.
|
|
void apply() {}
|
|
};
|
|
|
|
} // namespace frontend
|
|
} // namespace lyx
|
|
|
|
#endif // GUITHESAURUS_H
|