]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSpellchecker.h
Also display the info about BibTeX databases in the TeX info panel.
[lyx.git] / src / frontends / qt4 / GuiSpellchecker.h
index 3d9f3c093e8b5f30df3f626c5c569d1c7cdf6620..5851e8ceda5e31cd9e3c05df50727546f2ca4135 100644 (file)
@@ -16,6 +16,7 @@
 #define GUISPELLCHECKER_H
 
 #include "DockView.h"
+#include <QTabWidget>
 
 class QListWidgetItem;
 
@@ -25,43 +26,58 @@ class docstring_list;
 
 namespace frontend {
 
-class GuiSpellchecker : public DockView
+class SpellcheckerWidget : public QTabWidget
 {
        Q_OBJECT
 
 public:
-       GuiSpellchecker(GuiView & parent);
-       ~GuiSpellchecker();
+       SpellcheckerWidget(GuiView * gv, DockView * dv, QWidget * parent = 0);
+       ~SpellcheckerWidget();
+       ///
+       void updateView();
+       ///
+       bool initialiseParams(std::string const &);
 
 private Q_SLOTS:
-       void on_closePB_clicked();
-       void on_suggestionsLW_itemChanged(QListWidgetItem *);
+       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);
+       ///
+       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);
+       bool initialiseParams(std::string const & data) { return widget_->initialiseParams(data); }
        void clearParams() {}
        void dispatchParams() {}
-       bool isBufferDependent() const { return true; }
+       bool isBufferDependent() const { return false; }
        ///}
-
-       /// check text until next misspelled/unknown word
-       /// returns true when finished
-       void check();
-       /// show count of checked words at normal exit
-       void showSummary();
-
-       struct Private;
-       Private * const d;
+       /// The encapsulated widget.
+       SpellcheckerWidget * widget_;
 };
 
 } // namespace frontend