Class: Qt::ItemSelectionModel

Inherits:
Object
  • Object
show all
Defined in:
lib/qtext/extensions.rb

Instance Method Summary collapse

Instance Method Details

#row_indexes(column = 0) ⇒ Object

return a set of indexes with the given column index and the rows from the selection



130
131
132
133
134
135
136
# File 'lib/qtext/extensions.rb', line 130

def row_indexes( column = 0 )
  row_set = selected_indexes.inject(Set.new) do |set,index|
    set << index.row
  end
  
  row_set.map{|row| model.create_index( row, column ) }
end