Back to index

kdeartwork  4.3.2
aasaver.h
Go to the documentation of this file.
00001 /*
00002  * Asciiquarium - Native KDE Screensaver based on the Asciiquarium program
00003  *    (c) Kirk Baucom <kbaucom@schizoid.com>, which you can find at
00004  *    http://www.robobunny.com/projects/asciiquarium/
00005  *
00006  * Ported to KDE by Maksim Orlovich <maksim@kde.org> and
00007  * Michael Pyne <michael.pyne@kdemail.net>.
00008  *
00009  * Copyright (c) 2003 Kirk Baucom     <kbaucom@schizoid.com>
00010  * Copyright (c) 2005 Maksim Orlovich <maksim@kde.org>
00011  * Copyright (c) 2005, 2008 Michael Pyne <michael.pyne@kdemail.net>
00012  *
00013  * This program is free software; you can redistribute it and/or
00014  * modify it under the terms of the GNU General Public License
00015  * as published by the Free Software Foundation; either version 2
00016  * of the License, or (at your option) any later version.
00017  *
00018  * This program is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License along with
00024  * this program; if not, write to the Free Software Foundation, Inc., 51
00025  * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
00026  */
00027 
00028 #ifndef AA_AASAVER_H
00029 #define AA_AASAVER_H
00030 
00031 #include <kscreensaver.h>
00032 #include <KRandomSequence>
00033 
00034 class Screen;
00035 class Sprite;
00036 
00072 class AASaver: public KScreenSaver
00073 {
00075     Screen* screen;
00076 
00078     KRandomSequence m_randomSequence;
00079 
00081     static AASaver *m_instance;
00082 
00083 public:
00085     AASaver(WId id);
00086 
00087     static AASaver *instance();
00088 
00093     QString randColor(QString color_mask);
00094 
00095     double doubleRand(int max);
00096 
00098     void addCastle();
00099 
00101     void addEnvironment();
00102 
00104     void addAllSeaweed();
00105 
00108     void addAllFish();
00109 
00115     void addSeaweed(Screen* screen);
00116 
00123     Sprite *newFish(Screen *screen);
00124 
00130     void addFish(Screen *screen);
00131 
00141     void addBubble(Screen* screen, int x, int y, int z);
00142 
00148     void addNessie(Screen* screen);
00149 
00155     void addBigFish(Screen* screen);
00156 
00162     void addWhale(Screen* screen);
00163 
00170     void addShark(Screen* screen);
00171 
00177     void addShip(Screen* screen);
00178 
00185     void addRandom(Screen* screen);
00186 
00190     virtual void paintEvent(QPaintEvent* pe);
00191 };
00192 
00193 class AASaverInterface : public KScreenSaverInterface
00194 {
00195     public:
00196     virtual ~AASaverInterface();
00197 
00198     virtual KAboutData *aboutData();
00199     virtual KScreenSaver *create(WId id);
00200     virtual QDialog *setup();
00201 };
00202 
00203 #endif /* AA_AASAVER_H */
00204 
00205 // vim: set et ts=8 sw=4: