3 * \file FindAndReplace.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Tommaso Cucinotta
9 * Full author contact details are available in file CREDITS.
15 #include "GuiWorkArea.h"
18 #include "ui_FindAndReplaceUi.h"
20 #include "BufferView.h"
33 class FindAndReplaceWidget : public QWidget, public Ui::FindAndReplaceUi
38 FindAndReplaceWidget(GuiView & view);
39 bool initialiseParams(std::string const & params);
45 // add a string to the combo if needed
46 void remember(std::string const & find, QComboBox & combo);
48 bool casesensitive, bool matchword, bool backwards,
49 bool expandmacros, bool ignoreformat, bool replace
51 void find(docstring const & str, int len, bool casesens,
52 bool words, bool backwards, bool expandmacros);
53 void findAndReplace(bool backwards, bool replace);
55 bool eventFilter(QObject *obj, QEvent *event);
57 void virtual showEvent(QShowEvent *ev);
58 void virtual hideEvent(QHideEvent *ev);
61 void on_findNextPB_clicked();
62 void on_findPrevPB_clicked();
63 void on_replaceNextPB_clicked();
64 void on_replacePrevPB_clicked();
65 void on_replaceallPB_clicked();
66 void on_closePB_clicked();
67 void on_regexpInsertCombo_currentIndexChanged(int index);
71 class FindAndReplace : public DockView
76 GuiView & parent, ///< the main window where to dock.
77 Qt::DockWidgetArea area = Qt::RightDockWidgetArea, ///< Position of the dock (and also drawer)
78 Qt::WindowFlags flags = 0);
82 bool initialiseParams(std::string const &);
84 void dispatchParams() {}
85 bool isBufferDependent() const { return true; }
90 //virtual void update_contents() {}
93 virtual bool wantInitialFocus() const { return true; }
96 /// The encapsulated widget.
97 FindAndReplaceWidget * widget_;
101 } // namespace frontend
104 #endif // QSEARCHADV_H