3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
14 #include "QSearchDialog.h"
17 #include "controllers/ControlSearch.h"
19 #include <qcombobox.h>
20 #include <qpushbutton.h>
27 typedef QController<ControlSearch, QView<QSearchDialog> > base_class;
30 QSearch::QSearch(Dialog & parent)
31 : base_class(parent, _("LyX: Find and Replace"))
36 void QSearch::build_dialog()
38 dialog_.reset(new QSearchDialog(this));
40 bcview().setCancel(dialog_->closePB);
41 bcview().addReadOnly(dialog_->replaceCO);
42 bcview().addReadOnly(dialog_->replacePB);
43 bcview().addReadOnly(dialog_->replaceallPB);
45 dialog_->replacePB->setEnabled(false);
46 dialog_->replaceallPB->setEnabled(false);
50 void QSearch::find(string const & str, bool casesens,
51 bool words, bool backwards)
53 controller().find(str, casesens, words, !backwards);
57 void QSearch::replace(string const & findstr, string const & replacestr,
58 bool casesens, bool words, bool backwards, bool all)
60 controller().replace(findstr, replacestr, casesens, words,
64 } // namespace frontend