lyx_mirror/src/frontends/qt4/GuiSpellchecker.h
Vincent van Ravesteijn f65f5be6d7 Fix bug #6451 (last part): Crash when interacting with buffer-dependent dialog with no buffer open.
- First, the comment for isBufferDependent is corrected. It seems that the actual use of this function differs from the comment. As the comment said, I decided to close all dialogs that were buffer dependent, but this didn't seem to be correct for the view source pan, the outliner, and find-and-replace.

- Second, the dialogs that are buffer dependent are now closed, but dockviews are not, except for the spellchecker pane, which really depends on an open buffer, but I can't test that. 

So, please test whether the spellchecker dockviewed window behaves as one expects.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34291 a592a061-630c-0410-9148-cb99ea01b6c8
2010-04-26 02:12:10 +00:00

77 lines
1.6 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"
class QListWidgetItem;
namespace lyx {
class docstring_list;
namespace frontend {
class GuiSpellchecker : public DockView
{
Q_OBJECT
public:
GuiSpellchecker(GuiView & parent);
~GuiSpellchecker();
private Q_SLOTS:
void on_closePB_clicked();
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:
/// update from controller
void updateSuggestions(docstring_list & words);
///{
void updateView();
bool initialiseParams(std::string const & data);
void clearParams() {}
void dispatchParams() {}
bool isBufferDependent() const { return true; }
bool needBufferOpen() const { return true; }
///}
/// check text until next misspelled/unknown word
/// returns true when finished
void check();
/// show count of checked words at normal exit
void showSummary();
bool eventFilter(QObject *obj, QEvent *event);
struct Private;
Private * const d;
};
} // namespace frontend
} // namespace lyx
#endif // GUISPELLCHECKER_H