]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSearch.h
fix memory leaks
[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 showView();
37         void closeEvent(QCloseEvent * e);
38         ///
39         bool initialiseParams(std::string const &) { return true; }
40         void clearParams() {}
41         void dispatchParams() {}
42         bool isBufferDependent() const { return true; }
43
44         /// Searches occurence of string
45         void find(docstring const & search,
46                   bool casesensitive, bool matchword, bool forward);
47
48         /// Replaces occurence of string
49         void replace(docstring const & search, docstring const & replace,
50                      bool casesensitive, bool matchword,
51                      bool forward, bool all);
52 };
53
54 } // namespace frontend
55 } // namespace lyx
56
57 #endif // GUISEARCH_H