Differential D20840 Diff 57029 core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp
Changeset View
Changeset View
Standalone View
Standalone View
core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp
Context not available. | |||||
286 | } | 286 | } | ||
---|---|---|---|---|---|
287 | 287 | | |||
288 | d->timer->setSingleShot(true); | 288 | d->timer->setSingleShot(true); | ||
289 | d->timer->start(10); | 289 | | ||
290 | if (d->sharedData->offAutoDelay) | ||||
291 | { | ||||
292 | d->timer->stop(); | ||||
293 | slotTimeOut(); | ||||
294 | } | ||||
295 | else | ||||
296 | { | ||||
297 | d->timer->start(10); | ||||
298 | } | ||||
290 | 299 | | |||
291 | // -- hide cursor when not moved -------------------- | 300 | // -- hide cursor when not moved -------------------- | ||
292 | 301 | | |||
Context not available. | |||||
599 | if (e->button() == Qt::LeftButton) | 608 | if (e->button() == Qt::LeftButton) | ||
600 | { | 609 | { | ||
601 | d->timer->stop(); | 610 | d->timer->stop(); | ||
602 | d->slideCtrlWidget->setPaused(true); | 611 | d->slideCtrlWidget->setPaused(!d->sharedData->offAutoDelay); | ||
603 | slotNext(); | 612 | slotNext(); | ||
604 | } | 613 | } | ||
605 | else if (e->button() == Qt::RightButton && d->fileIndex - 1 >= 0) | 614 | else if (e->button() == Qt::RightButton && d->fileIndex - 1 >= 0) | ||
606 | { | 615 | { | ||
607 | d->timer->stop(); | 616 | d->timer->stop(); | ||
608 | d->slideCtrlWidget->setPaused(true); | 617 | d->slideCtrlWidget->setPaused(!d->sharedData->offAutoDelay); | ||
609 | slotPrev(); | 618 | slotPrev(); | ||
610 | } | 619 | } | ||
611 | } | 620 | } | ||
Context not available. | |||||
916 | { | 925 | { | ||
917 | loadNextImage(); | 926 | loadNextImage(); | ||
918 | 927 | | |||
919 | if (d->currImage.isNull() || d->sharedData->urlList.isEmpty()) // End of slideshow ? | 928 | if (d->sharedData->offAutoDelay) | ||
920 | { | 929 | { | ||
921 | showEndOfShow(); | 930 | showCurrentImage(); | ||
922 | return; | | |||
923 | } | 931 | } | ||
924 | 932 | else | |||
925 | if (d->sharedData->effectName == QLatin1String("Random")) // Take a random effect. | | |||
926 | { | 933 | { | ||
927 | d->effect = getRandomEffect(); | 934 | if (d->currImage.isNull() || d->sharedData->urlList.isEmpty()) // End of slideshow ? | ||
928 | 935 | { | |||
929 | if (!d->effect) | 936 | showEndOfShow(); | ||
930 | return; | 937 | return; | ||
931 | } | 938 | } | ||
939 | | ||||
940 | if (d->sharedData->effectName == QLatin1String("Random")) // Take a random effect. | ||||
941 | { | ||||
942 | d->effect = getRandomEffect(); | ||||
943 | | ||||
944 | if (!d->effect) | ||||
945 | return; | ||||
946 | } | ||||
932 | 947 | | |||
933 | d->effectRunning = true; | 948 | d->effectRunning = true; | ||
934 | 949 | | |||
935 | tmout = (this->*d->effect)(true); | 950 | tmout = (this->*d->effect)(true); | ||
951 | } | ||||
936 | } | 952 | } | ||
937 | 953 | | |||
938 | if (tmout <= 0) // Effect finished -> delay. | 954 | if (tmout <= 0) // Effect finished -> delay. | ||
Context not available. | |||||
941 | d->effectRunning = false; | 957 | d->effectRunning = false; | ||
942 | } | 958 | } | ||
943 | 959 | | |||
944 | d->timer->start(tmout); | 960 | if (d->sharedData->offAutoDelay) | ||
961 | { | ||||
962 | d->timer->stop(); | ||||
963 | } | ||||
964 | else | ||||
965 | { | ||||
966 | d->timer->setSingleShot(true); | ||||
967 | d->timer->start(tmout); | ||||
968 | } | ||||
945 | } | 969 | } | ||
946 | 970 | | |||
947 | void PresentationWidget::showCurrentImage() | 971 | void PresentationWidget::showCurrentImage() | ||
Context not available. |