|
|
|
@ -194,7 +194,7 @@ int kSlideShowSaver::effectMultiCircleOut(bool aInit)
|
|
|
|
|
pa.setPoint(0, mw>>1, mh>>1);
|
|
|
|
|
pa.setPoint(3, mw>>1, mh>>1);
|
|
|
|
|
mfy = sqrt((double)mw*mw + mh*mh) / 2;
|
|
|
|
|
mi = KApplication::random()%15 + 2;
|
|
|
|
|
mi = TDEApplication::random()%15 + 2;
|
|
|
|
|
mfd = M_PI*2/mi;
|
|
|
|
|
mAlpha = mfd;
|
|
|
|
|
mwait = 10 * mi;
|
|
|
|
@ -320,7 +320,7 @@ int kSlideShowSaver::effectMeltdown(bool aInit)
|
|
|
|
|
y = mIntArray[i];
|
|
|
|
|
if (y >= mh) continue;
|
|
|
|
|
done = false;
|
|
|
|
|
if ((KApplication::random()&15) < 6) continue;
|
|
|
|
|
if ((TDEApplication::random()&15) < 6) continue;
|
|
|
|
|
bitBlt(TQT_TQPAINTDEVICE(this), x, y+mdy, TQT_TQPAINTDEVICE(this), x, y, mdx, mh-y-mdy, CopyROP, true);
|
|
|
|
|
bitBlt(TQT_TQPAINTDEVICE(this), x, y, TQT_TQPAINTDEVICE(&mNextScreen), x, y, mdx, mdy, CopyROP, true);
|
|
|
|
|
mIntArray[i] += mdy;
|
|
|
|
@ -388,7 +388,7 @@ int kSlideShowSaver::effectSweep(bool aInit)
|
|
|
|
|
{
|
|
|
|
|
// subtype: 0=sweep right to left, 1=sweep left to right
|
|
|
|
|
// 2=sweep bottom to top, 3=sweep top to bottom
|
|
|
|
|
mSubType = KApplication::random() % 4;
|
|
|
|
|
mSubType = TDEApplication::random() % 4;
|
|
|
|
|
mw = width();
|
|
|
|
|
mh = height();
|
|
|
|
|
mdx = (mSubType==1 ? 16 : -16);
|
|
|
|
@ -451,9 +451,9 @@ int kSlideShowSaver::effectBlobs(bool aInit)
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mx = KApplication::random() % mw;
|
|
|
|
|
my = KApplication::random() % mh;
|
|
|
|
|
r = (KApplication::random() % 200) + 50;
|
|
|
|
|
mx = TDEApplication::random() % mw;
|
|
|
|
|
my = TDEApplication::random() % mh;
|
|
|
|
|
r = (TDEApplication::random() % 200) + 50;
|
|
|
|
|
|
|
|
|
|
mPainter.drawEllipse(mx-r, my-r, r, r);
|
|
|
|
|
mi--;
|
|
|
|
@ -467,7 +467,7 @@ int kSlideShowSaver::effectRandom(bool /*aInit*/)
|
|
|
|
|
{
|
|
|
|
|
int x, y, i, w, h, fact, sz;
|
|
|
|
|
|
|
|
|
|
fact = (KApplication::random() % 3) + 1;
|
|
|
|
|
fact = (TDEApplication::random() % 3) + 1;
|
|
|
|
|
|
|
|
|
|
w = width() >> fact;
|
|
|
|
|
h = height() >> fact;
|
|
|
|
@ -475,8 +475,8 @@ int kSlideShowSaver::effectRandom(bool /*aInit*/)
|
|
|
|
|
|
|
|
|
|
for (i = (w*h)<<1; i > 0; i--)
|
|
|
|
|
{
|
|
|
|
|
x = (KApplication::random() % w) << fact;
|
|
|
|
|
y = (KApplication::random() % h) << fact;
|
|
|
|
|
x = (TDEApplication::random() % w) << fact;
|
|
|
|
|
y = (TDEApplication::random() % h) << fact;
|
|
|
|
|
bitBlt(TQT_TQPAINTDEVICE(this), x, y, TQT_TQPAINTDEVICE(&mNextScreen), x, y, sz, sz, CopyROP, true);
|
|
|
|
|
}
|
|
|
|
|
showNextScreen();
|
|
|
|
@ -572,7 +572,7 @@ int kSlideShowSaver::effectIncomingEdges(bool aInit)
|
|
|
|
|
mfx = mix / 100.0;
|
|
|
|
|
mfy = miy / 100.0;
|
|
|
|
|
mi = 0;
|
|
|
|
|
mSubType = KApplication::random() & 1;
|
|
|
|
|
mSubType = TDEApplication::random() & 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mx = (int)(mfx * mi);
|
|
|
|
@ -697,7 +697,7 @@ void kSlideShowSaver::slotTimeout()
|
|
|
|
|
loadNextImage();
|
|
|
|
|
createNextScreen();
|
|
|
|
|
|
|
|
|
|
if (mNumEffects > 1) i = KApplication::random() % mNumEffects;
|
|
|
|
|
if (mNumEffects > 1) i = TDEApplication::random() % mNumEffects;
|
|
|
|
|
else i = 0;
|
|
|
|
|
|
|
|
|
|
mEffect = mEffectList[i];
|
|
|
|
@ -748,7 +748,7 @@ void kSlideShowSaver::createNextScreen()
|
|
|
|
|
if (mFileList.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
p.setPen(TQColor("white"));
|
|
|
|
|
p.drawText(20 + (KApplication::random() % (ww>>1)), 20 + (KApplication::random() % (wh>>1)),
|
|
|
|
|
p.drawText(20 + (TDEApplication::random() % (ww>>1)), 20 + (TDEApplication::random() % (wh>>1)),
|
|
|
|
|
i18n("No images found"));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -789,8 +789,8 @@ void kSlideShowSaver::createNextScreen()
|
|
|
|
|
{
|
|
|
|
|
if(mRandomPosition)
|
|
|
|
|
{
|
|
|
|
|
x = (KApplication::random() % (ww - iw)) + geoptr->mXorg;
|
|
|
|
|
y = (KApplication::random() % (wh - ih)) + geoptr->mYorg;
|
|
|
|
|
x = (TDEApplication::random() % (ww - iw)) + geoptr->mXorg;
|
|
|
|
|
y = (TDEApplication::random() % (wh - ih)) + geoptr->mYorg;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -832,7 +832,7 @@ void kSlideShowSaver::loadNextImage()
|
|
|
|
|
|
|
|
|
|
if (mShowRandom)
|
|
|
|
|
{
|
|
|
|
|
mFileIdx = KApplication::random() % num;
|
|
|
|
|
mFileIdx = TDEApplication::random() % num;
|
|
|
|
|
fname = mFileList[mFileIdx];
|
|
|
|
|
mFileList.remove(fname);
|
|
|
|
|
if (num == 1) //we're about to run out of images
|
|
|
|
|