<class name="QItemSelectionRange" doc="/** <p>The <a href="QItemSelectionRange.html#QItemSelectionRange()"><tt>QItemSelectionRange</tt></a> class manages information about a range of selected items in a model.</p> <p>A <a href="QItemSelectionRange.html#QItemSelectionRange()"><tt>QItemSelectionRange</tt></a> 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. A selection range has a <a href="QItemSelectionRange.html#top()"><tt>top</tt></a>, <a href="QItemSelectionRange.html#left()"><tt>left</tt></a> a <a href="QItemSelectionRange.html#bottom()"><tt>bottom</tt></a>, <a href="QItemSelectionRange.html#right()"><tt>right</tt></a> and a <a href="QItemSelectionRange.html#parent()"><tt>parent</tt></a>.</p> <p>The <a href="QItemSelectionRange.html#QItemSelectionRange()"><tt>QItemSelectionRange</tt></a> class is one of the <a href="%2E%2E/qt4-interview.html#model-view-classes">Model/View Classes</tt></a> and is part of Qt's <a href="%2E%2E/model-view-programming.html">model/view framework</tt></a>.</p> <p>The model items contained in the selection range can be obtained by using the items() function. Use QItemSelectionModel::selectedIndexes() to get a list of all selected items for a view.</p> <p>You can determine whether a given model item lies within a particular range by using the <a href="QItemSelectionRange.html#contains(int, int, com.trolltech.qt.core.QModelIndex)"><tt>contains</tt></a> function. Ranges can also be compared using the overloaded operators for equality and inequality, and the <a href="QItemSelectionRange.html#intersects(com.trolltech.qt.gui.QItemSelectionRange)"><tt>intersects</tt></a> function allows you to determine whether two ranges overlap.</p> @see <a href="%2E%2E/model-view-programming.html">Model/View Programming</tt></a> @see <a href="%2E%2E/core/QAbstractItemModel.html"><tt>QAbstractItemModel</tt></a> @see <a href="QItemSelection.html"><tt>QItemSelection</tt></a> @see <a href="QItemSelectionModel.html"><tt>QItemSelectionModel</tt></a> */"> <method name="public QItemSelectionRange(com.trolltech.qt.core.QModelIndex index)" doc="/** <p>Constructs a new selection range containing only the model item specified by the model index <tt>index</tt>.</p> */"/> <method name="public QItemSelectionRange(com.trolltech.qt.gui.QItemSelectionRange other)" doc="/** <p>Copy constructor. Constructs a new selection range with the same contents as the <tt>other</tt> range given.</p> */"/> <method name="public QItemSelectionRange(com.trolltech.qt.core.QModelIndex topLeft, com.trolltech.qt.core.QModelIndex bottomRight)" doc="/** <p>Constructs a new selection range containing only the index specified by the <tt>topLeft</tt> and the index <tt>bottomRight</tt>.</p> */"/> <method name="public QItemSelectionRange()" doc="/** <p>Constructs an empty selection range.</p> */"/> <method name="public final int bottom()" doc="/** <p>Returns the row index corresponding to the lowermost selected row in the selection range.</p> */"/> <method name="public final com.trolltech.qt.core.QModelIndex bottomRight()" doc="/** <p>Returns the index for the item located at the bottom-right corner of the selection range.</p> @see <a href="QItemSelectionRange.html#bottom()"><tt>bottom</tt></a> @see <a href="QItemSelectionRange.html#right()"><tt>right</tt></a> @see <a href="QItemSelectionRange.html#topLeft()"><tt>topLeft</tt></a> */"/> <method name="public final boolean contains(com.trolltech.qt.core.QModelIndex index)" doc="/** <p>Returns true if the model item specified by the <tt>index</tt> lies within the range of selected items; otherwise returns false.</p> */"/> <method name="public final boolean contains(int row, int column, com.trolltech.qt.core.QModelIndex parentIndex)" doc="/** <p>Returns true if the model item specified by (<tt>row</tt>, <tt>column</tt>) and with <tt>parentIndex</tt> as the parent item lies within the range of selected items; otherwise returns false.</p> */"/> <method name="public final int height()" doc="/** <p>Returns the number of selected rows in the selection range.</p> */"/> <method name="public final java.util.List<com.trolltech.qt.core.QModelIndex> indexes()" doc="/** <p>Returns the list of model index items stored in the selection.</p> */"/> <method name="public final com.trolltech.qt.gui.QItemSelectionRange intersected(com.trolltech.qt.gui.QItemSelectionRange other)" doc="/** <p>Returns a new selection range containing only the items that are found in both the selection range and the <tt>other</tt> selection range.</p> */"/> <method name="public final boolean intersects(com.trolltech.qt.gui.QItemSelectionRange other)" doc="/** <p>Returns true if this selection range intersects (overlaps with) the <tt>other</tt> range given; otherwise returns false.</p> */"/> <method name="public final boolean isValid()" doc="/** <p>Returns true if the selection range is valid; otherwise returns false.</p> */"/> <method name="public final int left()" doc="/** <p>Returns the column index corresponding to the leftmost selected column in the selection range.</p> */"/> <method name="public final com.trolltech.qt.core.QAbstractItemModel model()" doc="/** <p>Returns the model that the items in the selection range belong to.</p> */"/> <method name="public final com.trolltech.qt.core.QModelIndex parent()" doc="/** <p>Returns the parent model item index of the items in the selection range.</p> */"/> <method name="public final int right()" doc="/** <p>Returns the column index corresponding to the rightmost selected column in the selection range.</p> */"/> <method name="public final int top()" doc="/** <p>Returns the row index corresponding to the uppermost selected row in the selection range.</p> */"/> <method name="public final com.trolltech.qt.core.QModelIndex topLeft()" doc="/** <p>Returns the index for the item located at the top-left corner of the selection range.</p> @see <a href="QItemSelectionRange.html#top()"><tt>top</tt></a> @see <a href="QItemSelectionRange.html#left()"><tt>left</tt></a> @see <a href="QItemSelectionRange.html#bottomRight()"><tt>bottomRight</tt></a> */"/> <method name="public final int width()" doc="/** <p>Returns the number of selected columns in the selection range.</p> */"/> </class>