<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # QItemSelectionModel Class Reference ## [[QtGui](index.htm) module] 該QItemSelectionModel類跟蹤視圖的選定項目。[More...](#details) 繼承[QObject](qobject.html)。 ### Types * `enum SelectionFlag { NoUpdate, Clear, Select, Deselect, ..., ClearAndSelect }` * `class **[SelectionFlags](index.htm)**` ### Methods * `__init__ (self, QAbstractItemModel?model)` * `__init__ (self, QAbstractItemModel?model, QObject?parent)` * `clear (self)` * `clearSelection (self)` * `bool columnIntersectsSelection (self, int?column, QModelIndex?parent)` * `QModelIndex currentIndex (self)` * `emitSelectionChanged (self, QItemSelection?newSelection, QItemSelection?oldSelection)` * `bool hasSelection (self)` * `bool isColumnSelected (self, int?column, QModelIndex?parent)` * `bool isRowSelected (self, int?row, QModelIndex?parent)` * `bool isSelected (self, QModelIndex?index)` * `QAbstractItemModel model (self)` * `reset (self)` * `bool rowIntersectsSelection (self, int?row, QModelIndex?parent)` * `select (self, QModelIndex?index, SelectionFlags?command)` * `select (self, QItemSelection?selection, SelectionFlags?command)` * `list-of-QModelIndex selectedColumns (self, int?row?=?0)` * `list-of-QModelIndex selectedIndexes (self)` * `list-of-QModelIndex selectedRows (self, int?column?=?0)` * `QItemSelection selection (self)` * `setCurrentIndex (self, QModelIndex?index, SelectionFlags?command)` ### Qt Signals * `void currentChanged (const QModelIndex&,const QModelIndex&)` * `void currentColumnChanged (const QModelIndex&,const QModelIndex&)` * `void currentRowChanged (const QModelIndex&,const QModelIndex&)` * `void selectionChanged (const QItemSelection&,const QItemSelection&)` * * * ## Detailed Description 該QItemSelectionModel類跟蹤視圖的選定項目。 一個QItemSelectionModel跟蹤選定的項目在一個視圖或多個視圖到同一個模型。它也跟蹤當前所選項目的視圖中。 該QItemSelectionModel類是一個[Model/View Classes](index.htm)并且是Qt的一部分[model/view framework](index.htm)。 所選擇的項目,采用范圍存儲。每當你要修改的選定項目[select](qitemselectionmodel.html#select)( ),并提供任一[QItemSelection](qitemselection.html)或[QModelIndex](qmodelindex.html)和[QItemSelectionModel.SelectionFlag](qitemselectionmodel.html#SelectionFlag-enum)。 該QItemSelectionModel需要一個兩層的方法來選擇管理,處理已提交雙方選定的項目,并且是當前選擇的一部分項目。在當前選擇的項目是當前交互的選擇(例如用橡皮筋選擇或鍵盤移位的選擇)的一部分。 要更新當前選定的項目,使用或按位[QItemSelectionModel.Current](qitemselectionmodel.html#SelectionFlag-enum)和任何其它的[SelectionFlags](qitemselectionmodel.html#SelectionFlag-enum)。如果省略了[QItemSelectionModel.Current](qitemselectionmodel.html#SelectionFlag-enum)命令,新的當前選擇將被創建,并且前一個加入到整個選擇。所有的功能在兩個層次上作業,例如, selectedItems ( )將從兩個層返回的項目。 * * * ## Type Documentation ``` QItemSelectionModel.SelectionFlag ``` 這個枚舉變量描述的方式選擇模型將被更新。 | Constant | Value | Description | | --- | --- | --- | | `QItemSelectionModel.NoUpdate` | `0x0000` | 沒有選擇將會作出修改。 | | `QItemSelectionModel.Clear` | `0x0001` | 完整的選擇將被清零。 | | `QItemSelectionModel.Select` | `0x0002` | 所有指定的索引將被選中。 | | `QItemSelectionModel.Deselect` | `0x0004` | 所有指定的索引將被取消。 | | `QItemSelectionModel.Toggle` | `0x0008` | 所有指定的索引將被選擇或取消選擇取決于它們的當前狀態。 | | `QItemSelectionModel.Current` | `0x0010` | 當前的選擇將被更新。 | | `QItemSelectionModel.Rows` | `0x0020` | 所有索引將擴大到跨越行。 | | `QItemSelectionModel.Columns` | `0x0040` | 所有索引將擴大到跨列。 | | `QItemSelectionModel.SelectCurrent` | `Select &#124; Current` | 選擇和電流的組合,提供了方便。 | | `QItemSelectionModel.ToggleCurrent` | `Toggle &#124; Current` | 切換和電流的組合,提供了方便。 | | `QItemSelectionModel.ClearAndSelect` | `Clear &#124; Select` | 清除和選擇的組合,提供了方便。 | 該SelectionFlags類型是一個typedef為[QFlags](index.htm)\u003cSelectionFlag\u003e 。它存儲SelectionFlag值的或組合。 * * * ## Method Documentation ``` QItemSelectionModel.__init__ (self, QAbstractItemModel?model) ``` 構造一個運行在指定項目的選擇模型_model_。 ``` QItemSelectionModel.__init__ (self, QAbstractItemModel?model, QObject?parent) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個運行在指定項目的選擇模型_model_同_parent_。 ``` QItemSelectionModel.clear (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void clear()`。 清除選擇模型。發射[selectionChanged](qitemselectionmodel.html#selectionChanged)()和[currentChanged](qitemselectionmodel.html#currentChanged)( ) 。 ``` QItemSelectionModel.clearSelection (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void clearSelection()`。 清除選擇中的選擇模型。發射[selectionChanged](qitemselectionmodel.html#selectionChanged)( ) 。 這個函數中引入了Qt 4.2中。 ``` bool QItemSelectionModel.columnIntersectsSelection (self, int?column, QModelIndex?parent) ``` 如果在所選擇的任何項目,則返回True_column_用給定的_parent_。 ``` QModelIndex QItemSelectionModel.currentIndex (self) ``` [ 返回模型項指數目前的項目,或無效的索引,如果沒有當前項目。 ](qmodelindex.html) [**See also**](qmodelindex.html) [setCurrentIndex](qitemselectionmodel.html#setCurrentIndex)( ) 。 ``` QItemSelectionModel.emitSelectionChanged (self, QItemSelection?newSelection, QItemSelection?oldSelection) ``` 比較了兩種選擇_newSelection_和_oldSelection_并發出[selectionChanged](qitemselectionmodel.html#selectionChanged)( )與取消和選定的項目。 ``` bool QItemSelectionModel.hasSelection (self) ``` 返回True如果選擇模型中包含的任何選擇的范圍,否則返回False 。 這個函數中引入了Qt 4.2中。 ``` bool QItemSelectionModel.isColumnSelected (self, int?column, QModelIndex?parent) ``` 如果所有項目中被選中,則返回True_column_用給定的_parent_。 注意,這個函數通常比調用更快[isSelected](qitemselectionmodel.html#isSelected)()在同一列中,并且所有的項目不可選擇的數據項都被忽略。 ``` bool QItemSelectionModel.isRowSelected (self, int?row, QModelIndex?parent) ``` 如果所有項目中被選中,則返回True_row_用給定的_parent_。 注意,這個函數通常比調用更快[isSelected](qitemselectionmodel.html#isSelected)()在同一行和所有項目不可選擇的數據項都被忽略。 ``` bool QItemSelectionModel.isSelected (self, QModelIndex?index) ``` 返回True如果給定的模型項目_index_被選中。 ``` QAbstractItemModel QItemSelectionModel.model (self) ``` [ 返回由選擇模型上操作的項目模型。 ``` QItemSelectionModel.reset (self) ``` 這種方法也是一個Qt槽與C + +的簽名`void reset()`。 清除選擇模型。不發射任何信號。 ``` bool QItemSelectionModel.rowIntersectsSelection (self, int?row, QModelIndex?parent) ``` 如果在所選擇的任何項目,則返回True_row_用給定的_parent_。 ``` QItemSelectionModel.select (self, QModelIndex?index, SelectionFlags?command) ``` 這種方法也是一個Qt槽與C + +的簽名`void select(const QModelIndex&,QItemSelectionModel::SelectionFlags)`。 ](qabstractitemmodel.html) [選擇模型項目_index_使用指定的_command_,并發射](qabstractitemmodel.html)[selectionChanged](qitemselectionmodel.html#selectionChanged)( ) 。 **See also** [QItemSelectionModel.SelectionFlags](qitemselectionmodel.html#SelectionFlag-enum)。 ``` QItemSelectionModel.select (self, QItemSelection?selection, SelectionFlags?command) ``` 這種方法也是一個Qt槽與C + +的簽名`void select(const QItemSelection&,QItemSelectionModel::SelectionFlags)`。 選擇項目_selection_使用指定的_command_,并發射[selectionChanged](qitemselectionmodel.html#selectionChanged)( ) 。 **See also** [QItemSelectionModel.SelectionFlag](qitemselectionmodel.html#SelectionFlag-enum)。 ``` list-of-QModelIndex QItemSelectionModel.selectedColumns (self, int?row?=?0) ``` 返回該索引中的給定_row_對其中所有行被選中的列。 這個函數中引入了Qt 4.2中。 **See also** [selectedIndexes](qitemselectionmodel.html#selectedIndexes)()和[selectedRows](qitemselectionmodel.html#selectedRows)( ) 。 ``` list-of-QModelIndex QItemSelectionModel.selectedIndexes (self) ``` 返回所有選定的模型項目索引的列表。該列表包含沒有重復,并沒有排序。 ``` list-of-QModelIndex QItemSelectionModel.selectedRows (self, int?column?=?0) ``` 返回該索引中的給定_column_對所有列被選中的行。 這個函數中引入了Qt 4.2中。 **See also** [selectedIndexes](qitemselectionmodel.html#selectedIndexes)()和[selectedColumns](qitemselectionmodel.html#selectedColumns)( ) 。 ``` QItemSelection QItemSelectionModel.selection (self) ``` [ 返回存儲在選擇模型的選擇范圍。 ``` QItemSelectionModel.setCurrentIndex (self, QModelIndex?index, SelectionFlags?command) ``` 這種方法也是一個Qt槽與C + +的簽名`void setCurrentIndex(const QModelIndex&,QItemSelectionModel::SelectionFlags)`。 ](qitemselection.html) [設定模型項目_index_為當前項目,并發射](qitemselection.html)[currentChanged](qitemselectionmodel.html#currentChanged)( ) 。目前項目用于鍵盤導航和焦點指示,它是獨立于任何選定的項目,雖然選擇的項目也可以是當前項目。 根據指定的_command_時,_index_也可以成為當前選擇的一部分。 **See also** [currentIndex](qitemselectionmodel.html#currentIndex)()和[select](qitemselectionmodel.html#select)( ) 。 * * * ## Qt Signal Documentation ``` void currentChanged (const QModelIndex&,const QModelIndex&) ``` 這是該信號的默認超載。 這個信號被發射時的當前項的變化。該_previous_模型項目指標被替換_current_指標作為選擇的當前項。 請注意,當產品模型被重新設定此信號將不被發射。 **See also** [currentIndex](qitemselectionmodel.html#currentIndex)( )[setCurrentIndex](qitemselectionmodel.html#setCurrentIndex)()和[selectionChanged](qitemselectionmodel.html#selectionChanged)( ) 。 ``` void currentColumnChanged (const QModelIndex&,const QModelIndex&) ``` 這是該信號的默認超載。 這個信號被發射,如果_current_項目的變化和它的列是不同的列_previous_目前的項目。 請注意,當產品模型被重新設定此信號將不被發射。 **See also** [currentChanged](qitemselectionmodel.html#currentChanged)( )[currentRowChanged](qitemselectionmodel.html#currentRowChanged)( )[currentIndex](qitemselectionmodel.html#currentIndex)()和[setCurrentIndex](qitemselectionmodel.html#setCurrentIndex)( ) 。 ``` void currentRowChanged (const QModelIndex&,const QModelIndex&) ``` 這是該信號的默認超載。 這個信號被發射,如果_current_項目的變化和它的行是不同的行_previous_目前的項目。 請注意,當產品模型被重新設定此信號將不被發射。 **See also** [currentChanged](qitemselectionmodel.html#currentChanged)( )[currentColumnChanged](qitemselectionmodel.html#currentColumnChanged)( )[currentIndex](qitemselectionmodel.html#currentIndex)()和[setCurrentIndex](qitemselectionmodel.html#setCurrentIndex)( ) 。 ``` void selectionChanged (const QItemSelection&,const QItemSelection&) ``` 這是該信號的默認超載。 這個信號被發射時的選擇改變。在選擇的變化被表示為一個項目的選擇_deselected_項目和項目的選擇_selected_項目。 請注意,目前指數從選擇獨立的變化。還要注意的是,當該項目模型復位這個信號將不發射。 **See also** [select](qitemselectionmodel.html#select)()和[currentChanged](qitemselectionmodel.html#currentChanged)( ) 。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看