亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? qtimeline.cpp

?? QT 開發環境里面一個很重要的文件
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.**** This file is part of the QtCore module of the Qt Toolkit.**** This file may be used under the terms of the GNU General Public** License version 2.0 as published by the Free Software Foundation** and appearing in the file LICENSE.GPL included in the packaging of** this file.  Please review the following information to ensure GNU** General Public Licensing requirements will be met:** http://www.trolltech.com/products/qt/opensource.html**** If you are unsure which license is appropriate for your use, please** review the following information:** http://www.trolltech.com/products/qt/licensing.html or contact the** sales department at sales@trolltech.com.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#include "qtimeline.h"#include <private/qobject_p.h>#include <QtCore/qdatetime.h>#include <QtCore/qcoreevent.h>#include <math.h>static const qreal pi = 3.14159265359;static const qreal halfPi = pi / 2.0;static inline qreal qt_sinProgress(qreal value){    return ::sin((value * pi) - halfPi) / 2.0 + 0.5;}static inline qreal qt_smoothBeginEndMixFactor(qreal value){    return qMin(qMax((1.0 - value * 2.0 + 0.3), 0.0), 1.0);}class QTimeLinePrivate : public QObjectPrivate{    Q_DECLARE_PUBLIC(QTimeLine)public:    inline QTimeLinePrivate()        : startTime(0), duration(1000), startFrame(0), endFrame(0),          updateInterval(1000 / 25),          totalLoopCount(1), currentLoopCount(0), currentTime(0), timerId(0),          direction(QTimeLine::Forward), curveShape(QTimeLine::EaseInOutCurve),          state(QTimeLine::NotRunning)    { }    int startTime;    int duration;    int startFrame;    int endFrame;    int updateInterval;    int totalLoopCount;    int currentLoopCount;    int currentTime;    int timerId;    QTime timer;    QTimeLine::Direction direction;    QTimeLine::CurveShape curveShape;    QTimeLine::State state;    inline void setState(QTimeLine::State newState)    {        Q_Q(QTimeLine);        if (newState != state)            emit q->stateChanged(state = newState);    }    void setCurrentTime(int msecs);};/*!    \internal*/void QTimeLinePrivate::setCurrentTime(int msecs){    Q_Q(QTimeLine);    if (msecs == currentTime)        return;    qreal lastValue = q->currentValue();    int lastFrame = q->currentFrame();    currentTime = msecs;    while (currentTime < 0)        currentTime += duration;    bool looped = (msecs < 0 || msecs > duration);    currentTime %= (duration + 1);    if (looped)        ++currentLoopCount;    bool finished = false;    if (totalLoopCount && looped && currentLoopCount >= totalLoopCount) {        finished = true;        currentTime = (direction == QTimeLine::Backward) ? 0 : duration;    }    if (lastValue != q->currentValue())        emit q->valueChanged(q->currentValue());    if (lastFrame != q->currentFrame())        emit q->frameChanged(q->currentFrame());    if (finished) {        emit q->finished();        q->stop();    }}/*!    \class QTimeLine    \brief The QTimeLine class provides a timeline for controlling animations.    \since 4.2    \ingroup multimedia    It's most commonly used to animate a GUI control by calling a slot    periodically. You can construct a timeline by passing its duration in    milliseconds to QTimeLine's constructor. The timeline's duration describes    for how long the animation will run. Then you set a suitable frame range    by calling setFrameRange(). Finally connect the frameChanged() signal to a    suitable slot in the widget you wish to animate (e.g., setValue() in    QProgressBar). When you proceed to calling start(), QTimeLine will enter    Running state, and start emitting frameChanged() at regular intervals,    causing your widget's connected property's value to grow from the lower    end to the upper and of your frame range, at a steady rate. You can    specify the update interval by calling setUpdateInterval(). When done,    QTimeLine enters NotRunning state, and emits finished().    Example:    \code        ...        progressBar = new QProgressBar(this);        progressBar->setRange(0, 100);        // Construct a 1-second timeline with a frame range of 0 - 100        QTimeLine *timeLine = new QTimeLine(1000, this);        timeLine->setFrameRange(0, 100);        connect(timeLine, SIGNAL(frameChanged(int)), progressBar, SLOT(setValue(int)));        // Clicking the pushbutton will start the progress bar animation        pushButton = new QPushButton(tr("Start animation"), this);        connect(pushButton, SIGNAL(clicked()), timeLine, SLOT(start()));        ...    \endcode    You can also use QTimeLine with the     \l{Graphics View}{Graphics View framework} for    animations. The QGraphicsItemAnimation class implements animation    of \l{QGraphicsItem}{QGraphicsItems} with a timeline.    By default the timeline runs once, from the beginning and towards the end,    upon which you must call start() again to restart from the beginning. To    make the timeline loop, you can call setLoopCount(), passing the number of    times the timeline should run before finishing. The direction can also be    changed, causing the timeline to run backward, by calling    setDirection(). You can also pause and unpause the timeline while it's    running by calling setPaused(). For interactive control, the    setCurrentTime() function is provided, which sets the time position of the    time line directly. Although most useful in NotRunning state, (e.g.,    connected to a valueChanged() signal in a QSlider,) this function can be    called at any time.    The frame interface is useful for standard widgets, but QTimeLine can be    used to control any type of animation. The heart of QTimeLine lies in the    valueForTime() function, which generates a \e value between 0 and 1 for a    given time. This value is typically used to describe the steps of an    animation, where 0 is the first step of an animation, and 1 is the last    step. When running, QTimeLine generates values between 0 and 1 by calling    valueForTime() and emitting valueChanged(). By default, valueForTime()    applies an interpolation algorithm to generate these value. You can choose    from a set of predefined timeline algorithms by calling    setCurveShape(). By default, QTimeLine uses the EaseInOut curve shape,    which provides a value that grows slowly, then grows steadily, and    finally grows slowly. For a custom timeline, you can reimplement    valueForTime(), in which case QTimeLine's curveShape property is ignored.    \sa QProgressBar, QProgressDialog, QGraphicsItemAnimation*//*!    \enum QTimeLine::State    This enum describes the state of the timeline.    \value NotRunning The timeline is not running. This is the initial state    of QTimeLine, and the state QTimeLine reenters when finished. The current    time, frame and value remain unchanged until either setCurrentTime() is    called, or the timeline is started by calling start().    \value Paused The timeline is paused (i.e., temporarily    suspended). Calling setPaused(false) will resume timeline activity.    \value Running The timeline is running. While control is in the event    loop, QTimeLine will update its current time at regular intervals,    emitting valueChanged() and frameChanged() when appropriate.    \sa state(), stateChanged()*//*!    \enum QTimeLine::Direction    This enum describes the direction of the timeline when in \l Running state.    \value Forward The current time of the timeline increases with time (i.e.,    moves from 0 and towards the end / duration).    \value Backward The current time of the timeline decreases with time (i.e.,    moves from the end / duration and towards 0).    \sa setDirection()*//*!    \enum QTimeLine::CurveShape    This enum describes the default shape of QTimeLine's value curve. The    default, shape is EaseInOutCurve. The curve defines the relation    between the value and the timeline.    \value EaseInCurve The value starts growing slowly, then increases in speed.    \value EaseOutCurve The value starts growing steadily, then ends slowly.    \value EaseInOutCurve The value starts growing slowly, the runs steadily, then grows slowly again.    \value LinearCurve The value grows linearly (e.g., if the duration is 1000 ms,           the value at time 500 ms is 0.5).    \value SineCurve The value grows sinusoidally.    \sa setCurveShape()*//*!    \fn QTimeLine::valueChanged(qreal value)    QTimeLine emits this signal at regular intervals when in \l Running state,    but only if the current value changes. \a value is the current value. \a value is    a number between 0.0 and 1.0    \sa QTimeLine::setDuration(), QTimeLine::valueForTime(), QTimeLine::updateInterval*//*!    \fn QTimeLine::frameChanged(int frame)    QTimeLine emits this signal at regular intervals when in \l Running state,    but only if the current frame changes. \a frame is the current frame number.    \sa QTimeLine::setFrameRange(), QTimeLine::updateInterval*//*!    \fn QTimeLine::stateChanged(QTimeLine::State newState)    This signal is emitted whenever QTimeLine's state changes. The new state    is \a newState.*//*!    \fn QTimeLine::finished()    This signal is emitted when QTimeLine finishes (i.e., reaches the end of    its time line), and does not loop.*//*!    Constructs a timeline with a duration of \a duration milliseconds. \a    parent is passed to QObject's constructor. The default duration is 1000    milliseconds. */QTimeLine::QTimeLine(int duration, QObject *parent)    : QObject(*new QTimeLinePrivate, parent){    setDuration(duration);}/*!    Destroys the timeline. */QTimeLine::~QTimeLine(){}/*!    Returns the state of the timeline.    \sa start(), setPaused(), stop()*/QTimeLine::State QTimeLine::state() const{    Q_D(const QTimeLine);    return d->state;}/*!    \property QTimeLine::loopCount    \brief the number of times the timeline should loop before it's finished.    A loop count of of 0 means that the timeline will loop forever.*/int QTimeLine::loopCount() const{    Q_D(const QTimeLine);    return d->totalLoopCount;}void QTimeLine::setLoopCount(int count){    Q_D(QTimeLine);    d->totalLoopCount = count;}/*!    \property QTimeLine::direction    \brief the direction of the timeline when QTimeLine is in \l Running    state.    This direction indicates whether the time moves from 0 towards the    timeline duration, or from the value of the duration and towards 0 after    start() has been called.*/QTimeLine::Direction QTimeLine::direction() const{    Q_D(const QTimeLine);    return d->direction;}void QTimeLine::setDirection(Direction direction){    Q_D(QTimeLine);    d->direction = direction;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区高清精品免费观看| jlzzjlzz国产精品久久| aa级大片欧美| 91.麻豆视频| 一区二区三区在线视频观看58| 激情综合色播五月| 欧美日韩一区 二区 三区 久久精品| 久久新电视剧免费观看| 日韩电影在线一区二区三区| 色综合一区二区| 国产精品久久久久久久第一福利 | 国产精品久久久久毛片软件| 日韩av一区二区在线影视| 色女孩综合影院| 久久久国产精华| 精品一区二区三区蜜桃| 欧美人体做爰大胆视频| 亚洲一区二区三区中文字幕| 99久久精品免费精品国产| 欧美精品一区二区在线观看| 亚洲成a人片综合在线| 日本高清不卡视频| 一区二区三区国产豹纹内裤在线| 成人网页在线观看| 国产精品美女久久久久aⅴ| 美国av一区二区| 日韩亚洲欧美在线| 久久99精品久久只有精品| 欧美人与禽zozo性伦| 香蕉乱码成人久久天堂爱免费| 日本韩国一区二区三区视频| 国产精品乱码人人做人人爱| 九色porny丨国产精品| 精品国产制服丝袜高跟| 久久99国内精品| 久久这里只精品最新地址| 激情文学综合插| 中文文精品字幕一区二区| 国产99久久久精品| 17c精品麻豆一区二区免费| 99精品在线观看视频| 一区二区三区资源| 91精品综合久久久久久| 狂野欧美性猛交blacked| 欧美大片日本大片免费观看| 国产麻豆欧美日韩一区| 国产日本一区二区| 色香蕉久久蜜桃| 偷偷要91色婷婷| 2020国产精品| 99久久精品国产一区| 亚洲午夜久久久久| 精品福利一区二区三区免费视频| 国产精一区二区三区| 综合久久国产九一剧情麻豆| 欧美日韩中文字幕一区| 紧缚捆绑精品一区二区| 欧美激情一区二区在线| 欧美三级视频在线播放| 经典三级视频一区| 一区二区三区在线不卡| 欧美一区二区三区爱爱| 国产成a人亚洲| 亚洲一卡二卡三卡四卡| 久久久蜜臀国产一区二区| 97久久精品人人澡人人爽| 免费黄网站欧美| 最近日韩中文字幕| 日韩三级在线免费观看| 99久久精品国产麻豆演员表| 六月丁香婷婷色狠狠久久| 亚洲视频网在线直播| 欧美zozo另类异族| 欧美在线观看一区| 国产成人综合视频| 日本亚洲免费观看| 亚洲欧美一区二区久久| 久久女同精品一区二区| 欧美精品日日鲁夜夜添| 成人免费视频网站在线观看| 视频一区视频二区中文字幕| 中文字幕一区二| 久久伊人蜜桃av一区二区| 欧美日韩一区二区三区免费看| 国产成人av电影在线观看| 丝袜美腿一区二区三区| 亚洲精品第1页| 日本一区二区视频在线观看| 欧美一区二区国产| 欧美剧情片在线观看| caoporen国产精品视频| 国产精品一色哟哟哟| 免费成人在线网站| 丝袜美腿亚洲综合| 亚洲va欧美va人人爽午夜| 亚洲特级片在线| 中文子幕无线码一区tr| 国产欧美一区二区三区在线看蜜臀| 日韩一卡二卡三卡国产欧美| 欧美主播一区二区三区美女| 91片在线免费观看| 99久久久久久| 97精品久久久午夜一区二区三区| 粉嫩嫩av羞羞动漫久久久| 极品少妇xxxx精品少妇| 九九国产精品视频| 极品少妇一区二区| 国产尤物一区二区| 国产精品伊人色| 高清在线观看日韩| 岛国精品在线播放| jlzzjlzz国产精品久久| voyeur盗摄精品| 一本一道久久a久久精品| 91免费版在线| 在线影院国内精品| 欧美男女性生活在线直播观看| 欧美三级视频在线观看| 欧美浪妇xxxx高跟鞋交| 日韩视频免费观看高清在线视频| 91精品欧美一区二区三区综合在| 欧美一区日韩一区| 久久久www成人免费毛片麻豆| 国产日韩精品一区二区浪潮av| 亚洲国产精品v| 夜夜操天天操亚洲| 日韩电影免费在线| 国内精品国产成人国产三级粉色| 国产一区在线观看视频| 国产不卡一区视频| 91老师片黄在线观看| 欧美日韩和欧美的一区二区| 91精品国产综合久久国产大片| 日韩一区二区三区av| 久久久91精品国产一区二区三区| 国产亚洲短视频| 一区2区3区在线看| 精品一区二区三区在线观看| 成人丝袜高跟foot| 欧美三区在线视频| 2021久久国产精品不只是精品| ...中文天堂在线一区| 日韩黄色片在线观看| 国产一区福利在线| 色婷婷av一区二区三区大白胸| 在线视频中文字幕一区二区| 欧美一卡二卡三卡四卡| 中文久久乱码一区二区| 午夜精品一区二区三区三上悠亚| 精品一区二区三区免费视频| 99久久er热在这里只有精品15 | 欧美一二三区精品| 国产视频一区不卡| 亚洲动漫第一页| 国产盗摄一区二区三区| 91高清视频免费看| 国产偷国产偷亚洲高清人白洁| 日韩美女视频一区| 国产最新精品精品你懂的| 色婷婷久久99综合精品jk白丝| 精品精品国产高清一毛片一天堂| 亚洲欧美欧美一区二区三区| 久久国产精品第一页| 一本久久综合亚洲鲁鲁五月天 | 亚洲嫩草精品久久| 国产在线视频一区二区三区| 91国产福利在线| 国产精品欧美久久久久无广告| 亚洲bt欧美bt精品777| www.久久久久久久久| 亚洲精品一区二区三区四区高清| 亚洲愉拍自拍另类高清精品| 国产成人在线免费| 日韩精品一区二区三区四区视频| 亚洲制服丝袜在线| 不卡电影免费在线播放一区| 久久女同互慰一区二区三区| 日韩成人一级片| 欧美精品乱人伦久久久久久| 中文字幕一区二区三区四区不卡 | 99精品视频中文字幕| 久久久国产精品麻豆| 免费在线观看视频一区| 欧美日韩视频在线第一区 | 91网站在线播放| 国产精品婷婷午夜在线观看| 国产一区二区精品在线观看| 日韩欧美国产一区二区在线播放 | 亚洲精品国产第一综合99久久| 国产91精品欧美| 国产日韩高清在线| 国产 欧美在线| 国产精品久线观看视频| 成人看片黄a免费看在线| 国产欧美视频一区二区| 成人高清视频在线| 国产精品久久久一本精品| 99re亚洲国产精品| 亚洲精品日日夜夜| 精品视频在线免费观看|