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);
70 void on_findNextPB_clicked();
71 void on_findPrevPB_clicked();
72 void on_replaceNextPB_clicked();
73 void on_replacePrevPB_clicked();
74 void on_replaceallPB_clicked();
75 void insertRegexp(QAction *);
79 class FindAndReplace : public DockView
84 GuiView & parent, ///< the main window where to dock.
85 Qt::DockWidgetArea area = Qt::RightDockWidgetArea, ///< Position of the dock (and also drawer)
86 Qt::WindowFlags flags = 0);
90 bool initialiseParams(std::string const &);
92 void dispatchParams() {}
93 bool isBufferDependent() const { return true; }
98 //virtual void update_contents() {}
101 virtual bool wantInitialFocus() const { return true; }
104 /// The encapsulated widget.
105 FindAndReplaceWidget * widget_;
109 } // namespace frontend
112 #endif // QSEARCHADV_H