]> 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 c460c0bebaa3a9afb7874a8559bd9d4a7e7e8f90..5851e8ceda5e31cd9e3c05df50727546f2ca4135 100644 (file)
@@ -16,6 +16,7 @@
 #define GUISPELLCHECKER_H
 
 #include "DockView.h"
+#include <QTabWidget>
 
 class QListWidgetItem;
 
@@ -25,16 +26,19 @@ 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_findNextPB_clicked();
        void on_replaceAllPB_clicked();
        void on_suggestionsLW_itemClicked(QListWidgetItem *);
@@ -46,27 +50,34 @@ private Q_SLOTS:
        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();
-
-       bool eventFilter(QObject *obj, QEvent *event);
-
-       struct Private;
-       Private * const d;
+       /// The encapsulated widget.
+       SpellcheckerWidget * widget_;
 };
 
 } // namespace frontend