<class name="QItemSelection" doc="/**
&lt;p&gt;The &lt;a href=&quot;QItemSelection.html#QItemSelection(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;QItemSelection&lt;/tt&gt;&lt;/a&gt; class manages information about selected items in a model.&lt;/p&gt;
&lt;p&gt;A &lt;a href=&quot;QItemSelection.html#QItemSelection(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;QItemSelection&lt;/tt&gt;&lt;/a&gt; describes the items in a model that have been selected by the user. A &lt;a href=&quot;QItemSelection.html#QItemSelection(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;QItemSelection&lt;/tt&gt;&lt;/a&gt; is basically a list of selection ranges, see &lt;a href=&quot;QItemSelectionRange.html&quot;&gt;&lt;tt&gt;QItemSelectionRange&lt;/tt&gt;&lt;/a&gt;. It provides functions for creating and manipulating selections, and selecting a range of items from a model.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;QItemSelection.html#QItemSelection(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;QItemSelection&lt;/tt&gt;&lt;/a&gt; class is one of the &lt;a href=&quot;%2E%2E/qt4-interview.html#model-view-classes&quot;&gt;Model/View Classes&lt;/tt&gt;&lt;/a&gt; and is part of Qt's &lt;a href=&quot;%2E%2E/model-view-programming.html&quot;&gt;model/view framework&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;An item selection can be constructed and initialized to contain a range of items from an existing model. The following example constructs a selection that contains a range of items from the given &lt;tt&gt;model&lt;/tt&gt;, beginning at the &lt;tt&gt;topLeft&lt;/tt&gt;, and ending at the &lt;tt&gt;bottomRight&lt;/tt&gt;.&lt;/p&gt;
&lt;pre&gt;    QItemSelection *selection = new QItemSelection(topLeft, bottomRight);&lt;/pre&gt;
&lt;p&gt;An empty item selection can be constructed, and later populated as required. So, if the model is going to be unavailable when we construct the item selection, we can rewrite the above code in the following way:&lt;/p&gt;
&lt;pre&gt;    QItemSelection *selection = new QItemSelection();
    ...
    selection-&amp;gt;select(topLeft, bottomRight);&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;QItemSelection.html#QItemSelection(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;QItemSelection&lt;/tt&gt;&lt;/a&gt; saves memory, and avoids unnecessary work, by working with selection ranges rather than recording the model item index for each item in the selection. Generally, an instance of this class will contain a list of non-overlapping selection ranges.&lt;/p&gt;
&lt;p&gt;Use &lt;a href=&quot;QItemSelection.html#merge(com.trolltech.qt.gui.QItemSelection, com.trolltech.qt.gui.QItemSelectionModel.SelectionFlags)&quot;&gt;&lt;tt&gt;merge&lt;/tt&gt;&lt;/a&gt; to merge one item selection into another without making overlapping ranges. Use split() to split one selection range into smaller ranges based on a another selection range.&lt;/p&gt;

@see &lt;a href=&quot;%2E%2E/model-view-programming.html&quot;&gt;Model/View Programming&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelectionModel.html&quot;&gt;&lt;tt&gt;QItemSelectionModel&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QItemSelection()" doc="/**
&lt;p&gt;Constructs an empty selection.&lt;/p&gt;
 */"/>
    <method name="public QItemSelection(com.trolltech.qt.core.QModelIndex topLeft, com.trolltech.qt.core.QModelIndex bottomRight)" doc="/**
&lt;p&gt;Constructs an item selection that extends from the top-left model item, specified by the &lt;tt&gt;topLeft&lt;/tt&gt; index, to the bottom-right item, specified by &lt;tt&gt;bottomRight&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final void append(com.trolltech.qt.gui.QItemSelectionRange t)" doc="/**
&lt;p&gt;Inserts &lt;tt&gt;t&lt;/tt&gt; at the end of the list.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QList&amp;lt;QString&amp;gt; list;
    list.append(&amp;quot;one&amp;quot;);
    list.append(&amp;quot;two&amp;quot;);
    list.append(&amp;quot;three&amp;quot;);
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; list: [&amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, &amp;quot;three&amp;quot;]&lt;/pre&gt;
&lt;p&gt;This is the same as list.insert(&lt;a href=&quot;QItemSelection.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt;, &lt;tt&gt;t&lt;/tt&gt;).&lt;/p&gt;
&lt;p&gt;This operation is typically very fast (constant time&lt;/tt&gt;), because QList preallocates extra space on both sides of its internal buffer to allow for fast growth at both ends of the list.&lt;/p&gt;

@see &lt;tt&gt;operator&amp;lt;&amp;lt;&lt;/tt&gt;
@see &lt;a href=&quot;QItemSelection.html#prepend(com.trolltech.qt.gui.QItemSelectionRange)&quot;&gt;&lt;tt&gt;prepend&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;insert&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QItemSelectionRange at(int i)" doc="/**
&lt;p&gt;Returns the item at index position &lt;tt&gt;i&lt;/tt&gt; in the list.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;i&lt;/tt&gt; must be a valid index position in the list (i.e&amp;#x2e;, 0 &amp;lt;= &lt;tt&gt;i&lt;/tt&gt; &amp;lt; &lt;a href=&quot;QItemSelection.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;This function is very fast (constant time&lt;/tt&gt;).&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#value(int)&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;operator[]&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QItemSelectionRange back()"/>
    <method name="public final void clear()" doc="/**
&lt;p&gt;Removes all items from the list.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#removeAll(com.trolltech.qt.gui.QItemSelectionRange)&quot;&gt;&lt;tt&gt;removeAll&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean contains(com.trolltech.qt.core.QModelIndex index)" doc="/**
&lt;p&gt;Returns true if the selection contains the given &lt;tt&gt;index&lt;/tt&gt;; otherwise returns false.&lt;/p&gt;
 */"/>
    <method name="public final int count(com.trolltech.qt.gui.QItemSelectionRange t)" doc="/**
&lt;p&gt;Returns the number of occurrences of &lt;tt&gt;t&lt;/tt&gt; in the list.&lt;/p&gt;
&lt;p&gt;This function requires the value type to have an implementation of &lt;tt&gt;operator==()&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#contains(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;contains&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#indexOf(com.trolltech.qt.gui.QItemSelectionRange, int)&quot;&gt;&lt;tt&gt;indexOf&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int count()" doc="/**
&lt;p&gt;Returns the number of items in the list. This is effectively the same as &lt;a href=&quot;QItemSelection.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public final boolean empty()" doc="/**
&lt;p&gt;This function is provided for STL compatibility. It is equivalent to &lt;a href=&quot;QItemSelection.html#isEmpty()&quot;&gt;&lt;tt&gt;isEmpty&lt;/tt&gt;&lt;/a&gt; and returns true if the list is empty.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.gui.QItemSelectionRange first()"/>
    <method name="public final com.trolltech.qt.gui.QItemSelectionRange front()"/>
    <method name="public final int indexOf(com.trolltech.qt.gui.QItemSelectionRange t, int from)" doc="/**
&lt;p&gt;Returns the index position of the first occurrence of &lt;tt&gt;t&lt;/tt&gt; in the list, searching forward from index position &lt;tt&gt;from&lt;/tt&gt;. Returns -1 if no item matched.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QList&amp;lt;QString&amp;gt; list;
    list &amp;lt;&amp;lt; &amp;quot;A&amp;quot; &amp;lt;&amp;lt; &amp;quot;B&amp;quot; &amp;lt;&amp;lt; &amp;quot;C&amp;quot; &amp;lt;&amp;lt; &amp;quot;B&amp;quot; &amp;lt;&amp;lt; &amp;quot;A&amp;quot;;
    list.indexOf(&amp;quot;B&amp;quot;);          &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 1
    list.indexOf(&amp;quot;B&amp;quot;, 1);       &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 1
    list.indexOf(&amp;quot;B&amp;quot;, 2);       &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 3
    list.indexOf(&amp;quot;X&amp;quot;);          &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns -1&lt;/pre&gt;
&lt;p&gt;This function requires the value type to have an implementation of &lt;tt&gt;operator==()&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#lastIndexOf(com.trolltech.qt.gui.QItemSelectionRange, int)&quot;&gt;&lt;tt&gt;lastIndexOf&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#contains(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;contains&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int indexOf(com.trolltech.qt.gui.QItemSelectionRange t)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QItemSelection.html#indexOf(com.trolltech.qt.gui.QItemSelectionRange, int)&quot;&gt;&lt;tt&gt;indexOf&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;t&lt;/tt&gt;, 0). */"/>
    <method name="public final java.util.List&lt;com.trolltech.qt.core.QModelIndex&gt; indexes()" doc="/**
&lt;p&gt;Returns a list of model indexes that correspond to the selected items.&lt;/p&gt;
 */"/>
    <method name="public final boolean isEmpty()" doc="/**
&lt;p&gt;Returns true if the list contains no items; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QItemSelectionRange last()"/>
    <method name="public final int lastIndexOf(com.trolltech.qt.gui.QItemSelectionRange t, int from)" doc="/**
&lt;p&gt;Returns the index position of the last occurrence of &lt;tt&gt;t&lt;/tt&gt; in the list, searching backward from index position &lt;tt&gt;from&lt;/tt&gt;. If &lt;tt&gt;from&lt;/tt&gt; is -1 (the default), the search starts at the last item. Returns -1 if no item matched.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QList&amp;lt;QString&amp;gt; list;
    list &amp;lt;&amp;lt; &amp;quot;A&amp;quot; &amp;lt;&amp;lt; &amp;quot;B&amp;quot; &amp;lt;&amp;lt; &amp;quot;C&amp;quot; &amp;lt;&amp;lt; &amp;quot;B&amp;quot; &amp;lt;&amp;lt; &amp;quot;A&amp;quot;;
    list.lastIndexOf(&amp;quot;B&amp;quot;);      &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 3
    list.lastIndexOf(&amp;quot;B&amp;quot;, 3);   &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 3
    list.lastIndexOf(&amp;quot;B&amp;quot;, 2);   &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns 1
    list.lastIndexOf(&amp;quot;X&amp;quot;);      &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; returns -1&lt;/pre&gt;
&lt;p&gt;This function requires the value type to have an implementation of &lt;tt&gt;operator==()&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#indexOf(com.trolltech.qt.gui.QItemSelectionRange, int)&quot;&gt;&lt;tt&gt;indexOf&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int lastIndexOf(com.trolltech.qt.gui.QItemSelectionRange t)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QItemSelection.html#lastIndexOf(com.trolltech.qt.gui.QItemSelectionRange, int)&quot;&gt;&lt;tt&gt;lastIndexOf&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;t&lt;/tt&gt;, -1). */"/>
    <method name="public final void merge(com.trolltech.qt.gui.QItemSelection other, com.trolltech.qt.gui.QItemSelectionModel.SelectionFlags command)" doc="/**
&lt;p&gt;Merges the &lt;tt&gt;other&lt;/tt&gt; selection with this &lt;a href=&quot;QItemSelection.html#QItemSelection(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;QItemSelection&lt;/tt&gt;&lt;/a&gt; using the &lt;tt&gt;command&lt;/tt&gt; given. This method guarantees that no ranges are overlapping.&lt;/p&gt;
&lt;p&gt;Note that only QItemSelectionModel::Select, QItemSelectionModel::Deselect, and QItemSelectionModel::Toggle are supported.&lt;/p&gt;

@see &lt;tt&gt;split&lt;/tt&gt; */"/>
    <method name="public final java.util.List&lt;com.trolltech.qt.gui.QItemSelectionRange&gt; mid(int pos, int length)" doc="/**
&lt;p&gt;Returns a list whose elements are copied from this list, starting at position &lt;tt&gt;pos&lt;/tt&gt;. If &lt;tt&gt;length&lt;/tt&gt; is -1 (the default), all elements after &lt;tt&gt;pos&lt;/tt&gt; are copied; otherwise &lt;tt&gt;length&lt;/tt&gt; elements (or all remaining elements if there are less than &lt;tt&gt;length&lt;/tt&gt; elements) are copied.&lt;/p&gt;
 */"/>
    <method name="public final java.util.List&lt;com.trolltech.qt.gui.QItemSelectionRange&gt; mid(int pos)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QItemSelection.html#mid(int, int)&quot;&gt;mid&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;pos&lt;/tt&gt;, -1). */"/>
    <method name="public final void move(int from, int to)" doc="/**
&lt;p&gt;Moves the item at index position &lt;tt&gt;from&lt;/tt&gt; to index position &lt;tt&gt;to&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QList&amp;lt;QString&amp;gt; list;
    list &amp;lt;&amp;lt; &amp;quot;A&amp;quot; &amp;lt;&amp;lt; &amp;quot;B&amp;quot; &amp;lt;&amp;lt; &amp;quot;C&amp;quot; &amp;lt;&amp;lt; &amp;quot;D&amp;quot; &amp;lt;&amp;lt; &amp;quot;E&amp;quot; &amp;lt;&amp;lt; &amp;quot;F&amp;quot;;
    list.move(1, 4);
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; list: [&amp;quot;A&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;D&amp;quot;, &amp;quot;E&amp;quot;, &amp;quot;B&amp;quot;, &amp;quot;F&amp;quot;]&lt;/pre&gt;
&lt;p&gt;This is the same as insert(&lt;tt&gt;to&lt;/tt&gt;, &lt;a href=&quot;QItemSelection.html#takeAt(int)&quot;&gt;&lt;tt&gt;takeAt&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;from&lt;/tt&gt;)).&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#swap(int, int)&quot;&gt;&lt;tt&gt;swap&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;insert&lt;/tt&gt;
@see &lt;a href=&quot;QItemSelection.html#takeAt(int)&quot;&gt;&lt;tt&gt;takeAt&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void pop_back()" doc="/**
&lt;p&gt;This function is provided for STL compatibility. It is equivalent to &lt;a href=&quot;QItemSelection.html#removeLast()&quot;&gt;&lt;tt&gt;removeLast&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public final void pop_front()" doc="/**
&lt;p&gt;This function is provided for STL compatibility. It is equivalent to &lt;a href=&quot;QItemSelection.html#removeFirst()&quot;&gt;&lt;tt&gt;removeFirst&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public final void prepend(com.trolltech.qt.gui.QItemSelectionRange t)" doc="/**
&lt;p&gt;Inserts &lt;tt&gt;t&lt;/tt&gt; at the beginning of the list.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QList&amp;lt;QString&amp;gt; list;
    list.prepend(&amp;quot;one&amp;quot;);
    list.prepend(&amp;quot;two&amp;quot;);
    list.prepend(&amp;quot;three&amp;quot;);
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; list: [&amp;quot;three&amp;quot;, &amp;quot;two&amp;quot;, &amp;quot;one&amp;quot;]&lt;/pre&gt;
&lt;p&gt;This is the same as list.insert(0, &lt;tt&gt;t&lt;/tt&gt;).&lt;/p&gt;
&lt;p&gt;This operation is usually very fast (constant time&lt;/tt&gt;), because QList preallocates extra space on both sides of its internal buffer to allow for fast growth at both ends of the list.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#append(com.trolltech.qt.gui.QItemSelectionRange)&quot;&gt;&lt;tt&gt;append&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;insert&lt;/tt&gt; */"/>
    <method name="public final void push_back(com.trolltech.qt.gui.QItemSelectionRange t)" doc="/**
&lt;p&gt;This function is provided for STL compatibility. It is equivalent to append(&lt;tt&gt;t&lt;/tt&gt;).&lt;/p&gt;
 */"/>
    <method name="public final void push_front(com.trolltech.qt.gui.QItemSelectionRange t)" doc="/**
&lt;p&gt;This function is provided for STL compatibility. It is equivalent to prepend(&lt;tt&gt;t&lt;/tt&gt;).&lt;/p&gt;
 */"/>
    <method name="public final int removeAll(com.trolltech.qt.gui.QItemSelectionRange t)" doc="/**
&lt;p&gt;Removes all occurrences of &lt;tt&gt;t&lt;/tt&gt; in the list and returns the number of entries removed.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QList&amp;lt;QString&amp;gt; list;
    list &amp;lt;&amp;lt; &amp;quot;sun&amp;quot; &amp;lt;&amp;lt; &amp;quot;cloud&amp;quot; &amp;lt;&amp;lt; &amp;quot;sun&amp;quot; &amp;lt;&amp;lt; &amp;quot;rain&amp;quot;;
    list.removeAll(&amp;quot;sun&amp;quot;);
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; list: [&amp;quot;cloud&amp;quot;, &amp;quot;rain&amp;quot;]&lt;/pre&gt;
&lt;p&gt;This function requires the value type to have an implementation of &lt;tt&gt;operator==()&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#removeAt(int)&quot;&gt;&lt;tt&gt;removeAt&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#takeAt(int)&quot;&gt;&lt;tt&gt;takeAt&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#replace(int, com.trolltech.qt.gui.QItemSelectionRange)&quot;&gt;&lt;tt&gt;replace&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void removeAt(int i)" doc="/**
&lt;p&gt;Removes the item at index position &lt;tt&gt;i&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;i&lt;/tt&gt; must be a valid index position in the list (i.e&amp;#x2e;, 0 &amp;lt;= &lt;tt&gt;i&lt;/tt&gt; &amp;lt; &lt;a href=&quot;QItemSelection.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#takeAt(int)&quot;&gt;&lt;tt&gt;takeAt&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#removeFirst()&quot;&gt;&lt;tt&gt;removeFirst&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#removeLast()&quot;&gt;&lt;tt&gt;removeLast&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void removeFirst()" doc="/**
&lt;p&gt;Removes the first item in the list.&lt;/p&gt;
&lt;p&gt;This is the same as &lt;a href=&quot;QItemSelection.html#removeAt(int)&quot;&gt;&lt;tt&gt;removeAt&lt;/tt&gt;&lt;/a&gt;(0).&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#removeAt(int)&quot;&gt;&lt;tt&gt;removeAt&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#takeFirst()&quot;&gt;&lt;tt&gt;takeFirst&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void removeLast()" doc="/**
&lt;p&gt;Removes the last item in the list.&lt;/p&gt;
&lt;p&gt;This is the same as &lt;a href=&quot;QItemSelection.html#removeAt(int)&quot;&gt;&lt;tt&gt;removeAt&lt;/tt&gt;&lt;/a&gt;(&lt;a href=&quot;QItemSelection.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt; - 1).&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#removeAt(int)&quot;&gt;&lt;tt&gt;removeAt&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#takeLast()&quot;&gt;&lt;tt&gt;takeLast&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void replace(int i, com.trolltech.qt.gui.QItemSelectionRange t)" doc="/**
&lt;p&gt;Replaces the item at index position &lt;tt&gt;i&lt;/tt&gt; with &lt;tt&gt;t&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;i&lt;/tt&gt; must be a valid index position in the list (i.e&amp;#x2e;, 0 &amp;lt;= &lt;tt&gt;i&lt;/tt&gt; &amp;lt; &lt;a href=&quot;QItemSelection.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;

@see &lt;tt&gt;operator[]&lt;/tt&gt;
@see &lt;a href=&quot;QItemSelection.html#removeAt(int)&quot;&gt;&lt;tt&gt;removeAt&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void select(com.trolltech.qt.core.QModelIndex topLeft, com.trolltech.qt.core.QModelIndex bottomRight)" doc="/**
&lt;p&gt;Adds the items in the range that extends from the top-left model item, specified by the &lt;tt&gt;topLeft&lt;/tt&gt; index, to the bottom-right item, specified by &lt;tt&gt;bottomRight&lt;/tt&gt; to the list.&lt;/p&gt;
 */"/>
    <method name="public final void setSharable(boolean sharable)" doc="/**
&lt;p&gt;&lt;/p&gt;
 */"/>
    <method name="public final int size()" doc="/**
&lt;p&gt;Returns the number of items in the list.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#isEmpty()&quot;&gt;&lt;tt&gt;isEmpty&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#count()&quot;&gt;&lt;tt&gt;count&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void swap(int i, int j)" doc="/**
&lt;p&gt;Exchange the item at index position &lt;tt&gt;i&lt;/tt&gt; with the item at index position &lt;tt&gt;j&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QList&amp;lt;QString&amp;gt; list;
    list &amp;lt;&amp;lt; &amp;quot;A&amp;quot; &amp;lt;&amp;lt; &amp;quot;B&amp;quot; &amp;lt;&amp;lt; &amp;quot;C&amp;quot; &amp;lt;&amp;lt; &amp;quot;D&amp;quot; &amp;lt;&amp;lt; &amp;quot;E&amp;quot; &amp;lt;&amp;lt; &amp;quot;F&amp;quot;;
    list.swap(1, 4);
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; list: [&amp;quot;A&amp;quot;, &amp;quot;E&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;D&amp;quot;, &amp;quot;B&amp;quot;, &amp;quot;F&amp;quot;]&lt;/pre&gt;

@see &lt;a href=&quot;QItemSelection.html#move(int, int)&quot;&gt;&lt;tt&gt;move&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QItemSelectionRange takeAt(int i)" doc="/**
&lt;p&gt;Removes the item at index position &lt;tt&gt;i&lt;/tt&gt; and returns it.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;i&lt;/tt&gt; must be a valid index position in the list (i.e&amp;#x2e;, 0 &amp;lt;= &lt;tt&gt;i&lt;/tt&gt; &amp;lt; &lt;a href=&quot;QItemSelection.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;If you don't use the return value, &lt;a href=&quot;QItemSelection.html#removeAt(int)&quot;&gt;&lt;tt&gt;removeAt&lt;/tt&gt;&lt;/a&gt; is more efficient.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#removeAt(int)&quot;&gt;&lt;tt&gt;removeAt&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#takeFirst()&quot;&gt;&lt;tt&gt;takeFirst&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#takeLast()&quot;&gt;&lt;tt&gt;takeLast&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QItemSelectionRange takeFirst()" doc="/**
&lt;p&gt;Removes the first item in the list and returns it.&lt;/p&gt;
&lt;p&gt;This is the same as &lt;a href=&quot;QItemSelection.html#takeAt(int)&quot;&gt;&lt;tt&gt;takeAt&lt;/tt&gt;&lt;/a&gt;(0).&lt;/p&gt;
&lt;p&gt;This operation is very fast (constant time&lt;/tt&gt;), because QList preallocates extra space on both sides of its internal buffer to allow for fast growth at both ends of the list.&lt;/p&gt;
&lt;p&gt;If you don't use the return value, &lt;a href=&quot;QItemSelection.html#removeFirst()&quot;&gt;&lt;tt&gt;removeFirst&lt;/tt&gt;&lt;/a&gt; is more efficient.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#takeLast()&quot;&gt;&lt;tt&gt;takeLast&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#takeAt(int)&quot;&gt;&lt;tt&gt;takeAt&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#removeFirst()&quot;&gt;&lt;tt&gt;removeFirst&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QItemSelectionRange takeLast()" doc="/**
&lt;p&gt;Removes the last item in the list and returns it.&lt;/p&gt;
&lt;p&gt;This is the same as &lt;a href=&quot;QItemSelection.html#takeAt(int)&quot;&gt;&lt;tt&gt;takeAt&lt;/tt&gt;&lt;/a&gt;(&lt;a href=&quot;QItemSelection.html#size()&quot;&gt;&lt;tt&gt;size&lt;/tt&gt;&lt;/a&gt; - 1).&lt;/p&gt;
&lt;p&gt;This operation is very fast (constant time&lt;/tt&gt;), because QList preallocates extra space on both sides of its internal buffer to allow for fast growth at both ends of the list.&lt;/p&gt;
&lt;p&gt;If you don't use the return value, &lt;a href=&quot;QItemSelection.html#removeLast()&quot;&gt;&lt;tt&gt;removeLast&lt;/tt&gt;&lt;/a&gt; is more efficient.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#takeFirst()&quot;&gt;&lt;tt&gt;takeFirst&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#takeAt(int)&quot;&gt;&lt;tt&gt;takeAt&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QItemSelection.html#removeLast()&quot;&gt;&lt;tt&gt;removeLast&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.util.List&lt;com.trolltech.qt.gui.QItemSelectionRange&gt; toVector()" doc="/**
&lt;p&gt;Returns a QVector object with the data contained in this QList.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QStringList list;
    list &amp;lt;&amp;lt; &amp;quot;Sven&amp;quot; &amp;lt;&amp;lt; &amp;quot;Kim&amp;quot; &amp;lt;&amp;lt; &amp;quot;Ola&amp;quot;;

    QVector&amp;lt;QString&amp;gt; vect = list.toVector();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; vect: [&amp;quot;Sven&amp;quot;, &amp;quot;Kim&amp;quot;, &amp;quot;Ola&amp;quot;]&lt;/pre&gt;

@see &lt;tt&gt;toSet&lt;/tt&gt;
@see &lt;a href=&quot;QItemSelection.html#fromVector(java.util.List&lt;com.trolltech.qt.gui.QItemSelectionRange&gt;)&quot;&gt;&lt;tt&gt;fromVector&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QVector::fromList&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QItemSelectionRange value(int i, com.trolltech.qt.gui.QItemSelectionRange defaultValue)" doc="/**
&lt;p&gt;If the index &lt;tt&gt;i&lt;/tt&gt; is out of bounds, the function returns &lt;tt&gt;defaultValue&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.gui.QItemSelectionRange value(int i)" doc="/**
&lt;p&gt;Returns the value at index position &lt;tt&gt;i&lt;/tt&gt; in the list.&lt;/p&gt;
&lt;p&gt;If the index &lt;tt&gt;i&lt;/tt&gt; is out of bounds, the function returns a default-constructed value&lt;/tt&gt;. If you are certain that the index is going to be within bounds, you can use &lt;a href=&quot;QItemSelection.html#at(int)&quot;&gt;&lt;tt&gt;at&lt;/tt&gt;&lt;/a&gt; instead, which is slightly faster.&lt;/p&gt;

@see &lt;a href=&quot;QItemSelection.html#at(int)&quot;&gt;&lt;tt&gt;at&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;operator[]&lt;/tt&gt; */"/>
    <method name="public native static java.util.List&lt;com.trolltech.qt.gui.QItemSelectionRange&gt; fromVector(java.util.List&lt;com.trolltech.qt.gui.QItemSelectionRange&gt; vector)" doc="/**
&lt;p&gt;Returns a QList object with the data contained in &lt;tt&gt;vector&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QVector&amp;lt;double&amp;gt; vect;
    vect &amp;lt;&amp;lt; &amp;quot;red&amp;quot; &amp;lt;&amp;lt; &amp;quot;green&amp;quot; &amp;lt;&amp;lt; &amp;quot;blue&amp;quot; &amp;lt;&amp;lt; &amp;quot;black&amp;quot;;

    QList&amp;lt;double&amp;gt; list = QVector&amp;lt;T&amp;gt;::fromVector(vect);
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; list: [&amp;quot;red&amp;quot;, &amp;quot;green&amp;quot;, &amp;quot;blue&amp;quot;, &amp;quot;black&amp;quot;]&lt;/pre&gt;

@see &lt;tt&gt;fromSet&lt;/tt&gt;
@see &lt;a href=&quot;QItemSelection.html#toVector()&quot;&gt;&lt;tt&gt;toVector&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QVector::toList&lt;/tt&gt; */"/>
</class>
