]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/FindAndReplace.h
Fix the tab ordering of GuiDocument components.
[lyx.git] / src / frontends / qt4 / FindAndReplace.h
index 22abb650ca093f40ccfc965201fea364995d33ae..392515ce221455993b2d7cbce6254801f3dda1a6 100644 (file)
@@ -20,8 +20,8 @@
 #include "BufferView.h"
 #include "Buffer.h"
 #include "LyX.h"
-#include "LyXFunc.h"
 #include "Text.h"
+#include "lyxfind.h"
 
 #include <QDialog>
 
@@ -30,7 +30,7 @@
 namespace lyx {
 namespace frontend {
 
-class FindAndReplaceWidget : public QWidget, public Ui::FindAndReplaceUi
+class FindAndReplaceWidget : public QTabWidget, public Ui::FindAndReplaceUi
 {
        Q_OBJECT
 
@@ -42,30 +42,31 @@ private:
        ///
        GuiView & view_;
 
-       // add a string to the combo if needed
+       /// add a string to the combo if needed
        void remember(std::string const & find, QComboBox & combo);
-       void findAndReplace(
-               bool casesensitive, bool matchword, bool backwards,
+
+       /// Perform the scope-related buffer switch while searching
+       bool findAndReplaceScope(FindAndReplaceOptions & opt, bool replace_all = false);
+
+       /// Collect options from the GUI elements, then perform the search
+       bool findAndReplace(bool backwards, bool replace, bool replace_all = false);
+
+       /// FIXME Probably to be merged with findAndReplace(bool, bool, bool)
+       bool findAndReplace(bool casesensitive, bool matchword, bool backwards,
                bool expandmacros, bool ignoreformat, bool replace,
-               bool keep_case
-       );
-//     void find(docstring const & str, int len, bool casesens,
-//               bool words, bool backwards, bool expandmacros);
-       void findAndReplace(bool backwards, bool replace);
+               bool keep_case, bool replace_all = false);
 
        bool eventFilter(QObject *obj, QEvent *event);
 
        void virtual showEvent(QShowEvent *ev);
        void virtual hideEvent(QHideEvent *ev);
 
+       void hideDialog();
+
 protected Q_SLOTS:
        void on_findNextPB_clicked();
-       void on_findPrevPB_clicked();
-       void on_replaceNextPB_clicked();
-       void on_replacePrevPB_clicked();
+       void on_replacePB_clicked();
        void on_replaceallPB_clicked();
-       void on_closePB_clicked();
-       void on_regexpInsertCombo_currentIndexChanged(int index);
 };