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"
34 class FindAndReplaceWidget : public QWidget, public Ui::FindAndReplaceUi
39 FindAndReplaceWidget(GuiView & view);
40 bool initialiseParams(std::string const & params);
46 /// add a string to the combo if needed
47 void remember(std::string const & find, QComboBox & combo);
49 /// FIXME Probably to be merged with findAndReplace(bool, bool)
51 bool casesensitive, bool matchword, bool backwards,
52 bool expandmacros, bool ignoreformat, bool replace,
56 /// Perform the scope-related buffer switch while searching
57 void findAndReplaceScope(FindAndReplaceOptions & opt);
59 /// Collect options from the GUI elements, then perform the search
60 void findAndReplace(bool backwards, bool replace);
62 bool eventFilter(QObject *obj, QEvent *event);
64 void virtual showEvent(QShowEvent *ev);
65 void virtual hideEvent(QHideEvent *ev);
68 void on_findNextPB_clicked();
69 void on_findPrevPB_clicked();
70 void on_replaceNextPB_clicked();
71 void on_replacePrevPB_clicked();
72 void on_replaceallPB_clicked();
73 void on_closePB_clicked();
74 void on_regexpInsertCombo_currentIndexChanged(int index);
78 class FindAndReplace : public DockView
83 GuiView & parent, ///< the main window where to dock.
84 Qt::DockWidgetArea area = Qt::RightDockWidgetArea, ///< Position of the dock (and also drawer)
85 Qt::WindowFlags flags = 0);
89 bool initialiseParams(std::string const &);
91 void dispatchParams() {}
92 bool isBufferDependent() const { return true; }
97 //virtual void update_contents() {}
100 virtual bool wantInitialFocus() const { return true; }
103 /// The encapsulated widget.
104 FindAndReplaceWidget * widget_;
108 } // namespace frontend
111 #endif // QSEARCHADV_H