GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
octave::find_dialog Class Reference

#include "find-dialog.h"

Inheritance diagram for octave::find_dialog:
Collaboration diagram for octave::find_dialog:

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 * _backward_check_box
 
QDialogButtonBox * _button_box
 
QCheckBox * _case_check_box
 
octave_qscintilla_edit_area
 
QWidget_extension
 
QPushButton_find_next_button
 
QPushButton_find_prev_button
 
bool _find_result_available
 
QCheckBox * _from_start_check_box
 
QPushButton_more_button
 
QCheckBox * _regex_check_box
 
bool _rep_active
 
int _rep_all
 
QPushButton_replace_all_button
 
QPushButton_replace_button
 
QLabel * _replace_label
 
QComboBox * _replace_line_edit
 
QLabel * _search_label
 
QComboBox * _search_line_edit
 
QCheckBox * _search_selection_check_box
 
QCheckBox * _whole_words_check_box
 
QCheckBox * _wrap_check_box
 
octave_dock_widgetm_editor
 
bool m_in_sel
 
QPoint m_last_position
 
const int m_mru_length = 10
 
base_qobjectm_octave_qobj
 
int m_sel_beg
 
int m_sel_end
 

Detailed Description

Definition at line 85 of file find-dialog.h.

Constructor & Destructor Documentation

◆ find_dialog()

Member Function Documentation

◆ closeEvent()

void octave::find_dialog::closeEvent ( QCloseEvent *  e)
private

Reimplemented close event.

Definition at line 670 of file find-dialog.cc.

References save_settings().

◆ do_replace()

void octave::find_dialog::do_replace ( void  )
private

Definition at line 590 of file find-dialog.cc.

References _edit_area, _rep_active, _replace_line_edit, _search_line_edit, m_in_sel, and m_sel_end.

Referenced by replace(), and replace_all().

◆ find

◆ find_next

void octave::find_dialog::find_next ( void  )
slot

Definition at line 427 of file find-dialog.cc.

References _backward_check_box, and find().

Referenced by find_dialog(), replace(), and replace_all().

◆ find_prev

void octave::find_dialog::find_prev ( void  )
slot

Definition at line 432 of file find-dialog.cc.

References _backward_check_box, and find().

Referenced by find_dialog().

◆ handle_backward_search_changed

void octave::find_dialog::handle_backward_search_changed ( int  backward)
privateslot

Definition at line 320 of file find-dialog.cc.

References _from_start_check_box.

Referenced by find_dialog().

◆ handle_replace_text_changed()

void octave::find_dialog::handle_replace_text_changed ( void  )
private

Definition at line 342 of file find-dialog.cc.

References _replace_line_edit, and mru_update().

Referenced by replace(), and replace_all().

◆ handle_search_text_changed()

void octave::find_dialog::handle_search_text_changed ( void  )
private

Definition at line 329 of file find-dialog.cc.

References _find_result_available, _search_line_edit, _search_selection_check_box, and mru_update().

Referenced by find().

◆ handle_sel_search_changed

void octave::find_dialog::handle_sel_search_changed ( int  selected)
privateslot

Definition at line 378 of file find-dialog.cc.

References _find_result_available, and _from_start_check_box.

Referenced by find_dialog().

◆ handle_selection_changed

void octave::find_dialog::handle_selection_changed ( bool  has_selected)
privateslot

Definition at line 384 of file find-dialog.cc.

References _find_result_available, _rep_active, and _search_selection_check_box.

Referenced by update_edit_area().

◆ init_search_text()

void octave::find_dialog::init_search_text ( void  )

Init the search text with the selected text in the editor tab.

Definition at line 394 of file find-dialog.cc.

References _edit_area, _find_next_button, and _search_line_edit.

◆ mru_update()

void octave::find_dialog::mru_update ( QComboBox *  mru)
private

Update mru lists with new entry.

Definition at line 352 of file find-dialog.cc.

References m_mru_length.

Referenced by handle_replace_text_changed(), handle_search_text_changed(), and save_settings().

◆ no_matches_message()

void octave::find_dialog::no_matches_message ( void  )
private

Definition at line 658 of file find-dialog.cc.

Referenced by find().

◆ reject()

void octave::find_dialog::reject ( void  )
private

Reimplemented slot: close instead of hiding.

Definition at line 665 of file find-dialog.cc.

◆ replace

void octave::find_dialog::replace ( void  )
privateslot

◆ replace_all

void octave::find_dialog::replace_all ( void  )
privateslot

◆ restore_settings()

◆ save_settings()

◆ set_visible()

void octave::find_dialog::set_visible ( bool  visible)

Set dialog visible or not and storing the new visibility state.

Definition at line 678 of file find-dialog.cc.

References m_last_position.

◆ update_edit_area

void octave::find_dialog::update_edit_area ( octave_qscintilla edit_area)
slot

Slot for updating the edit area when the active tab has changed.

Definition at line 210 of file find-dialog.cc.

References _edit_area, _search_selection_check_box, and handle_selection_changed().

Referenced by find_dialog().

Member Data Documentation

◆ _backward_check_box

QCheckBox* octave::find_dialog::_backward_check_box
private

Definition at line 157 of file find-dialog.h.

Referenced by find_dialog(), find_next(), find_prev(), restore_settings(), and save_settings().

◆ _button_box

QDialogButtonBox* octave::find_dialog::_button_box
private

Definition at line 158 of file find-dialog.h.

Referenced by find_dialog().

◆ _case_check_box

QCheckBox* octave::find_dialog::_case_check_box
private

Definition at line 151 of file find-dialog.h.

Referenced by find_dialog(), find(), restore_settings(), and save_settings().

◆ _edit_area

octave_qscintilla* octave::find_dialog::_edit_area
private

◆ _extension

QWidget* octave::find_dialog::_extension
private

Definition at line 164 of file find-dialog.h.

Referenced by find_dialog(), restore_settings(), and save_settings().

◆ _find_next_button

QPushButton* octave::find_dialog::_find_next_button
private

Definition at line 159 of file find-dialog.h.

Referenced by find_dialog(), and init_search_text().

◆ _find_prev_button

QPushButton* octave::find_dialog::_find_prev_button
private

Definition at line 160 of file find-dialog.h.

Referenced by find_dialog().

◆ _find_result_available

bool octave::find_dialog::_find_result_available
private

◆ _from_start_check_box

QCheckBox* octave::find_dialog::_from_start_check_box
private

◆ _more_button

QPushButton* octave::find_dialog::_more_button
private

Definition at line 163 of file find-dialog.h.

Referenced by find_dialog().

◆ _regex_check_box

QCheckBox* octave::find_dialog::_regex_check_box
private

Definition at line 155 of file find-dialog.h.

Referenced by find_dialog(), find(), restore_settings(), and save_settings().

◆ _rep_active

bool octave::find_dialog::_rep_active
private

Definition at line 168 of file find-dialog.h.

Referenced by find_dialog(), do_replace(), and handle_selection_changed().

◆ _rep_all

int octave::find_dialog::_rep_all
private

Definition at line 167 of file find-dialog.h.

Referenced by find_dialog(), find(), and replace_all().

◆ _replace_all_button

QPushButton* octave::find_dialog::_replace_all_button
private

Definition at line 162 of file find-dialog.h.

Referenced by find_dialog().

◆ _replace_button

QPushButton* octave::find_dialog::_replace_button
private

Definition at line 161 of file find-dialog.h.

Referenced by find_dialog().

◆ _replace_label

QLabel* octave::find_dialog::_replace_label
private

Definition at line 149 of file find-dialog.h.

Referenced by find_dialog().

◆ _replace_line_edit

QComboBox* octave::find_dialog::_replace_line_edit
private

◆ _search_label

QLabel* octave::find_dialog::_search_label
private

Definition at line 147 of file find-dialog.h.

Referenced by find_dialog().

◆ _search_line_edit

QComboBox* octave::find_dialog::_search_line_edit
private

◆ _search_selection_check_box

QCheckBox* octave::find_dialog::_search_selection_check_box
private

◆ _whole_words_check_box

QCheckBox* octave::find_dialog::_whole_words_check_box
private

Definition at line 154 of file find-dialog.h.

Referenced by find_dialog(), find(), restore_settings(), and save_settings().

◆ _wrap_check_box

QCheckBox* octave::find_dialog::_wrap_check_box
private

Definition at line 153 of file find-dialog.h.

Referenced by find_dialog(), find(), restore_settings(), and save_settings().

◆ m_editor

octave_dock_widget* octave::find_dialog::m_editor
private

Definition at line 145 of file find-dialog.h.

◆ m_in_sel

bool octave::find_dialog::m_in_sel
private

Definition at line 170 of file find-dialog.h.

Referenced by do_replace(), and find().

◆ m_last_position

QPoint octave::find_dialog::m_last_position
private

Definition at line 174 of file find-dialog.h.

Referenced by restore_settings(), save_settings(), and set_visible().

◆ m_mru_length

const int octave::find_dialog::m_mru_length = 10
private

Definition at line 176 of file find-dialog.h.

Referenced by find_dialog(), mru_update(), and restore_settings().

◆ m_octave_qobj

base_qobject& octave::find_dialog::m_octave_qobj
private

Definition at line 125 of file find-dialog.h.

Referenced by restore_settings(), and save_settings().

◆ m_sel_beg

int octave::find_dialog::m_sel_beg
private

Definition at line 171 of file find-dialog.h.

Referenced by find().

◆ m_sel_end

int octave::find_dialog::m_sel_end
private

Definition at line 172 of file find-dialog.h.

Referenced by do_replace(), and find().


The documentation for this class was generated from the following files: