2006-03-05 17:24:44 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
2007-08-31 05:53:55 +00:00
|
|
|
* \file GuiSpellchecker.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
|
|
|
|
* \author Kalle Dalheimer
|
2007-10-06 19:51:03 +00:00
|
|
|
* \author Edwin Leuven
|
2009-04-19 08:57:43 +00:00
|
|
|
* \author Abdelrazak Younes
|
2006-03-05 17:24:44 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#ifndef GUISPELLCHECKER_H
|
|
|
|
#define GUISPELLCHECKER_H
|
2006-03-05 17:24:44 +00:00
|
|
|
|
2009-04-19 08:57:43 +00:00
|
|
|
#include "DockView.h"
|
2007-04-24 15:32:14 +00:00
|
|
|
|
|
|
|
class QListWidgetItem;
|
2006-03-05 17:24:44 +00:00
|
|
|
|
|
|
|
namespace lyx {
|
2007-10-06 19:51:03 +00:00
|
|
|
|
2009-04-04 16:40:47 +00:00
|
|
|
class docstring_list;
|
2007-10-06 19:51:03 +00:00
|
|
|
|
2006-03-05 17:24:44 +00:00
|
|
|
namespace frontend {
|
|
|
|
|
2009-04-19 08:57:43 +00:00
|
|
|
class GuiSpellchecker : public DockView
|
2007-09-05 20:33:29 +00:00
|
|
|
{
|
2007-04-24 15:32:14 +00:00
|
|
|
Q_OBJECT
|
2007-09-05 20:33:29 +00:00
|
|
|
|
2007-04-24 15:32:14 +00:00
|
|
|
public:
|
2009-04-19 08:57:43 +00:00
|
|
|
GuiSpellchecker(GuiView & parent);
|
|
|
|
~GuiSpellchecker();
|
2007-04-24 15:32:14 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
private Q_SLOTS:
|
2009-04-19 08:57:43 +00:00
|
|
|
void on_closePB_clicked();
|
2009-07-04 17:15:27 +00:00
|
|
|
void on_findNextPB_clicked();
|
|
|
|
void on_replaceAllPB_clicked();
|
2009-07-18 13:46:05 +00:00
|
|
|
void on_suggestionsLW_itemClicked(QListWidgetItem *);
|
2009-04-21 21:06:21 +00:00
|
|
|
void on_replaceCO_highlighted(const QString & str);
|
2010-02-09 13:01:37 +00:00
|
|
|
void on_languageCO_activated(int index);
|
2009-04-21 21:06:21 +00:00
|
|
|
void on_ignoreAllPB_clicked();
|
2009-04-19 08:57:43 +00:00
|
|
|
void on_addPB_clicked();
|
|
|
|
void on_ignorePB_clicked();
|
|
|
|
void on_replacePB_clicked();
|
2007-04-24 15:32:14 +00:00
|
|
|
|
|
|
|
private:
|
2006-03-05 17:24:44 +00:00
|
|
|
/// update from controller
|
2009-04-04 16:40:47 +00:00
|
|
|
void updateSuggestions(docstring_list & words);
|
2007-10-06 19:51:03 +00:00
|
|
|
|
2009-04-19 08:57:43 +00:00
|
|
|
///{
|
|
|
|
void updateView();
|
2007-10-06 19:51:03 +00:00
|
|
|
bool initialiseParams(std::string const & data);
|
2009-04-04 17:25:14 +00:00
|
|
|
void clearParams() {}
|
2007-10-06 19:51:03 +00:00
|
|
|
void dispatchParams() {}
|
|
|
|
bool isBufferDependent() const { return true; }
|
2009-04-19 08:57:43 +00:00
|
|
|
///}
|
2007-10-06 19:51:03 +00:00
|
|
|
|
|
|
|
/// check text until next misspelled/unknown word
|
|
|
|
/// returns true when finished
|
|
|
|
void check();
|
|
|
|
/// show count of checked words at normal exit
|
|
|
|
void showSummary();
|
|
|
|
|
2010-01-17 12:27:44 +00:00
|
|
|
bool eventFilter(QObject *obj, QEvent *event);
|
|
|
|
|
2009-04-19 08:57:43 +00:00
|
|
|
struct Private;
|
|
|
|
Private * const d;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUISPELLCHECKER_H
|