lyx_mirror/src/frontends/qt4/GuiSpellchecker.h
Stephan Witt c694f6cdf5 Fixes the following issues:
* updateView() should start a spell check only on first call after init
* at the end of document the dialog should hide itself when user said "no" to continue spell check
* when the last word of a note inset is misspelled forward() wrongly think it's the end of doc
* when the user clicks the buttons fast, recursive calls are possible


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38307 a592a061-630c-0410-9148-cb99ea01b6c8
2011-04-08 13:26:45 +00:00

87 lines
1.8 KiB
C++

// -*- C++ -*-
/**
* \file GuiSpellchecker.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author John Levon
* \author Kalle Dalheimer
* \author Edwin Leuven
* \author Abdelrazak Younes
*
* Full author contact details are available in file CREDITS.
*/
#ifndef GUISPELLCHECKER_H
#define GUISPELLCHECKER_H
#include "DockView.h"
#include <QTabWidget>
class QListWidgetItem;
namespace lyx {
class docstring_list;
namespace frontend {
class SpellcheckerWidget : public QTabWidget
{
Q_OBJECT
public:
SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent = 0);
~SpellcheckerWidget();
///
void updateView();
///
bool initialiseParams(std::string const &);
private Q_SLOTS:
void on_findNextPB_clicked();
void on_replaceAllPB_clicked();
void on_suggestionsLW_itemClicked(QListWidgetItem *);
void on_replaceCO_highlighted(const QString & str);
void on_languageCO_activated(int index);
void on_ignoreAllPB_clicked();
void on_addPB_clicked();
void on_ignorePB_clicked();
void on_replacePB_clicked();
private:
///
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();
private:
///{
void updateView();
bool initialiseParams(std::string const & data) { return widget_->initialiseParams(data); }
void clearParams() {}
void dispatchParams() {}
bool isBufferDependent() const { return false; }
///}
/// The encapsulated widget.
SpellcheckerWidget * widget_;
};
} // namespace frontend
} // namespace lyx
#endif // GUISPELLCHECKER_H