// -*- C++ -*-
-/**
+/**
* \file QSearch.h
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
- *
- * \author Edwin Leuven
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
*/
#ifndef QSEARCH_H
#define QSEARCH_H
-#include "DialogBase.h"
-#include "LString.h"
-#include "support/lstrings.h"
-class LyXView;
-class Dialogs;
+#include "Qt2Base.h"
+
+class ControlSearch;
class QSearchDialog;
-class QSearch : public DialogBase {
+
+///
+class QSearch
+ : public Qt2CB<ControlSearch, Qt2DB<QSearchDialog> >
+{
public:
///
- QSearch(LyXView *, Dialogs *);
+ friend class QSearchDialog;
///
- ~QSearch();
-
- /// Close connections.
- void close();
- /// find stuff (we need access to lv_).
- void find(string const &, bool const &, bool const &, bool const &);
- /// replace stuff (we need access to lv_).
- void replace(string const &, string const &,
- bool const &, bool const &, bool const &, bool const &);
-
+ QSearch();
private:
- /// Show the dialog.
- void show();
- /// Hide the dialog.
- void hide();
- /// Update the dialog.
- void update(bool switched = false);
-
- /// Real GUI implementation.
- QSearchDialog * dialog_;
-
- /// the LyXView we belong to.
- LyXView * lv_;
-
- /** Which Dialogs do we belong to?
- * Used so we can get at the signals we have to connect to.
- */
- Dialogs * d_;
-
- /// Hide connection.
- SigC::Connection h_;
-
- /// Update connection.
- SigC::Connection u_;
-
+ /// Apply changes
+ virtual void apply() {}
+ /// update
+ virtual void update_contents() {}
+ /// build the dialog
+ virtual void build_dialog();
+
+ void find(string const & str, bool casesens,
+ bool words, bool backwards);
+
+ void replace(string const & findstr, string const & replacestr,
+ bool casesens, bool words, bool all);
};
#endif // QSEARCH_H