#include "find-dialog.h"
Public Slots | |
void | find_next (void) |
void | find_prev (void) |
void | update_edit_area (octave_qscintilla *) |
Slot for updating the edit area when the active tab has changed. More... | |
Public Member Functions | |
find_dialog (base_qobject &oct_qobj, octave_dock_widget *ed, QWidget *p) | |
void | init_search_text (void) |
Init the search text with the selected text in the editor tab. More... | |
void | restore_settings (QPoint def_pos) |
Restore position and the search options from the given settings where def_pos is the default position suitable for the current editor position. More... | |
void | set_visible (bool visible) |
Set dialog visible or not and storing the new visibility state. More... | |
Private Slots | |
void | find (bool forward=true) |
void | handle_backward_search_changed (int) |
void | handle_sel_search_changed (int) |
void | handle_selection_changed (bool has_selected) |
void | replace (void) |
void | replace_all (void) |
Private Member Functions | |
void | closeEvent (QCloseEvent *e) |
Reimplemented close event. More... | |
void | do_replace (void) |
void | handle_replace_text_changed (void) |
void | handle_search_text_changed (void) |
void | mru_update (QComboBox *mru) |
Update mru lists with new entry. More... | |
void | no_matches_message (void) |
void | reject () |
Reimplemented slot: close instead of hiding. More... | |
void | save_settings () |
Save position and the search options in the given settings. More... | |
Private Attributes | |
QCheckBox * | m_backward_check_box |
QDialogButtonBox * | m_button_box |
QCheckBox * | m_case_check_box |
octave_qscintilla * | m_edit_area |
octave_dock_widget * | m_editor |
QWidget * | m_extension |
QPushButton * | m_find_next_button |
QPushButton * | m_find_prev_button |
bool | m_find_result_available |
QCheckBox * | m_from_start_check_box |
bool | m_in_sel |
QPoint | m_last_position |
QPushButton * | m_more_button |
const int | m_mru_length = 10 |
base_qobject & | m_octave_qobj |
QCheckBox * | m_regex_check_box |
bool | m_rep_active |
int | m_rep_all |
QPushButton * | m_replace_all_button |
QPushButton * | m_replace_button |
QLabel * | m_replace_label |
QComboBox * | m_replace_line_edit |
QLabel * | m_search_label |
QComboBox * | m_search_line_edit |
QCheckBox * | m_search_selection_check_box |
int | m_sel_beg |
int | m_sel_end |
QCheckBox * | m_whole_words_check_box |
QCheckBox * | m_wrap_check_box |
Definition at line 85 of file find-dialog.h.
find_dialog::find_dialog | ( | base_qobject & | oct_qobj, |
octave_dock_widget * | ed, | ||
QWidget * | p | ||
) |
Definition at line 91 of file find-dialog.cc.
References find_next(), find_prev(), handle_backward_search_changed(), handle_sel_search_changed(), replace(), and replace_all().
|
private |
Reimplemented close event.
Definition at line 649 of file find-dialog.cc.
References save_settings().
|
private |
Definition at line 569 of file find-dialog.cc.
References m_edit_area, m_in_sel, m_rep_active, m_replace_line_edit, m_search_line_edit, and m_sel_end.
Referenced by replace(), and replace_all().
|
privateslot |
Definition at line 416 of file find-dialog.cc.
References octave_qscintilla::clear_selection_markers(), handle_search_text_changed(), m_case_check_box, m_edit_area, m_find_result_available, m_from_start_check_box, m_in_sel, m_regex_check_box, m_rep_all, m_search_line_edit, m_search_selection_check_box, m_sel_beg, m_sel_end, m_whole_words_check_box, m_wrap_check_box, no_matches_message(), and octave_qscintilla::show_selection_markers().
Referenced by find_next(), and find_prev().
|
slot |
Definition at line 406 of file find-dialog.cc.
References find(), and m_backward_check_box.
Referenced by find_dialog(), replace(), and replace_all().
|
slot |
Definition at line 411 of file find-dialog.cc.
References find(), and m_backward_check_box.
Referenced by find_dialog().
|
privateslot |
Definition at line 313 of file find-dialog.cc.
References m_from_start_check_box.
Referenced by find_dialog().
|
private |
Definition at line 335 of file find-dialog.cc.
References m_replace_line_edit, and mru_update().
Referenced by replace(), and replace_all().
|
private |
Definition at line 322 of file find-dialog.cc.
References m_find_result_available, m_search_line_edit, m_search_selection_check_box, and mru_update().
Referenced by find().
|
privateslot |
Definition at line 371 of file find-dialog.cc.
References m_find_result_available, and m_from_start_check_box.
Referenced by find_dialog().
|
privateslot |
Definition at line 377 of file find-dialog.cc.
References m_find_result_available, m_rep_active, and m_search_selection_check_box.
Referenced by update_edit_area().
void find_dialog::init_search_text | ( | void | ) |
Init the search text with the selected text in the editor tab.
Definition at line 387 of file find-dialog.cc.
References m_edit_area, m_find_next_button, and m_search_line_edit.
|
private |
Update mru lists with new entry.
Definition at line 345 of file find-dialog.cc.
References m_mru_length.
Referenced by handle_replace_text_changed(), handle_search_text_changed(), and save_settings().
|
private |
Definition at line 637 of file find-dialog.cc.
Referenced by find().
|
private |
Reimplemented slot: close instead of hiding.
Definition at line 644 of file find-dialog.cc.
|
privateslot |
Definition at line 588 of file find-dialog.cc.
References do_replace(), find_next(), handle_replace_text_changed(), m_edit_area, and m_find_result_available.
Referenced by find_dialog().
|
privateslot |
Definition at line 602 of file find-dialog.cc.
References do_replace(), find_next(), handle_replace_text_changed(), m_edit_area, m_find_result_available, m_rep_all, m_search_selection_check_box, and octave_qscintilla::setCursorPosition().
Referenced by find_dialog().
void find_dialog::restore_settings | ( | QPoint | def_pos | ) |
Restore position and the search options from the given settings where def_pos is the default position suitable for the current editor position.
Definition at line 267 of file find-dialog.cc.
References adjust_to_screen(), gui_pref::def, ed_fdlg_opts(), ed_fdlg_pos(), ed_fdlg_replace(), ed_fdlg_search(), FIND_DLG_BACK, FIND_DLG_CASE, FIND_DLG_MORE, FIND_DLG_REGX, FIND_DLG_SEL, FIND_DLG_START, FIND_DLG_WORDS, FIND_DLG_WRAP, base_qobject::get_resource_manager(), resource_manager::get_settings(), gui_pref::key, m_backward_check_box, m_case_check_box, m_extension, m_from_start_check_box, m_last_position, m_mru_length, m_octave_qobj, m_regex_check_box, m_replace_line_edit, m_search_line_edit, m_search_selection_check_box, m_whole_words_check_box, m_wrap_check_box, and gui_settings::value().
|
private |
Save position and the search options in the given settings.
Definition at line 219 of file find-dialog.cc.
References ed_fdlg_opts(), ed_fdlg_pos(), ed_fdlg_replace(), ed_fdlg_search(), FIND_DLG_BACK, FIND_DLG_CASE, FIND_DLG_MORE, FIND_DLG_REGX, FIND_DLG_SEL, FIND_DLG_START, FIND_DLG_WORDS, FIND_DLG_WRAP, base_qobject::get_resource_manager(), resource_manager::get_settings(), gui_pref::key, m_backward_check_box, m_case_check_box, m_extension, m_from_start_check_box, m_last_position, m_octave_qobj, m_regex_check_box, m_replace_line_edit, m_search_line_edit, m_search_selection_check_box, m_whole_words_check_box, m_wrap_check_box, and mru_update().
Referenced by closeEvent().
void find_dialog::set_visible | ( | bool | visible | ) |
Set dialog visible or not and storing the new visibility state.
Definition at line 657 of file find-dialog.cc.
References m_last_position.
|
slot |
Slot for updating the edit area when the active tab has changed.
Definition at line 209 of file find-dialog.cc.
References handle_selection_changed(), m_edit_area, and m_search_selection_check_box.
|
private |
Definition at line 157 of file find-dialog.h.
Referenced by find_next(), find_prev(), restore_settings(), and save_settings().
|
private |
Definition at line 158 of file find-dialog.h.
|
private |
Definition at line 151 of file find-dialog.h.
Referenced by find(), restore_settings(), and save_settings().
|
private |
Definition at line 165 of file find-dialog.h.
Referenced by do_replace(), find(), init_search_text(), replace(), replace_all(), and update_edit_area().
|
private |
Definition at line 145 of file find-dialog.h.
|
private |
Definition at line 164 of file find-dialog.h.
Referenced by restore_settings(), and save_settings().
|
private |
Definition at line 159 of file find-dialog.h.
Referenced by init_search_text().
|
private |
Definition at line 160 of file find-dialog.h.
|
private |
Definition at line 166 of file find-dialog.h.
Referenced by find(), handle_search_text_changed(), handle_sel_search_changed(), handle_selection_changed(), replace(), and replace_all().
|
private |
Definition at line 152 of file find-dialog.h.
Referenced by find(), handle_backward_search_changed(), handle_sel_search_changed(), restore_settings(), and save_settings().
|
private |
Definition at line 170 of file find-dialog.h.
Referenced by do_replace(), and find().
|
private |
Definition at line 174 of file find-dialog.h.
Referenced by restore_settings(), save_settings(), and set_visible().
|
private |
Definition at line 163 of file find-dialog.h.
|
private |
Definition at line 176 of file find-dialog.h.
Referenced by mru_update(), and restore_settings().
|
private |
Definition at line 125 of file find-dialog.h.
Referenced by restore_settings(), and save_settings().
|
private |
Definition at line 155 of file find-dialog.h.
Referenced by find(), restore_settings(), and save_settings().
|
private |
Definition at line 168 of file find-dialog.h.
Referenced by do_replace(), and handle_selection_changed().
|
private |
Definition at line 167 of file find-dialog.h.
Referenced by find(), and replace_all().
|
private |
Definition at line 162 of file find-dialog.h.
|
private |
Definition at line 161 of file find-dialog.h.
|
private |
Definition at line 149 of file find-dialog.h.
|
private |
Definition at line 150 of file find-dialog.h.
Referenced by do_replace(), handle_replace_text_changed(), restore_settings(), and save_settings().
|
private |
Definition at line 147 of file find-dialog.h.
|
private |
Definition at line 148 of file find-dialog.h.
Referenced by do_replace(), find(), handle_search_text_changed(), init_search_text(), restore_settings(), and save_settings().
|
private |
Definition at line 156 of file find-dialog.h.
Referenced by find(), handle_search_text_changed(), handle_selection_changed(), replace_all(), restore_settings(), save_settings(), and update_edit_area().
|
private |
Definition at line 171 of file find-dialog.h.
Referenced by find().
|
private |
Definition at line 172 of file find-dialog.h.
Referenced by do_replace(), and find().
|
private |
Definition at line 154 of file find-dialog.h.
Referenced by find(), restore_settings(), and save_settings().
|
private |
Definition at line 153 of file find-dialog.h.
Referenced by find(), restore_settings(), and save_settings().