Back to index

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

#include <swarm.h>

Inheritance diagram for kSwarmSaver:
Inheritance graph
[legend]
Collaboration diagram for kSwarmSaver:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 kSwarmSaver (Drawable drawable)
virtual ~kSwarmSaver ()
void setSpeed (int spd)
void setLevels (int l)

Protected Slots

void slotTimeout ()

Protected Member Functions

void readSettings ()

Protected Attributes

KRandomSequence rnd
QTimer timer
int colorContext
int speed
int maxLevels
Drawable mDrawable
GC mGc
unsigned mWidth
unsigned mHeight

Detailed Description

Definition at line 15 of file swarm.h.


Constructor & Destructor Documentation

kSwarmSaver::kSwarmSaver ( Drawable  drawable)

Definition at line 261 of file swarm.cpp.

                                            : kScreenSaver( drawable )
{
       readSettings();

    // Clear to background colour when exposed
    XSetWindowBackground(QX11Info::display(), mDrawable,
                            BlackPixel(QX11Info::display(), QX11Info::appScreen()));

       batchcount = maxLevels;

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

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

Here is the call graph for this function:

Definition at line 278 of file swarm.cpp.

{
       timer.stop();
}

Member Function Documentation

void kSwarmSaver::readSettings ( ) [protected]

Definition at line 296 of file swarm.cpp.

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

       speed = MAXSPEED - group.readEntry( "Speed", MAXSPEED - DEFSPEED );
       maxLevels = group.readEntry( "MaxLevels", DEFBATCH );

       delete config;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void kSwarmSaver::setLevels ( int  l)

Definition at line 290 of file swarm.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void kSwarmSaver::setSpeed ( int  spd)

Definition at line 283 of file swarm.cpp.

{
       timer.stop();
       speed = MAXSPEED - spd;
       timer.start( speed );
}

Here is the caller graph for this function:

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

Definition at line 307 of file swarm.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

int kSwarmSaver::colorContext [protected]

Definition at line 34 of file swarm.h.

int kSwarmSaver::maxLevels [protected]

Definition at line 37 of file swarm.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.

KRandomSequence kSwarmSaver::rnd [protected]

Definition at line 32 of file swarm.h.

int kSwarmSaver::speed [protected]

Definition at line 36 of file swarm.h.

QTimer kSwarmSaver::timer [protected]

Definition at line 33 of file swarm.h.


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