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"
|
2011-04-04 07:47:21 +00:00
|
|
|
#include <QTabWidget>
|
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 {
|
|
|
|
|
2011-03-29 20:51:40 +00:00
|
|
|
class SpellcheckerWidget : public QTabWidget
|
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:
|
2011-04-08 13:26:45 +00:00
|
|
|
SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent = 0);
|
2011-03-23 23:10:12 +00:00
|
|
|
~SpellcheckerWidget();
|
|
|
|
///
|
|
|
|
void updateView();
|
|
|
|
///
|
2011-04-08 13:26:45 +00:00
|
|
|
bool initialiseParams(std::string const &);
|
2007-04-24 15:32:14 +00:00
|
|
|
|
2007-09-05 20:33:29 +00:00
|
|
|
private Q_SLOTS:
|
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:
|
2011-03-23 23:10:12 +00:00
|
|
|
///
|
|
|
|
bool eventFilter(QObject *obj, QEvent *event);
|
|
|
|
struct Private;
|
|
|
|
Private * const d;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class GuiSpellchecker : public DockView
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
GuiSpellchecker(
|
|
|
|
GuiView & parent, ///< the main window where to dock.
|
|
|
|
Qt::DockWidgetArea area = Qt::RightDockWidgetArea, ///< Position of the dock (and also drawer)
|
|
|
|
Qt::WindowFlags flags = 0);
|
|
|
|
~GuiSpellchecker();
|
2007-10-06 19:51:03 +00:00
|
|
|
|
2011-03-23 23:10:12 +00:00
|
|
|
private:
|
2009-04-19 08:57:43 +00:00
|
|
|
///{
|
|
|
|
void updateView();
|
2017-12-16 05:48:34 +00:00
|
|
|
bool initialiseParams(std::string const & sdata)
|
|
|
|
{ return widget_->initialiseParams(sdata); }
|
2009-04-04 17:25:14 +00:00
|
|
|
void clearParams() {}
|
2007-10-06 19:51:03 +00:00
|
|
|
void dispatchParams() {}
|
2011-03-23 23:10:12 +00:00
|
|
|
bool isBufferDependent() const { return false; }
|
2009-04-19 08:57:43 +00:00
|
|
|
///}
|
2011-03-23 23:10:12 +00:00
|
|
|
/// The encapsulated widget.
|
|
|
|
SpellcheckerWidget * widget_;
|
2006-03-05 17:24:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2007-08-31 22:16:11 +00:00
|
|
|
#endif // GUISPELLCHECKER_H
|