Class: Qt::ItemSelectionModel
Instance Method Summary collapse
-
#ranges ⇒ Object
return a collection of selection ranges in Qt this means an ItemSelection instance.
-
#row_indexes ⇒ Object
return an array of integer indexes for currently selected rows.
- #single_cell? ⇒ Boolean
Instance Method Details
#ranges ⇒ Object
return a collection of selection ranges in Qt this means an ItemSelection instance
40 41 42 |
# File 'lib/clevic/qt/extensions.rb', line 40 def ranges selection end |
#row_indexes ⇒ Object
return an array of integer indexes for currently selected rows
32 33 34 35 36 |
# File 'lib/clevic/qt/extensions.rb', line 32 def row_indexes selected_indexes.inject(Set.new) do |set,index| set << index.row end.to_a end |
#single_cell? ⇒ Boolean
44 45 46 |
# File 'lib/clevic/qt/extensions.rb', line 44 def single_cell? ranges.size == 1 && ranges.first.single_cell? end |