]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QSearch.h
partial fonts fix. Like Juergen said we really need our own dialog.
[lyx.git] / src / frontends / qt2 / QSearch.h
index 5c62c03175940e7d8626a1bfb713fa29d07917cd..3b27a639913033e68000ee959371810e66ba8fbe 100644 (file)
@@ -1,63 +1,49 @@
 // -*- 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"
+#ifdef __GNUG__
+#pragma interface
+#endif
 
-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