62 #if defined (HAVE_CONFIG_H)
66 #if defined (HAVE_QSCINTILLA)
70 #include <QDialogButtonBox>
71 #include <QGridLayout>
75 #include <QMessageBox>
76 #include <QPushButton>
77 #include <QVBoxLayout>
85 setWindowTitle (tr (
"Find and Replace"));
86 setWindowIcon (QIcon(
":/actions/icons/find.png"));
121 #if defined (HAVE_QSCI_FINDSELECTION)
143 this, SLOT (close ()));
147 #if defined (HAVE_QSCI_FINDSELECTION)
148 connect (
_edit_area, SIGNAL (copyAvailable (
bool)),
154 QVBoxLayout *extension_layout =
new QVBoxLayout ();
155 extension_layout->setMargin (0);
161 QGridLayout *top_left_layout =
new QGridLayout;
167 QVBoxLayout *left_layout =
new QVBoxLayout;
168 left_layout->addLayout (top_left_layout);
169 left_layout->insertStretch (1, 5);
175 QGridLayout *main_layout =
new QGridLayout;
176 main_layout->setSizeConstraint (QLayout::SetFixedSize);
177 main_layout->addLayout (left_layout, 0, 0);
180 setLayout (main_layout);
189 addActions (find_actions);
192 int xp = p->x () +20;
193 int yp = p->y () + p->frameGeometry ().height () - sizeHint ().height () -20;
220 #if defined (HAVE_QSCI_FINDSELECTION)
232 #if defined (HAVE_QSCI_FINDSELECTION)
255 int lbeg, lend, cbeg, cend;
256 _edit_area->getSelection(&lbeg,&cbeg,&lend,&cend);
288 bool do_forward = forward;
321 else if (! do_forward)
328 int currpos =
_edit_area->positionFromLineIndex(line,col);
332 _edit_area->lineIndexFromPosition(currpos, &line,&col);
342 #if defined (HAVE_QSCI_FINDSELECTION)
354 #if defined (HAVE_QSCI_VERSION_2_6_0)
371 #if defined (HAVE_QSCI_VERSION_2_6_0)
430 QMessageBox msg_box (QMessageBox::Information, tr (
"Replace Result"),
432 QMessageBox::Ok,
this);
446 QMessageBox msg_box (QMessageBox::Information, tr (
"Find Result"),
447 tr (
"No more matches found"), QMessageBox::Ok,
this);
void find(bool forward=true)
QCheckBox * _search_selection_check_box
QPushButton * _find_prev_button
void handle_backward_search_changed(int)
void no_matches_message()
bool _find_result_available
QPushButton * _replace_all_button
void handle_sel_search_changed(int)
QPushButton * _more_button
QCheckBox * _whole_words_check_box
QLineEdit * _replace_line_edit
QCheckBox * _backward_check_box
QLineEdit * _search_line_edit
QCheckBox * _regex_check_box
void handle_search_text_changed(QString new_search_text)
QCheckBox * _case_check_box
QDialogButtonBox * _button_box
QCheckBox * _wrap_check_box
QPushButton * _find_next_button
void handle_selection_changed(bool has_selected)
find_dialog(QsciScintilla *edit_area, QList< QAction * > find_actions, QWidget *parent=0)
QsciScintilla * _edit_area
QPushButton * _replace_button
QCheckBox * _from_start_check_box