2 * \file searchdlgimpl.h
3 * Copyright 2001 The LyX Team.
4 * See the file COPYING.
11 #include "searchdlgimpl.h"
13 #include <qpushbutton.h>
14 #include <qcombobox.h>
15 #include <qcheckbox.h>
19 SearchDlgImpl::SearchDlgImpl(FormSearch* form, QWidget* parent, const char* name, bool modal, WFlags fl )
20 : SearchDlg( parent, name, modal, fl ), form_(form)
25 SearchDlgImpl::~SearchDlgImpl()
29 void SearchDlgImpl::closeEvent(QCloseEvent * e)
35 void SearchDlgImpl::setReadOnly(bool readonly)
37 replace->setEnabled(!readonly);
38 replaceLabel->setEnabled(!readonly);
39 replacePB->setEnabled(!readonly);
40 replaceAllPB->setEnabled(!readonly);
43 void SearchDlgImpl::Find()
45 form_->find(tostr(find->currentText()).c_str(),
46 caseSensitive->isChecked(),
47 matchWord->isChecked(),
48 !searchBack->isChecked());
51 void SearchDlgImpl::Replace(bool replaceall = false)
53 form_->replace(tostr(find->currentText()).c_str(),
54 tostr(replace->currentText()).c_str(),
55 caseSensitive->isChecked(),
56 matchWord->isChecked(),
57 !searchBack->isChecked(),