2001-06-14 08:20:41 +00:00
|
|
|
// -*- C++ -*-
|
2001-08-31 02:34:10 +00:00
|
|
|
/**
|
2001-08-19 13:25:15 +00:00
|
|
|
* \file QSearch.h
|
2002-09-24 13:57:09 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-08-31 02:34:10 +00:00
|
|
|
*
|
2002-09-24 13:57:09 +00:00
|
|
|
* \author John Levon
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2001-03-06 14:23:02 +00:00
|
|
|
*/
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#ifndef QSEARCH_H
|
|
|
|
#define QSEARCH_H
|
2001-03-06 14:23:02 +00:00
|
|
|
|
2004-01-26 00:43:56 +00:00
|
|
|
#include "QDialogView.h"
|
2001-08-31 02:34:10 +00:00
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
2001-08-31 02:34:10 +00:00
|
|
|
class ControlSearch;
|
2001-08-19 13:25:15 +00:00
|
|
|
class QSearchDialog;
|
2002-08-12 14:28:43 +00:00
|
|
|
|
2001-08-31 02:34:10 +00:00
|
|
|
///
|
|
|
|
class QSearch
|
2004-01-26 00:43:56 +00:00
|
|
|
: public QController<ControlSearch, QView<QSearchDialog> >
|
2001-08-31 02:34:10 +00:00
|
|
|
{
|
2001-03-06 14:23:02 +00:00
|
|
|
public:
|
2001-06-05 17:05:51 +00:00
|
|
|
///
|
2001-08-31 02:34:10 +00:00
|
|
|
friend class QSearchDialog;
|
2001-06-05 17:05:51 +00:00
|
|
|
///
|
2004-01-26 00:43:56 +00:00
|
|
|
QSearch(Dialog &);
|
2001-03-06 14:23:02 +00:00
|
|
|
private:
|
2001-08-31 02:34:10 +00:00
|
|
|
/// Apply changes
|
2002-10-20 01:48:28 +00:00
|
|
|
virtual void apply() {}
|
2001-08-31 02:34:10 +00:00
|
|
|
/// update
|
2002-10-20 01:48:28 +00:00
|
|
|
virtual void update_contents() {}
|
2001-08-31 02:34:10 +00:00
|
|
|
/// build the dialog
|
|
|
|
virtual void build_dialog();
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
void find(std::string const & str, bool casesens,
|
2002-10-20 01:48:28 +00:00
|
|
|
bool words, bool backwards);
|
2001-08-31 02:34:10 +00:00
|
|
|
|
2003-11-04 12:01:15 +00:00
|
|
|
void replace(std::string const & findstr,
|
|
|
|
std::string const & replacestr,
|
|
|
|
bool casesens, bool words, bool backwards, bool all);
|
2001-03-06 14:23:02 +00:00
|
|
|
};
|
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
2001-08-19 13:25:15 +00:00
|
|
|
#endif // QSEARCH_H
|