<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # QVariantAnimation Class Reference ## [[QtCore](index.htm) module] 該QVariantAnimation類提供了動畫的抽象基類。[More...](#details) 繼承[QAbstractAnimation](qabstractanimation.html)。 通過繼承[QPropertyAnimation](qpropertyanimation.html)。 ### Methods * `__init__ (self, QObject?parent?=?None)` * `QVariant currentValue (self)` * `int duration (self)` * `QEasingCurve easingCurve (self)` * `QVariant endValue (self)` * `bool event (self, QEvent?event)` * `QVariant interpolated (self, QVariant?from, QVariant?to, float?progress)` * `QVariant keyValueAt (self, float?step)` * `list-of-tuple-of-float-QVariant keyValues (self)` * `setDuration (self, int?msecs)` * `setEasingCurve (self, QEasingCurve?easing)` * `setEndValue (self, QVariant?value)` * `setKeyValueAt (self, float?step, QVariant?value)` * `setKeyValues (self, list-of-tuple-of-float-QVariant?values)` * `setStartValue (self, QVariant?value)` * `QVariant startValue (self)` * `updateCurrentTime (self, int)` * `updateCurrentValue (self, QVariant?value)` * `updateState (self, QAbstractAnimation.State?newState, QAbstractAnimation.State?oldState)` ### Qt Signals * `void valueChanged (const QVariant&)` * * * ## Detailed Description 該QVariantAnimation類提供了動畫的抽象基類。 這個類是一部分[The Animation Framework](index.htm)。它可以作為財產和物品的動畫一個基類,與共享的功能函數。 QVariantAnimation不能直接使用,因為它是一個抽象類,它有一個叫做純虛方法[updateCurrentValue](qvariantanimation.html#updateCurrentValue)( ) 。這個類在執行插值[QVariant](qvariant.html)秒,但保留使用插值到其子類。目前, Qt提供[QPropertyAnimation](qpropertyanimation.html),這動畫的Qt[properties](index.htm#qt-s-property-system)。請參閱[QPropertyAnimation](qpropertyanimation.html)類描述,如果您希望進行動畫該等物業。 然后,您可以通過調用設置該屬性開始和結束值[setStartValue](qvariantanimation.html#startValue-prop)()和[setEndValue](qvariantanimation.html#endValue-prop)( ) ,最后調用[start](qabstractanimation.html#start)()來啟動動畫。 QVariantAnimation將插在目標對象的屬性,放出[valueChanged](qvariantanimation.html#valueChanged)( ) 。反應在電流值的變化,你必須重新實現[updateCurrentValue](qvariantanimation.html#updateCurrentValue)( )虛函數。 另外,也可以在位于起始和結束值之間規定的步驟來設定值。那么插值會觸及這些點在指定的步驟。注意,開始和結束的值在0.0和1.0中定義的鍵值。 有兩種方式會影響QVariantAnimation如何插值的值。你可以通過調用設置緩動曲線[setEasingCurve](qvariantanimation.html#easingCurve-prop)( ) ,并配置持續時間通過調用[setDuration](qvariantanimation.html#duration-prop)( ) 。您可以更改的[QVariants](index.htm#qvariants)通過創建QVariantAnimation的子類,并重新實現虛擬內插[interpolated](qvariantanimation.html#interpolated)()函數。 子類QVariantAnimation可以是一個選擇,如果你有[QVariant](qvariant.html)s表示你不希望聲明為Qt的屬性。但請注意,您在大多數情況下會有所改善您的聲明[QVariant](qvariant.html)作為一個屬性。 不是所有的[QVariant](qvariant.html)類型的支持。下面是當前支持的列表[QVariant](qvariant.html)類型: * [Int](qmetatype.html#Type-enum) * [Double](qmetatype.html#Type-enum) * [Float](qmetatype.html#Type-enum) * [QLine](qmetatype.html#Type-enum) * [QLineF](qmetatype.html#Type-enum) * [QPoint](qmetatype.html#Type-enum) * [QPointF](qmetatype.html#Type-enum) * [QSize](qmetatype.html#Type-enum) * [QSizeF](qmetatype.html#Type-enum) * [QRect](qmetatype.html#Type-enum) * [QRectF](qmetatype.html#Type-enum) * [QColor](qmetatype.html#Type-enum) 如果您需要進行插值其它不同的類型,包括自定義類型,你必須實現插值為這些自己。要做到這一點,你可以為一個給定類型注冊一個插補功能。這個函數有3個參數:起始值,結束值和目前的進展。 例如: ``` [QVariant](qvariant.html) myColorInterpolator(const [QColor](qcolor.html) &start, const [QColor](qcolor.html) &end, [qreal](index.htm#qreal-typedef) progress) { ... return [QColor](qcolor.html)(...); } ... qRegisterAnimationInterpolator<[QColor](qcolor.html)>(myColorInterpolator); ``` 另一種選擇是重新實現[interpolated](qvariantanimation.html#interpolated)( ),它返回插補值進行插補值。 * * * ## Method Documentation ``` QVariantAnimation.__init__ (self, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構建[QVariantAnimation](qvariantanimation.html)對象。_parent_被傳遞給[QAbstractAnimation](qabstractanimation.html)的構造。 ``` QVariant QVariantAnimation.currentValue (self) ``` ``` int QVariantAnimation.duration (self) ``` ``` QEasingCurve QVariantAnimation.easingCurve (self) ``` [ ``` QVariant QVariantAnimation.endValue (self) ``` ``` bool QVariantAnimation.event (self, QEvent?event) ``` ](qeasingcurve.html) [從重新實現](qeasingcurve.html)[QObject.event](qobject.html#event)( ) 。 ``` QVariant QVariantAnimation.interpolated (self, QVariant?from, QVariant?to, float?progress) ``` 這個虛函數返回變體之間的線性插值_from_和_to_在_progress_, 0和1之間,通常的值。您可以在子類中重新實現這個功能[QVariantAnimation](qvariantanimation.html)提供自己的插值算法。 需要注意的是,為了使內插至一個工作[QEasingCurve](qeasingcurve.html)返回一個值大于0小于1 (如更小或更大[QEasingCurve.InBack](qeasingcurve.html#Type-enum)),你應該確保它能夠推斷。如果數據類型的語義不容許外推這個功能應該處理的優雅。 你應該調用[QVariantAnimation](qvariantanimation.html)如果你想讓你的類來處理已經支持Qt的類型實現此功能(見類[QVariantAnimation](qvariantanimation.html)說明支持的類型的列表) 。 **See also** [QEasingCurve](qeasingcurve.html)。 ``` QVariant QVariantAnimation.keyValueAt (self, float?step) ``` 返回關鍵幀值給定的_step_。給定_step_必須是范圍為0到1。如果不存在[KeyValue](qvariantanimation.html#KeyValue-typedef)為_step_,它返回一個無效的[QVariant](qvariant.html)。 **See also** [keyValues](qvariantanimation.html#keyValues)()和[setKeyValueAt](qvariantanimation.html#setKeyValueAt)( ) 。 ``` list-of-tuple-of-float-QVariant QVariantAnimation.keyValues (self) ``` 返回此動畫的關鍵幀。 **See also** [keyValueAt](qvariantanimation.html#keyValueAt)()和[setKeyValues](qvariantanimation.html#setKeyValues)( ) 。 ``` QVariantAnimation.setDuration (self, int?msecs) ``` ``` QVariantAnimation.setEasingCurve (self, QEasingCurve?easing) ``` ``` QVariantAnimation.setEndValue (self, QVariant?value) ``` ``` QVariantAnimation.setKeyValueAt (self, float?step, QVariant?value) ``` 創建一個關鍵幀在給定的_step_用給定的_value_。給定_step_必須是范圍為0到1。 **See also** [setKeyValues](qvariantanimation.html#setKeyValues)()和[keyValueAt](qvariantanimation.html#keyValueAt)( ) 。 ``` QVariantAnimation.setKeyValues (self, list-of-tuple-of-float-QVariant?values) ``` 替換當前設置關鍵幀與給定_keyValues_。的關鍵幀的步驟必須在范圍0到1。 **See also** [keyValues](qvariantanimation.html#keyValues)()和[keyValueAt](qvariantanimation.html#keyValueAt)( ) 。 ``` QVariantAnimation.setStartValue (self, QVariant?value) ``` ``` QVariant QVariantAnimation.startValue (self) ``` ``` QVariantAnimation.updateCurrentTime (self, int) ``` 從重新實現[QAbstractAnimation.updateCurrentTime](qabstractanimation.html#updateCurrentTime)( ) 。 ``` QVariantAnimation.updateCurrentValue (self, QVariant?value) ``` 這種方法是抽象的,應在任何子類中重新實現。 這個純虛函數被調用每次動畫的當前值的變化。該_value_參數是新的當前值。 **See also** [currentValue](qvariantanimation.html#currentValue-prop)。 ``` QVariantAnimation.updateState (self, QAbstractAnimation.State?newState, QAbstractAnimation.State?oldState) ``` 從重新實現[QAbstractAnimation.updateState](qabstractanimation.html#updateState)( ) 。 * * * ## Qt Signal Documentation ``` void valueChanged (const QVariant&) ``` 這是該信號的默認超載。 [QVariantAnimation](qvariantanimation.html)發出這個信號時的當前_value_變化。 **See also** [currentValue](qvariantanimation.html#currentValue-prop),[startValue](qvariantanimation.html#startValue-prop)和[endValue](qvariantanimation.html#endValue-prop)。
                  <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>

                              哎呀哎呀视频在线观看