Back to index

kdeartwork  4.3.2
Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
kSpaceSaver Class Reference

#include <space.h>

Inheritance diagram for kSpaceSaver:
Inheritance graph
Collaboration diagram for kSpaceSaver:
Collaboration graph

List of all members.

Public Member Functions

 kSpaceSaver (Drawable drawable)
virtual ~kSpaceSaver ()
void setSpeed (int spd)
void setWarp (int l)
void setPoints (int p)

Protected Slots

void slotTimeout ()

Protected Member Functions

void readSettings ()

Protected Attributes

QTimer timer
int colorContext
int counter
int speed
int maxLevels
int numPoints
Drawable mDrawable
GC mGc
unsigned mWidth
unsigned mHeight

Detailed Description

Definition at line 11 of file space.h.

Constructor & Destructor Documentation

kSpaceSaver::kSpaceSaver ( Drawable  drawable)

Definition at line 502 of file space.cpp.

                                            : kScreenSaver( drawable )
       rnd = new KRandomSequence();
       counter = (int)warpinterval *WARPFACTOR;

       initXLock( mGc );
       initSpace( mDrawable );

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

Here is the call graph for this function:

Definition at line 515 of file space.cpp.

       delete rnd; rnd = 0;

Member Function Documentation

void kSpaceSaver::readSettings ( ) [protected]

Definition at line 538 of file space.cpp.

       KConfig *config = klock_config();
       KConfigGroup group = "Settings" );

       QString str;

       str = group.readEntry( "Speed" );
       if ( !str.isNull() )
              speed = MAXSPEED - str.toInt();
              speed = DEFSPEED;

       warpinterval = group.readEntry( "WarpInterval", 15 );
       delete config;

Here is the call graph for this function:

Here is the caller graph for this function:

void kSpaceSaver::setPoints ( int  p)
void kSpaceSaver::setSpeed ( int  spd)

Definition at line 522 of file space.cpp.

       speed = MAXSPEED - spd ;
       //     printf("speed %d\n",speed);
       timer.start( speed  );

Here is the caller graph for this function:

void kSpaceSaver::setWarp ( int  l)

Definition at line 531 of file space.cpp.

        warpinterval = w;
       counter = (int)warpinterval;
       initSpace( mDrawable );

Here is the caller graph for this function:

void kSpaceSaver::slotTimeout ( ) [protected, slot]

Definition at line 555 of file space.cpp.

  //printf("%d %d \n",(int)warpinterval, MAXWARP);
  if(warpinterval != MAXWARP){
     if(nitro == 0)
     counter -= speed +1;

     if(counter <= 0){
       nitro = 1;
       counter = (int) warpinterval *WARPFACTOR;
    nitro = 0;

  drawSpace( mDrawable );

Here is the caller graph for this function:

Member Data Documentation

int kSpaceSaver::colorContext [protected]

Definition at line 30 of file space.h.

int kSpaceSaver::counter [protected]

Definition at line 32 of file space.h.

int kSpaceSaver::maxLevels [protected]

Definition at line 34 of file space.h.

Drawable kScreenSaver::mDrawable [protected, inherited]

Definition at line 21 of file saver.h.

GC kScreenSaver::mGc [protected, inherited]

Definition at line 22 of file saver.h.

unsigned kScreenSaver::mHeight [protected, inherited]

Definition at line 24 of file saver.h.

unsigned kScreenSaver::mWidth [protected, inherited]

Definition at line 23 of file saver.h.

int kSpaceSaver::numPoints [protected]

Definition at line 35 of file space.h.

int kSpaceSaver::speed [protected]

Definition at line 33 of file space.h.

QTimer kSpaceSaver::timer [protected]

Definition at line 29 of file space.h.

The documentation for this class was generated from the following files: