2 * \file QSearchDialog.C
3 * Copyright 2001 The LyX Team.
4 * See the file COPYING.
11 #include "QSearchDialog.h"
13 #include <qpushbutton.h>
14 #include <qcombobox.h>
15 #include <qcheckbox.h>
18 QSearchDialog::QSearchDialog(QSearch * form, QWidget * parent, const char * name, bool modal, WFlags fl)
19 : QSearchDialogBase(parent, name, modal, fl),
26 QSearchDialog::~QSearchDialog()
31 void QSearchDialog::closeEvent(QCloseEvent * e)
38 void QSearchDialog::setReadOnly(bool readonly)
40 replace->setEnabled(!readonly);
41 replaceLabel->setEnabled(!readonly);
42 replacePB->setEnabled(!readonly);
43 replaceAllPB->setEnabled(!readonly);
47 void QSearchDialog::Find()
49 form_->find(tostr(find->currentText()).c_str(),
50 caseSensitive->isChecked(),
51 matchWord->isChecked(),
52 !searchBack->isChecked());
56 void QSearchDialog::Replace(bool replaceall)
58 form_->replace(tostr(find->currentText()).c_str(),
59 tostr(replace->currentText()).c_str(),
60 caseSensitive->isChecked(),
61 matchWord->isChecked(),
62 !searchBack->isChecked(),