2 * \file QSearchDialog.C
3 * Copyright 2001 The LyX Team.
4 * See the file COPYING.
11 #include "ControlSearch.h"
12 #include "QSearchDialog.h"
15 #include <qpushbutton.h>
16 #include <qcombobox.h>
17 #include <qcheckbox.h>
20 QSearchDialog::QSearchDialog(QSearch * form)
21 : QSearchDialogBase(0, 0, false, 0),
24 connect(closePB, SIGNAL(clicked()),
25 form_, SLOT(slotClose()));
29 void QSearchDialog::closeEvent(QCloseEvent * e)
36 void QSearchDialog::findChanged()
38 if (findCO->currentText().isEmpty()) {
39 findPB->setEnabled(false);
40 replacePB->setEnabled(false);
41 replaceallPB->setEnabled(false);
43 findPB->setEnabled(true);
44 replacePB->setEnabled(!form_->readOnly());
45 replaceallPB->setEnabled(!form_->readOnly());
50 void QSearchDialog::findClicked()
52 string const find(findCO->currentText().latin1());
56 backwardsCB->isChecked());
60 void QSearchDialog::replaceClicked()
62 string const find(findCO->currentText().latin1());
63 string const replace(replaceCO->currentText().latin1());
64 form_->replace(find, replace,
71 void QSearchDialog::replaceallClicked()
73 form_->replace(findCO->currentText().latin1(),
74 replaceCO->currentText().latin1(),