]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/FindAndReplace.h
Make code a bit easier to read
[lyx.git] / src / frontends / qt / FindAndReplace.h
index da854da7b73a79de46be1f6758fefd724efeb23d..07c03eab0f78158602d6b4924d9abcd2f1c3014e 100644 (file)
 // This is needed so that ui_FindAndReplaceUi.h can find qt_()
 #include "qt_helpers.h"
 #include "ui_FindAndReplaceUi.h"
-
-#include "lyxfind.h"
+#include "support/docstring.h"
 
 #include <string>
 
 namespace lyx {
+
+class FindAndReplaceOptions;
+
 namespace frontend {
 
 class FindAndReplaceWidget : public QTabWidget, public Ui::FindAndReplaceUi
@@ -31,7 +33,11 @@ class FindAndReplaceWidget : public QTabWidget, public Ui::FindAndReplaceUi
 public:
        FindAndReplaceWidget(GuiView & view);
        bool initialiseParams(std::string const & params);
-       void updateGUI();
+       void updateWorkAreas();
+       void updateButtons();
+
+       // return true if \c wa is one if the adv. F&R workareas
+       bool hasWorkArea(GuiWorkArea * wa) const;
 
 public Q_SLOTS:
        ///
@@ -57,17 +63,24 @@ private:
                bool expandmacros, bool ignoreformat, bool replace,
                bool keep_case, bool replace_all = false);
 
-       bool eventFilter(QObject *obj, QEvent *event);
+       bool eventFilter(QObject *obj, QEvent *event) override;
 
-       void virtual showEvent(QShowEvent *ev);
-       void virtual hideEvent(QHideEvent *ev);
+       void virtual showEvent(QShowEvent *ev) override;
+       void virtual hideEvent(QHideEvent *ev) override;
 
        void hideDialog();
 
+       void setFormatIgnores(bool const b);
+
+       docstring const checkState(std::string const s, bool const b);
+
 protected Q_SLOTS:
        void on_findNextPB_clicked();
        void on_replacePB_clicked();
        void on_replaceallPB_clicked();
+       void on_searchbackCB_clicked();
+       void on_selectAllPB_clicked();
+       void on_deselectAllPB_clicked();
 };
 
 
@@ -78,23 +91,24 @@ public:
        FindAndReplace(
                GuiView & parent, ///< the main window where to dock.
                Qt::DockWidgetArea area = Qt::RightDockWidgetArea, ///< Position of the dock (and also drawer)
-               Qt::WindowFlags flags = 0);
+               Qt::WindowFlags flags = {});
 
        ~FindAndReplace();
 
-       bool initialiseParams(std::string const &);
-       void clearParams() {}
-       void dispatchParams() {}
-       bool isBufferDependent() const { return false; }
-       bool canApplyToReadOnly() const { return true; }
+       bool initialiseParams(std::string const &) override;
+       void clearParams() override {}
+       void dispatchParams() override {}
+       bool isBufferDependent() const override { return false; }
+       bool canApplyToReadOnly() const override { return true; }
+       bool hasWorkArea(GuiWorkArea * wa) const { return widget_->hasWorkArea(wa); }
        void selectAll();
 
        /// update
-       void updateView();
+       void updateView() override;
        //virtual void update_contents() {}
 
 protected:
-       virtual bool wantInitialFocus() const { return true; }
+       bool wantInitialFocus() const override { return true; }
 
 private:
        /// The encapsulated widget.