当前位置: 首页>>代码示例>>C++>>正文


C++ QTimeLine::setEasingCurve方法代码示例

本文整理汇总了C++中QTimeLine::setEasingCurve方法的典型用法代码示例。如果您正苦于以下问题:C++ QTimeLine::setEasingCurve方法的具体用法?C++ QTimeLine::setEasingCurve怎么用?C++ QTimeLine::setEasingCurve使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QTimeLine的用法示例。


在下文中一共展示了QTimeLine::setEasingCurve方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: setTransformationAnchor

PhotoKitView::PhotoKitView(QWidget *parent) :
	QGraphicsView(parent),mPressed(false),mMachine(0),mCanTransform(true),mZoomOnMove(false)
{
	//setDragMode(QGraphicsView::NoDrag);
    //setAlignment(Qt::AlignBottom);
    //setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
    setTransformationAnchor(QGraphicsView::AnchorViewCenter);
    setResizeAnchor(QGraphicsView::AnchorUnderMouse);
    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); //TODO: always on when debug.
    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    //setBackgroundBrush(QBrush(Qt::gray));
	mScene = new PhotoKitScene(this);

	setRenderingSystem();
	mScene->setSceneRect(qApp->desktop()->rect());
	setScene(mScene);

	mMachine = new TransformMachine;//QGraphicsItemAnimation;
	connect(mMachine, SIGNAL(transformChanged(QTransform)), SLOT(doTransform(QTransform)));

	QTimeLine *timer = new QTimeLine(kAniDuration);
	timer->setEasingCurve(QEasingCurve::OutQuad);
	timer->setFrameRange(0, 100);
	mMachine->setTimeLine(timer);
}
开发者ID:BIbiLion,项目名称:PhotoKit,代码行数:25,代码来源:PhotoKitView.cpp

示例2: newAnim

QTimeLine* newAnim(Line* ball, int in, int to, QEasingCurve curve)
{
    QTimeLine *NewTimer = new QTimeLine(speed);
    NewTimer->setEasingCurve(curve);

    QGraphicsItemAnimation* anim = new QGraphicsItemAnimation();
    anim->setItem(ball);
    anim->setTimeLine(NewTimer);
    anim->setRotationAt(0, in);
    anim->setRotationAt(1, to);

    return NewTimer;
}
开发者ID:Xambey,项目名称:learning,代码行数:13,代码来源:main.cpp

示例3: QTimeLine

ItemAnimation::ItemAnimation(QGraphicsItem *item, QObject *parent) :
	QObject(parent),mHide(false),mFade(None)
{
	mMachine = new TransformMachine;//QGraphicsItemAnimation;
	QTimeLine *timer = new QTimeLine(1000);
	timer->setEasingCurve(QEasingCurve::OutQuad);
	timer->setFrameRange(0, 100);
	mMachine->setTimeLine(timer);
	connect(mMachine, SIGNAL(transformChanged(QTransform)), this, SLOT(setTransform(QTransform)));
	connect(mMachine, SIGNAL(zValueChanged(qreal)), this, SLOT(setZValue(qreal)));
	connect(mMachine, SIGNAL(posChanged(QPointF)), this, SLOT(setItemPos(QPointF)));
	connect(mMachine->timeLine(), SIGNAL(finished()), this, SLOT(tryHide()));
	connect(mMachine->timeLine(), SIGNAL(finished()), this, SIGNAL(finished()));

	setItem(item);
}
开发者ID:BIbiLion,项目名称:PhotoKit,代码行数:16,代码来源:ItemAnimation.cpp


注:本文中的QTimeLine::setEasingCurve方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。