- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
t1->addAnimation(new QPropertyAnimation(widget, "geometry"));
t1->addAnimation(new QPropertyAnimation(p1, "pos"));
t1->addAnimation(new QPropertyAnimation(p2, "pos"));
t1->addAnimation(new QPropertyAnimation(p3, "pos"));
t1->addAnimation(new QPropertyAnimation(p4, "pos"));
t1->addAnimation(new QPropertyAnimation(p5, "pos"));
t1->addAnimation(new QPropertyAnimation(p6, "pos"));
t1->addAnimation(new QPropertyAnimation(p1, "rotation"));
t1->addAnimation(new QPropertyAnimation(p2, "rotation"));
t1->addAnimation(new QPropertyAnimation(p3, "rotation"));
t1->addAnimation(new QPropertyAnimation(p4, "rotation"));
t1->addAnimation(new QPropertyAnimation(p5, "rotation"));
t1->addAnimation(new QPropertyAnimation(p6, "rotation"));
t1->addAnimation(new QPropertyAnimation(p1, "opacity"));
t1->addAnimation(new QPropertyAnimation(p2, "opacity"));
t1->addAnimation(new QPropertyAnimation(p3, "opacity"));
t1->addAnimation(new QPropertyAnimation(p4, "opacity"));
t1->addAnimation(new QPropertyAnimation(p5, "opacity"));
t1->addAnimation(new QPropertyAnimation(p6, "opacity"));
QAbstractTransition *t2 = state2->addTransition(button, SIGNAL(clicked()), state3);
t2->addAnimation(new QPropertyAnimation(box, "geometry"));
t2->addAnimation(new QPropertyAnimation(widget, "geometry"));
t2->addAnimation(new QPropertyAnimation(p1, "pos"));
t2->addAnimation(new QPropertyAnimation(p2, "pos"));
t2->addAnimation(new QPropertyAnimation(p3, "pos"));
t2->addAnimation(new QPropertyAnimation(p4, "pos"));
t2->addAnimation(new QPropertyAnimation(p5, "pos"));
t2->addAnimation(new QPropertyAnimation(p6, "pos"));
t2->addAnimation(new QPropertyAnimation(p1, "rotation"));
t2->addAnimation(new QPropertyAnimation(p2, "rotation"));
t2->addAnimation(new QPropertyAnimation(p3, "rotation"));
t2->addAnimation(new QPropertyAnimation(p4, "rotation"));
t2->addAnimation(new QPropertyAnimation(p5, "rotation"));
t2->addAnimation(new QPropertyAnimation(p6, "rotation"));
t2->addAnimation(new QPropertyAnimation(p1, "opacity"));
t2->addAnimation(new QPropertyAnimation(p2, "opacity"));
t2->addAnimation(new QPropertyAnimation(p3, "opacity"));
t2->addAnimation(new QPropertyAnimation(p4, "opacity"));
t2->addAnimation(new QPropertyAnimation(p5, "opacity"));
t2->addAnimation(new QPropertyAnimation(p6, "opacity"));
QAbstractTransition *t3 = state3->addTransition(button, SIGNAL(clicked()), state1);
t3->addAnimation(new QPropertyAnimation(box, "geometry"));
t3->addAnimation(new QPropertyAnimation(widget, "geometry"));
t3->addAnimation(new QPropertyAnimation(p1, "pos"));
t3->addAnimation(new QPropertyAnimation(p2, "pos"));
t3->addAnimation(new QPropertyAnimation(p3, "pos"));
t3->addAnimation(new QPropertyAnimation(p4, "pos"));
t3->addAnimation(new QPropertyAnimation(p5, "pos"));
t3->addAnimation(new QPropertyAnimation(p6, "pos"));
t3->addAnimation(new QPropertyAnimation(p1, "rotation"));
t3->addAnimation(new QPropertyAnimation(p2, "rotation"));
t3->addAnimation(new QPropertyAnimation(p3, "rotation"));
t3->addAnimation(new QPropertyAnimation(p4, "rotation"));
t3->addAnimation(new QPropertyAnimation(p5, "rotation"));
t3->addAnimation(new QPropertyAnimation(p6, "rotation"));
t3->addAnimation(new QPropertyAnimation(p1, "opacity"));
t3->addAnimation(new QPropertyAnimation(p2, "opacity"));
t3->addAnimation(new QPropertyAnimation(p3, "opacity"));
t3->addAnimation(new QPropertyAnimation(p4, "opacity"));
t3->addAnimation(new QPropertyAnimation(p5, "opacity"));
t3->addAnimation(new QPropertyAnimation(p6, "opacity"));
http://qt.gitorious.org/qt/qt/blobs/4.7/examples/animation/states/main.cpp
Пример использования Qt animation framework: образцовый быдлокод.
MyParanoya 19.04.2010 21:29 # +0.2
ты какбе намекаешь на циклы?
guest 19.04.2010 21:43 # −7.2
cfdev 20.04.2010 10:28 # 0
Говногость 20.04.2010 10:46 # 0
Мне вообще не нравятся создание чего либо со строковыми идентификатарами.
Я так понимаю потом к ним будет обращение по этим идентификаторам?
Тогда это медленно, сравнивать множество строк.
Говногость 20.04.2010 10:47 # 0
cfdev 20.04.2010 12:11 # 0
Говногость 20.04.2010 13:57 # 0
Lockal 20.04.2010 18:30 # 0
Говногость 20.04.2010 19:29 # 0
Говногость 20.04.2010 10:48 # −1