Class: Clevic::SelectionRange
- Defined in:
- lib/clevic/swing/selection_model.rb
Overview
QItemSelectionRange contains information about a range of selected items in a model. A range of items is a contiguous array of model items, extending to cover a number of adjacent rows and columns with a common parent item; this can be visualized as a two-dimensional block of cells in a table
file:///usr/share/doc/qt-4.6.2/html/qitemselectionrange.html#details
Instance Method Summary collapse
- #bottom_right ⇒ Object
- #height ⇒ Object
-
#initialize(row_range, column_range) ⇒ SelectionRange
constructor
row_range and column_range are Range objects.
- #top_left ⇒ Object
- #width ⇒ Object
Constructor Details
#initialize(row_range, column_range) ⇒ SelectionRange
row_range and column_range are Range objects
13 14 15 16 |
# File 'lib/clevic/swing/selection_model.rb', line 13 def initialize( row_range, column_range ) @row_range = row_range @column_range = column_range end |
Instance Method Details
#bottom_right ⇒ Object
30 31 32 |
# File 'lib/clevic/swing/selection_model.rb', line 30 def bottom_right SwingTableIndex.new( nil, @row_range.last, @column_range.last ) end |
#height ⇒ Object
18 19 20 |
# File 'lib/clevic/swing/selection_model.rb', line 18 def height @row_range.distance end |
#top_left ⇒ Object
26 27 28 |
# File 'lib/clevic/swing/selection_model.rb', line 26 def top_left SwingTableIndex.new( nil, @row_range.first, @column_range.first ) end |