Class: Ruber::FindInFiles::FindReplaceInFilesDlg::Completer
- Inherits:
-
Qt::Completer
- Object
- Qt::Completer
- Ruber::FindInFiles::FindReplaceInFilesDlg::Completer
- Defined in:
- plugins/find_in_files/find_in_files_dlg.rb
Overview
A specialized completer for use with the line edits in the dialog.
The only difference from the standard Qt::Completer
is that it creates its model by itself
Instance Method Summary (collapse)
-
- (nil) add_entry(str)
Adds a new string to the completer.
-
- (Completer) initialize(parent = nil)
constructor
A new instance of Completer.
Constructor Details
- (Completer) initialize(parent = nil)
A new instance of Completer
105 106 107 108 |
# File 'plugins/find_in_files/find_in_files_dlg.rb', line 105 def initialize parent = nil super self.model = Qt::StringListModel.new self end |
Instance Method Details
- (nil) add_entry(str)
Adds a new string to the completer
116 117 118 119 120 |
# File 'plugins/find_in_files/find_in_files_dlg.rb', line 116 def add_entry str row = model.row_count model.insert_rows row, 1 model.set_data model.index(row), Qt::Variant.new(str), Qt::DisplayRole end |