Пример #1
0
kSpaceSaver::kSpaceSaver( Drawable drawable ) : kScreenSaver( drawable )
{
	rnd = new KRandomSequence();
	readSettings();
	counter = (int)warpinterval *WARPFACTOR;

	colorContext = TQColor::enterAllocContext();

	initXLock( mGc );
	initSpace( mDrawable );

	timer.start( speed );
	connect( &timer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotTimeout() ) );
}
Пример #2
0
kSwarmSaver::kSwarmSaver( Drawable drawable ) : kScreenSaver( drawable )
{
	readSettings();

	colorContext = QColor::enterAllocContext();

	batchcount = maxLevels;

	initXLock( gc );
	initswarm( d );

	timer.start( speed );
	connect( &timer, SIGNAL( timeout() ), SLOT( slotTimeout() ) );
}
Пример #3
0
kSwarmSaver::kSwarmSaver( Drawable drawable ) : kScreenSaver( drawable )
{
	readSettings();

    // Clear to background colour when exposed
    XSetWindowBackground(qt_xdisplay(), mDrawable,
                            BlackPixel(qt_xdisplay(), qt_xscreen()));

	colorContext = TQColor::enterAllocContext();

	batchcount = maxLevels;

	initXLock( mGc );
	initswarm( mDrawable, rnd );

	timer.start( speed );
	connect( &timer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotTimeout() ) );
}
Пример #4
0
kRockSaver::kRockSaver( Drawable drawable ) : kScreenSaver( drawable )
{
	readSettings();

	colorContext = QColor::enterAllocContext();

	initXLock( gc );
	initrock( drawable );

	rock_setMove( move );
	rock_setRotate( rotate );

	maxDepSpeed = MAX_DEP_SPEED * height / QApplication::desktop()->height();
	if ( maxDepSpeed < 1 )
		maxDepSpeed = 1;

	timer.start( speed, TRUE );
	connect( &timer, SIGNAL( timeout() ), SLOT( slotTimeout() ) );
}