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

#include "find-dialog.h"

Inheritance diagram for find_dialog:
Collaboration diagram for 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 * m_backward_check_box
 
QDialogButtonBox * m_button_box
 
QCheckBox * m_case_check_box
 
octave_qscintillam_edit_area
 
octave_dock_widgetm_editor
 
QWidgetm_extension
 
QPushButtonm_find_next_button
 
QPushButtonm_find_prev_button
 
bool m_find_result_available
 
QCheckBox * m_from_start_check_box
 
bool m_in_sel
 
QPoint m_last_position
 
QPushButtonm_more_button
 
const int m_mru_length = 10
 
base_qobjectm_octave_qobj
 
QCheckBox * m_regex_check_box
 
bool m_rep_active
 
int m_rep_all
 
QPushButtonm_replace_all_button
 
QPushButtonm_replace_button
 
QLabelm_replace_label
 
QComboBox * m_replace_line_edit
 
QLabelm_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
 

Detailed Description

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

Constructor & Destructor Documentation

◆ find_dialog()

find_dialog::find_dialog ( base_qobject oct_qobj,
octave_dock_widget ed,
QWidget p 
)

Member Function Documentation

◆ closeEvent()

void find_dialog::closeEvent ( QCloseEvent *  e)
private

Reimplemented close event.

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

References save_settings().

◆ do_replace()

void find_dialog::do_replace ( void  )
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().

◆ find

◆ find_next

void find_dialog::find_next ( void  )
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().

◆ find_prev

void find_dialog::find_prev ( void  )
slot

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

References find(), and m_backward_check_box.

Referenced by find_dialog().

◆ handle_backward_search_changed

void find_dialog::handle_backward_search_changed ( int  backward)
privateslot

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

References m_from_start_check_box.

Referenced by find_dialog().

◆ handle_replace_text_changed()

void find_dialog::handle_replace_text_changed ( void  )
private

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

References m_replace_line_edit, and mru_update().

Referenced by replace(), and replace_all().

◆ handle_search_text_changed()

void find_dialog::handle_search_text_changed ( void  )
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().

◆ handle_sel_search_changed

void find_dialog::handle_sel_search_changed ( int  selected)
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().

◆ handle_selection_changed

void find_dialog::handle_selection_changed ( bool  has_selected)
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().

◆ init_search_text()

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.

◆ mru_update()

void find_dialog::mru_update ( QComboBox *  mru)
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().

◆ no_matches_message()

void find_dialog::no_matches_message ( void  )
private

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

Referenced by find().

◆ reject()

void find_dialog::reject ( void  )
private

Reimplemented slot: close instead of hiding.

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

◆ replace

void find_dialog::replace ( void  )
privateslot

◆ replace_all

void find_dialog::replace_all ( void  )
privateslot

◆ restore_settings()

◆ save_settings()

◆ set_visible()

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.

◆ update_edit_area

void 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 209 of file find-dialog.cc.

References handle_selection_changed(), m_edit_area, and m_search_selection_check_box.

Member Data Documentation

◆ m_backward_check_box

QCheckBox* find_dialog::m_backward_check_box
private

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

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

◆ m_button_box

QDialogButtonBox* find_dialog::m_button_box
private

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

◆ m_case_check_box

QCheckBox* find_dialog::m_case_check_box
private

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

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

◆ m_edit_area

octave_qscintilla* find_dialog::m_edit_area
private

◆ m_editor

octave_dock_widget* find_dialog::m_editor
private

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

◆ m_extension

QWidget* find_dialog::m_extension
private

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

Referenced by restore_settings(), and save_settings().

◆ m_find_next_button

QPushButton* find_dialog::m_find_next_button
private

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

Referenced by init_search_text().

◆ m_find_prev_button

QPushButton* find_dialog::m_find_prev_button
private

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

◆ m_find_result_available

bool find_dialog::m_find_result_available
private

◆ m_from_start_check_box

QCheckBox* find_dialog::m_from_start_check_box
private

◆ m_in_sel

bool 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 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_more_button

QPushButton* find_dialog::m_more_button
private

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

◆ m_mru_length

const int find_dialog::m_mru_length = 10
private

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

Referenced by mru_update(), and restore_settings().

◆ m_octave_qobj

base_qobject& find_dialog::m_octave_qobj
private

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

Referenced by restore_settings(), and save_settings().

◆ m_regex_check_box

QCheckBox* find_dialog::m_regex_check_box
private

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

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

◆ m_rep_active

bool find_dialog::m_rep_active
private

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

Referenced by do_replace(), and handle_selection_changed().

◆ m_rep_all

int find_dialog::m_rep_all
private

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

Referenced by find(), and replace_all().

◆ m_replace_all_button

QPushButton* find_dialog::m_replace_all_button
private

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

◆ m_replace_button

QPushButton* find_dialog::m_replace_button
private

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

◆ m_replace_label

QLabel* find_dialog::m_replace_label
private

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

◆ m_replace_line_edit

QComboBox* find_dialog::m_replace_line_edit
private

◆ m_search_label

QLabel* find_dialog::m_search_label
private

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

◆ m_search_line_edit

QComboBox* find_dialog::m_search_line_edit
private

◆ m_search_selection_check_box

QCheckBox* find_dialog::m_search_selection_check_box
private

◆ m_sel_beg

int find_dialog::m_sel_beg
private

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

Referenced by find().

◆ m_sel_end

int find_dialog::m_sel_end
private

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

Referenced by do_replace(), and find().

◆ m_whole_words_check_box

QCheckBox* find_dialog::m_whole_words_check_box
private

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

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

◆ m_wrap_check_box

QCheckBox* find_dialog::m_wrap_check_box
private

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

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


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