Changeset View
Changeset View
Standalone View
Standalone View
src/kbusyindicatorwidget.cpp
Show All 28 Lines | |||||
29 | 29 | | |||
30 | class KBusyIndicatorWidgetPrivate | 30 | class KBusyIndicatorWidgetPrivate | ||
31 | { | 31 | { | ||
32 | public: | 32 | public: | ||
33 | KBusyIndicatorWidgetPrivate(KBusyIndicatorWidget *parent) | 33 | KBusyIndicatorWidgetPrivate(KBusyIndicatorWidget *parent) | ||
34 | : q(parent) | 34 | : q(parent) | ||
35 | { | 35 | { | ||
36 | animation.setLoopCount(-1); | 36 | animation.setLoopCount(-1); | ||
37 | animation.setDuration(1500); | 37 | animation.setDuration(2000); | ||
38 | animation.setStartValue(0); | 38 | animation.setStartValue(0); | ||
39 | animation.setEndValue(360); | 39 | animation.setEndValue(360); | ||
40 | QObject::connect(&animation, &QVariantAnimation::valueChanged, | 40 | QObject::connect(&animation, &QVariantAnimation::valueChanged, | ||
41 | q, [=](QVariant value) { | 41 | q, [=](QVariant value) { | ||
42 | rotation = value.toReal(); | 42 | rotation = value.toReal(); | ||
43 | q->update(); // repaint new rotation | 43 | q->update(); // repaint new rotation | ||
44 | }); | 44 | }); | ||
45 | } | 45 | } | ||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |