diff --git a/core/dplugins/generic/view/presentation/common/presentationcontainer.h b/core/dplugins/generic/view/presentation/common/presentationcontainer.h
--- a/core/dplugins/generic/view/presentation/common/presentationcontainer.h
+++ b/core/dplugins/generic/view/presentation/common/presentationcontainer.h
@@ -84,6 +84,7 @@
bool printFileComments;
bool loop;
bool shuffle;
+ bool offAutoDelay;
QString effectName;
QString effectNameGL;
@@ -110,7 +111,7 @@
bool kbDisableFadeInOut;
bool kbDisableCrossFade;
uint cacheSize;
-
+
DInfoInterface* iface;
};
diff --git a/core/dplugins/generic/view/presentation/common/presentationcontainer.cpp b/core/dplugins/generic/view/presentation/common/presentationcontainer.cpp
--- a/core/dplugins/generic/view/presentation/common/presentationcontainer.cpp
+++ b/core/dplugins/generic/view/presentation/common/presentationcontainer.cpp
@@ -49,6 +49,7 @@
printFileComments = false;
loop = false;
shuffle = false;
+ offAutoDelay = false;
commentsFontColor = 0;
commentsBgColor = 0;
commentsDrawOutline = false;
@@ -67,7 +68,7 @@
kbDisableFadeInOut = false;
kbDisableCrossFade = false;
cacheSize = 0;
-
+
iface = 0;
}
diff --git a/core/dplugins/generic/view/presentation/dialogs/presentation_advpage.cpp b/core/dplugins/generic/view/presentation/dialogs/presentation_advpage.cpp
--- a/core/dplugins/generic/view/presentation/dialogs/presentation_advpage.cpp
+++ b/core/dplugins/generic/view/presentation/dialogs/presentation_advpage.cpp
@@ -67,6 +67,7 @@
m_kbDisableCrossfadeCheckBox->setChecked(m_sharedData->kbDisableCrossFade);
m_openGlFullScale->setChecked(m_sharedData->openGlFullScale);
m_openGlFullScale->setEnabled(m_sharedData->opengl);
+ m_useMillisecondsCheckBox->setEnabled(!m_sharedData->offAutoDelay); // MilliSeconds Checkbox in advanced page off when AutoDelay is On
slotUseMillisecondsToggled();
}
diff --git a/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.h b/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.h
--- a/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.h
+++ b/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.h
@@ -64,6 +64,7 @@
void slotOpenGLToggled();
void slotEffectChanged();
void slotDelayChanged(int);
+ void slotOffAutoDelay();
void slotPrintCommentsToggled();
void slotUseMillisecondsToggled();
void slotThumbnail(const LoadingDescription&, const QPixmap&);
diff --git a/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.cpp b/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.cpp
--- a/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.cpp
+++ b/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.cpp
@@ -130,6 +130,7 @@
m_printCommentsCheckBox->setChecked(d->sharedData->printFileComments);
m_loopCheckBox->setChecked(d->sharedData->loop);
m_shuffleCheckBox->setChecked(d->sharedData->shuffle);
+ m_offAutoDelayCheckBox->setChecked(d->sharedData->offAutoDelay);
m_delaySpinBox->setValue(d->sharedData->useMilliseconds ? d->sharedData->delay
: d->sharedData->delay / 1000);
@@ -160,6 +161,7 @@
d->sharedData->printFileComments = m_printCommentsCheckBox->isChecked();
d->sharedData->loop = m_loopCheckBox->isChecked();
d->sharedData->shuffle = m_shuffleCheckBox->isChecked();
+ d->sharedData->offAutoDelay = m_offAutoDelayCheckBox->isChecked();
if (!m_openglCheckBox->isChecked())
{
@@ -249,7 +251,14 @@
// Notify total time is changed
emit signalTotalTimeChanged(d->totalTime);
- m_label6->setText(i18np("%1 image [%2]", "%1 images [%2]", numberOfImages, totalDuration.toString()));
+ if (m_offAutoDelayCheckBox->isChecked() == false)
+ {
+ m_label6->setText(i18np("%1 image [%2]", "%1 images [%2]", numberOfImages, totalDuration.toString()));
+ }
+ else
+ {
+ m_label6->setText(i18np("%1 image", "%1 images", numberOfImages));
+ }
}
void PresentationMainPage::loadEffectNames()
@@ -414,6 +423,14 @@
showNumberImages();
}
+void PresentationMainPage::slotOffAutoDelay()
+{
+ m_delaySpinBox->setEnabled(!m_offAutoDelayCheckBox->isChecked());
+ m_delayLabel->setEnabled(!m_offAutoDelayCheckBox->isChecked());
+ d->sharedData->advancedPage->m_useMillisecondsCheckBox->setEnabled(!m_offAutoDelayCheckBox->isChecked());
+ slotDelayChanged(0);
+}
+
void PresentationMainPage::slotUseMillisecondsToggled()
{
int delay = d->sharedData->delay;
@@ -484,6 +501,9 @@
connect(m_delaySpinBox, SIGNAL(valueChanged(int)),
this, SLOT(slotDelayChanged(int)));
+ connect(m_offAutoDelayCheckBox, SIGNAL(toggled(bool)),
+ this, SLOT(slotOffAutoDelay()));
+
connect(m_effectsComboBox, SIGNAL(activated(int)),
this, SLOT(slotEffectChanged()));
diff --git a/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.ui b/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.ui
--- a/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.ui
+++ b/core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.ui
@@ -185,6 +185,16 @@
+ -
+
+
+ <html><head/><body><p>Removes the auto-delay between images.</p></body></html>
+
+
+ Off Auto Delay
+
+
+
-
-
diff --git a/core/dplugins/generic/view/presentation/opengl/presentationgl.cpp b/core/dplugins/generic/view/presentation/opengl/presentationgl.cpp
--- a/core/dplugins/generic/view/presentation/opengl/presentationgl.cpp
+++ b/core/dplugins/generic/view/presentation/opengl/presentationgl.cpp
@@ -380,13 +380,13 @@
if (e->button() == Qt::LeftButton)
{
d->timer->stop();
- d->slideCtrlWidget->setPaused(true);
+ d->slideCtrlWidget->setPaused(!d->sharedData->offAutoDelay);
slotNext();
}
else if (e->button() == Qt::RightButton && d->fileIndex - 1 >= 0)
{
d->timer->stop();
- d->slideCtrlWidget->setPaused(true);
+ d->slideCtrlWidget->setPaused(!d->sharedData->offAutoDelay);
slotPrev();
}
}
@@ -855,6 +855,12 @@
if (d->random)
d->effect = getRandomEffect();
+ if (d->sharedData->offAutoDelay)
+ {
+ d->effect = &PresentationGL::effectNone;
+ d->timer->stop();
+ }
+
advanceFrame();
if (d->endOfShow)
@@ -875,6 +881,9 @@
update();
d->timer->start(d->timeout);
+
+ if (d->sharedData->offAutoDelay)
+ d->timer->stop();
}
void PresentationGL::slotMouseMoveTimeOut()
diff --git a/core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp b/core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp
--- a/core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp
+++ b/core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp
@@ -286,7 +286,16 @@
}
d->timer->setSingleShot(true);
- d->timer->start(10);
+
+ if (d->sharedData->offAutoDelay)
+ {
+ d->timer->stop();
+ slotTimeOut();
+ }
+ else
+ {
+ d->timer->start(10);
+ }
// -- hide cursor when not moved --------------------
@@ -599,13 +608,13 @@
if (e->button() == Qt::LeftButton)
{
d->timer->stop();
- d->slideCtrlWidget->setPaused(true);
+ d->slideCtrlWidget->setPaused(!d->sharedData->offAutoDelay);
slotNext();
}
else if (e->button() == Qt::RightButton && d->fileIndex - 1 >= 0)
{
d->timer->stop();
- d->slideCtrlWidget->setPaused(true);
+ d->slideCtrlWidget->setPaused(!d->sharedData->offAutoDelay);
slotPrev();
}
}
@@ -916,23 +925,30 @@
{
loadNextImage();
- if (d->currImage.isNull() || d->sharedData->urlList.isEmpty()) // End of slideshow ?
+ if (d->sharedData->offAutoDelay)
{
- showEndOfShow();
- return;
+ showCurrentImage();
}
-
- if (d->sharedData->effectName == QLatin1String("Random")) // Take a random effect.
+ else
{
- d->effect = getRandomEffect();
-
- if (!d->effect)
+ if (d->currImage.isNull() || d->sharedData->urlList.isEmpty()) // End of slideshow ?
+ {
+ showEndOfShow();
return;
- }
+ }
+
+ if (d->sharedData->effectName == QLatin1String("Random")) // Take a random effect.
+ {
+ d->effect = getRandomEffect();
+
+ if (!d->effect)
+ return;
+ }
- d->effectRunning = true;
+ d->effectRunning = true;
- tmout = (this->*d->effect)(true);
+ tmout = (this->*d->effect)(true);
+ }
}
if (tmout <= 0) // Effect finished -> delay.
@@ -941,7 +957,15 @@
d->effectRunning = false;
}
- d->timer->start(tmout);
+ if (d->sharedData->offAutoDelay)
+ {
+ d->timer->stop();
+ }
+ else
+ {
+ d->timer->setSingleShot(true);
+ d->timer->start(tmout);
+ }
}
void PresentationWidget::showCurrentImage()