]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSearch.h
On Linux show in crash message box the backtrace
[lyx.git] / src / frontends / qt4 / GuiSearch.h
1 // -*- C++ -*-
2 /**
3  * \file GuiSearch.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  * \author Angus Leeming
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUISEARCH_H
14 #define GUISEARCH_H
15
16 #include "GuiDialog.h"
17 #include "ui_SearchUi.h"
18
19 namespace lyx {
20 namespace frontend {
21
22 class GuiSearch : public GuiDialog, public Ui::SearchUi
23 {
24         Q_OBJECT
25
26 public:
27         GuiSearch(GuiView & lv);
28
29 private Q_SLOTS:
30         void findChanged();
31         void findClicked();
32         void replaceClicked();
33         void replaceallClicked();
34
35 private:
36         void showEvent(QShowEvent * e);
37         ///
38         bool initialiseParams(std::string const &) { return true; }
39         void clearParams() {}
40         void dispatchParams() {}
41         bool isBufferDependent() const { return true; }
42
43         /// Dispatches repeatedly func with wrap around question
44         void wrap_dispatch(const FuncRequest & func, bool forward);
45
46         /// Searches occurence of string
47         void find(docstring const & search,
48                   bool casesensitive, bool matchword, bool forward);
49
50         /// Replaces occurence of string
51         void replace(docstring const & search, docstring const & replace,
52                      bool casesensitive, bool matchword,
53                      bool forward, bool all);
54 };
55
56 } // namespace frontend
57 } // namespace lyx
58
59 #endif // GUISEARCH_H