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,
52 // void find(docstring const & str, int len, bool casesens,
53 // bool words, bool backwards, bool expandmacros);
54 void findAndReplace(bool backwards, bool replace);
56 bool eventFilter(QObject *obj, QEvent *event);
58 void virtual showEvent(QShowEvent *ev);
59 void virtual hideEvent(QHideEvent *ev);
62 void on_findNextPB_clicked();
63 void on_findPrevPB_clicked();
64 void on_replaceNextPB_clicked();
65 void on_replacePrevPB_clicked();
66 void on_replaceallPB_clicked();
67 void on_closePB_clicked();
68 void on_regexpInsertCombo_currentIndexChanged(int index);
72 class FindAndReplace : public DockView
77 GuiView & parent, ///< the main window where to dock.
78 Qt::DockWidgetArea area = Qt::RightDockWidgetArea, ///< Position of the dock (and also drawer)
79 Qt::WindowFlags flags = 0);
83 bool initialiseParams(std::string const &);
85 void dispatchParams() {}
86 bool isBufferDependent() const { return true; }
91 //virtual void update_contents() {}
94 virtual bool wantInitialFocus() const { return true; }
97 /// The encapsulated widget.
98 FindAndReplaceWidget * widget_;
102 } // namespace frontend
105 #endif // QSEARCHADV_H