summaryrefslogtreecommitdiffstats
path: root/tdescreensaver
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2021-04-26 18:43:25 +0200
committergregory guy <gregory-tde@laposte.net>2021-05-20 20:16:35 +0200
commit749694a3f2fecddf44633067c24851d8719b181e (patch)
tree27c58f5c28223c8ae9aa5a01409a5e12ff0c52ca /tdescreensaver
parentb0ef1b76e6bc94f5a8a35b9a43573eab81bca459 (diff)
downloadtdeartwork-749694a3f2fecddf44633067c24851d8719b181e.tar.gz
tdeartwork-749694a3f2fecddf44633067c24851d8719b181e.zip
asciiquarium: Add cmake build support, app is renamed tdeasciiquarium.
Signed-off-by: gregory guy <gregory-tde@laposte.net>
Diffstat (limited to 'tdescreensaver')
-rw-r--r--tdescreensaver/kdesavers/CMakeLists.txt5
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/AASaverConfig.kcfgc4
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/CMakeLists.txt42
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/COPYRIGHT26
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/Doxyfile1218
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/README1
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/aasaver.cpp1220
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/aasaver.h170
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/asciiquarium.kcfg14
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/doxygen-stylesheet.css309
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/frame.cpp175
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/frame.h121
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/screen.cpp222
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/screen.h142
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/settingswidget.ui50
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/sprite.cpp64
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/sprite.h178
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/tdeasciiquarium.desktop23
18 files changed, 3984 insertions, 0 deletions
diff --git a/tdescreensaver/kdesavers/CMakeLists.txt b/tdescreensaver/kdesavers/CMakeLists.txt
index 0f479186..0246a974 100644
--- a/tdescreensaver/kdesavers/CMakeLists.txt
+++ b/tdescreensaver/kdesavers/CMakeLists.txt
@@ -9,6 +9,11 @@
#
#################################################
+if( BUILD_TDEASCIIQUARIUM AND BUILD_TDESCREENSAVER )
+ add_subdirectory( tdeasciiquarium )
+endif()
+
+
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/AASaverConfig.kcfgc b/tdescreensaver/kdesavers/tdeasciiquarium/AASaverConfig.kcfgc
new file mode 100644
index 00000000..f709650b
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/AASaverConfig.kcfgc
@@ -0,0 +1,4 @@
+File=asciiquarium.kcfg
+ClassName=AASaverConfig
+Singleton=true
+Mutators=true
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/CMakeLists.txt b/tdescreensaver/kdesavers/tdeasciiquarium/CMakeLists.txt
new file mode 100644
index 00000000..701b26e1
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/CMakeLists.txt
@@ -0,0 +1,42 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### tdeasciiquarium (executable)
+
+tde_add_executable( tdeasciiquarium.kss AUTOMOC
+
+ SOURCES
+ aasaver.cpp
+ screen.cpp
+ frame.cpp
+ sprite.cpp
+ AASaverConfig.kcfgc
+ settingswidget.ui
+ LINK
+ tdecore-shared
+ tdeui-shared
+ tdescreensaver-shared
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+set_source_files_properties( aasaver.cpp PROPERTIES COMPILE_FLAGS -Wno-trigraphs )
+
+
+##### other data
+
+tde_create_translated_desktop(
+ SOURCE tdeasciiquarium.desktop
+ DESTINATION ${APPS_INSTALL_DIR}/System/ScreenSavers
+ PO_DIR tdescreensaver-desktops
+)
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/COPYRIGHT b/tdescreensaver/kdesavers/tdeasciiquarium/COPYRIGHT
new file mode 100644
index 00000000..295d84d2
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/COPYRIGHT
@@ -0,0 +1,26 @@
+/*
+ * Asciiquarium - Native KDE Screensaver based on the Asciiquarium program
+ * (c) Kirk Baucom <kbaucom@schizoid.com>, which you can find at
+ * http://www.robobunny.com/projects/asciiquarium/
+ *
+ * Ported to KDE by Maksim Orlovich <maksim@kde.org> and
+ * Michael Pyne <michael.pyne@kdemail.net>.
+ *
+ * Copyright (c) 2003 Kirk Baucom <kbaucom@schizoid.com>
+ * Copyright (c) 2005 Maksim Orlovich <maksim@kde.org>
+ * Copyright (c) 2005 Michael Pyne <michael.pyne@kdemail.net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/Doxyfile b/tdescreensaver/kdesavers/tdeasciiquarium/Doxyfile
new file mode 100644
index 00000000..9588f8b2
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/Doxyfile
@@ -0,0 +1,1218 @@
+# Doxyfile 1.4.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = Asciiquarium
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = 0.3.2
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
+# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
+# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
+# Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# This tag can be used to specify the encoding used in the generated output.
+# The encoding is not always determined by the language that is chosen,
+# but also whether or not the output is meant for Windows or non-Windows users.
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+# forces the Windows encoding (this is the default for the Windows binary),
+# whereas setting the tag to NO uses a Unix-style encoding (the default for
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = YES
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+# only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation.
+
+SHOW_DIRECTORIES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from the
+# version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the progam writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT =
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = YES
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET = doxygen-stylesheet.css
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = YES
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = letter
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = YES
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that a graph may be further truncated if the graph's
+# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH
+# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default),
+# the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, which results in a white background.
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+
+DOT_TRANSPARENT = YES
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = YES
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/README b/tdescreensaver/kdesavers/tdeasciiquarium/README
new file mode 100644
index 00000000..266dd5f9
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/README
@@ -0,0 +1 @@
+TDEAsciiquarium gets registered as Miscellaneous from the Trinity Control Center - Screen Saver option
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/aasaver.cpp b/tdescreensaver/kdesavers/tdeasciiquarium/aasaver.cpp
new file mode 100644
index 00000000..daf09d97
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/aasaver.cpp
@@ -0,0 +1,1220 @@
+//Stub stolen from:
+// klines 0.1.1 - Basic screen saver for KDE
+// by Dirk Staneker 1997
+
+#include <kdebug.h>
+#include <tdelocale.h>
+#include <tdeconfigdialog.h>
+
+#include <tqdesktopwidget.h>
+#include <tqpainter.h>
+#include <tqbrush.h>
+
+#include "screen.h"
+#include "frame.h"
+#include "sprite.h"
+#include "aasaver.h"
+
+#include "AASaverConfig.h"
+#include "settingswidget.h"
+
+#define ARRAY_SIZE(arr) sizeof(arr)/sizeof(arr[0])
+
+AASaver::AASaver( WId id ): KScreenSaver(id)
+{
+ screen = new Screen(this);
+ addEnvironment();
+ addCastle();
+ addAllSeaweed();
+ addAllFish();
+ addRandom(screen);
+
+ setBackgroundMode(NoBackground);
+ setWFlags(WNoAutoErase);
+ update(rect());
+}
+
+
+TQString AASaver::randColor(TQString color_mask)
+{
+ char colors[] = {'c','C','r','R','y','Y','b','B','g','G','m','M'};
+ for (int i = 1; i <= 9; ++i)
+ {
+ char color = colors[intRand(ARRAY_SIZE(colors))];
+ color_mask.replace('0' + i, color);
+ }
+ return color_mask;
+}
+
+void AASaver::addCastle()
+{
+ TQString castle_image =
+ " T~~\n"
+ " |\n"
+ " /^\\\n"
+ " / \\\n"
+ " _ _ _ / \\ _ _ _\n"
+ "[ ]_[ ]_[ ]/ _ _ \\[ ]_[ ]_[ ]\n"
+ "|_=__-_ =_|_[ ]_[ ]_|_=-___-__|\n"
+ " | _- = | =_ = _ |= _= |\n"
+ " |= -[] |- = _ = |_-=_[] |\n"
+ " | =_ |= - ___ | =_ = |\n"
+ " |= []- |- /| |\\ |=_ =[] |\n"
+ " |- =_ | =| | | | |- = - |\n"
+ " |_______|__|_|_|_|__|_______|\n";
+
+
+ TQString castle_mask =
+ " RR\n"
+ "\n"
+ " yyy\n"
+ " y y\n"
+ " y y\n"
+ " y y\n"
+ "\n"
+ "\n"
+ "\n"
+ " yyy\n"
+ " yy yy\n"
+ " y y y y\n"
+ " yyyyyyy\n";
+
+ Frame f(castle_image, castle_mask, 0x686868/* XXX: why grey? */ );
+
+ Sprite* castle = new Sprite(screen,
+ screen->width() - 32, screen->height() - 13, 22);
+ castle->addFrame(f);
+ screen->addSprite(castle);
+}
+
+void AASaver::addEnvironment()
+{
+ TQString water_line_segment[] = {
+ "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
+ "^^^^ ^^^ ^^^ ^^^ ^^^^ ",
+ "^^^^ ^^^^ ^^^ ^^ ",
+ "^^ ^^^^ ^^^ ^^^^^^ "
+ };
+
+ // tile the segments so they stretch across the screen
+ int segment_size = water_line_segment[0].length();
+ int segment_repeat = int(screen->width()/segment_size) + 1;
+
+ for (unsigned i = 0; i < ARRAY_SIZE(water_line_segment); ++i) {
+ //do the tiling
+ TQString out;
+ for (int r = 0; r < segment_repeat; ++r)
+ out += water_line_segment[i];
+
+ //create a sprite.
+ Sprite* s = new Sprite(screen, 0, i + 5, 22);
+ s->addFrame(Frame(out, TQString::null, 0x149494));
+ screen->addSprite(s);
+ }
+}
+
+void AASaver::addAllSeaweed()
+{
+ // figure out how many seaweed to add by the width of the screen
+ int seaweed_count = int(screen->width() / 15.0);
+ for (int i = 1; i <= seaweed_count; ++i)
+ addSeaweed(screen);
+}
+
+/**
+ * Special class to represent seaweed. Seaweed can disappear over time, and
+ * when this happens, this class will automatically spawn another one.
+ */
+class Seaweed: public Sprite
+{
+ int m_ticks; ///< Number of animation ticks elapsed.
+ int m_lifeTimeMS; ///< Life time of seaweed in milliseconds.
+
+public:
+ /**
+ * Constructor. The \p x, \p y, and \p z coordinates are all in logical
+ * coordinates.
+ *
+ * @param s The Screen to be created in.
+ * @param x The x coordinate to place the seaweed at.
+ * @param y The y coordinate to place the seaweed at.
+ * @param life The length of time in milliseconds the seaweed will live for.
+ */
+ Seaweed(Screen* s, int x, int y, int life): Sprite(s, x, y, 21),
+ m_ticks(0), m_lifeTimeMS(life)
+ {
+ }
+
+ /**
+ * Reimplemented from Sprite::tickUpdate() to handle keeping track of
+ * Seaweed lifetime. Calls the inherited tickUpdate() as well.
+ */
+ virtual bool tickUpdate()
+ {
+ ++m_ticks;
+ if (m_ticks * m_screen->msPerTick() > m_lifeTimeMS)
+ {
+ kill();
+ AASaver::addSeaweed(m_screen);
+ }
+
+ return Sprite::tickUpdate();
+ }
+};
+
+void AASaver::addSeaweed(Screen* screen)
+{
+ TQString seaweed_image[] = {"", ""};
+ int height = intRand(5) + 3;
+ for (int i = 1; i <= height; ++i)
+ {
+ int left_side = i % 2;
+ int right_side = !left_side;
+ seaweed_image[left_side] += "(\n";
+ seaweed_image[right_side] += " )\n";
+ }
+
+ int x = intRand(screen->width() - 2) + 1;
+ int y = screen->height() - height;
+
+ Seaweed* s = new Seaweed(screen, x, y,
+ intRand(4*60000) + (8*60000)); // seaweed lives for 8 to 12 minutes
+ s->addFrame(Frame(seaweed_image[0], TQString::null, 0x18AF18));
+ s->addFrame(Frame(seaweed_image[1], TQString::null, 0x18AF18));
+ s->setFrameDelay(intRand(50) + 250);
+ screen->addSprite(s);
+}
+
+/**
+ * Class to represent an AirBubble. The bubble will automatically float up,
+ * even though it is not descended from MovingSprite.
+ */
+class AirBubble : public Sprite
+{
+ const int m_startY; ///< Y coordinate we started at, needed to choose a frame.
+
+public:
+ /**
+ * Constructor. The \p x, \p y, and \p z coordinates are all in logical
+ * coordinates.
+ *
+ * @param screen The Screen to be created in.
+ * @param x The x coordinate to start at.
+ * @param y The y coordinate to start at.
+ * @param z The depth to start at.
+ */
+ AirBubble(Screen *screen, int x, int y, int z) :
+ Sprite(screen, x, y, z), m_startY(y)
+ {
+ addFrame(Frame(".", TQString(), 0x18B2B2));
+ addFrame(Frame("o", TQString(), 0x18B2B2));
+ addFrame(Frame("O", TQString(), 0x18B2B2));
+
+ setFrameDelay(100);
+ }
+
+ /**
+ * Reimplemented from Sprite::tickUpdate() to handle moving the sprite and
+ * updating the current frame. The inherited tickUpdate() is not called.
+ */
+ virtual bool tickUpdate()
+ {
+ if (!timerTick())
+ return false;
+
+ erase();
+
+ m_currentFrame = 0;
+ if(m_startY - m_y > 5)
+ m_currentFrame = 1;
+ if(m_startY - m_y > 11)
+ m_currentFrame = 2;
+
+ m_y--;
+ if(m_y < 9)
+ kill();
+
+ return true;
+ }
+};
+
+/**
+ * Moving sprite, will be killed when it moves off of the screen.
+ */
+class MovingSprite: public Sprite
+{
+protected:
+ int m_direct; ///< Direction to move in, -1 == left, 1 == right.
+ double m_speed; ///< Speed to move at (Currently m_speed per tick).
+ double m_realX; ///< Used for accuracy, holds fractional x position.
+ int m_ticksSinceLastChange; ///< Number of timer ticks since last frame change.
+ int m_frameTime; ///< Amount of time in milliseconds to show each frame.
+
+public:
+ /**
+ * Constructor. The \p x, \p y, and \p z coordinates are all in logical
+ * coordinates.
+ *
+ * @param screen The Screen to be created in.
+ * @param direct The direction to move the sprite in along the X axis, either
+ * -1 for the left direction, or 1 for the right direction.
+ * @param speed The speed to move the sprite in along the X axis, in
+ * character cells per tick. Use Screen::msPerTick() to find
+ * out how long a tick takes. The speed can be fractional
+ * (e.g. 1.5 cells per tick).
+ * @param x The x coordinate to start at.
+ * @param y The y coordinate to start at.
+ * @param z The depth to start at.
+ */
+ MovingSprite(Screen* screen, int direct, double speed, int x, int y, int z):
+ Sprite(screen, x, y, z), m_direct(direct), m_speed(speed), m_realX(x),
+ m_ticksSinceLastChange(0), m_frameTime(250)
+ {
+ }
+
+ /**
+ * Sets the amount of time a frame is shown. Use this function for
+ * MovingSprites that are also animated.
+ *
+ * @param milliseconds Amount of time to show a frame for in milliseconds.
+ */
+ void setFrameTime(int milliseconds)
+ {
+ m_frameTime = milliseconds;
+ }
+
+ /// Returns the amount of time a frame lasts in milliseconds.
+ int frameTime() const { return m_frameTime; }
+
+ /// Returns the direction the sprite travels in.
+ int direction() const
+ {
+ return m_direct;
+ }
+
+ /// Returns the fractional speed of the sprite.
+ double realSpeed() const
+ {
+ return m_speed;
+ }
+
+ /// Returns the real (fractional) X position of the sprite.
+ double realX() const
+ {
+ return m_realX;
+ }
+
+ /**
+ * Reimplemented from Sprite::tickUpdate() to handle motion and frame
+ * animation. This function will automatically kill() this sprite when
+ * it moves off screen. The inherited tickUpdate() is not called.
+ */
+ virtual bool tickUpdate()
+ {
+ if (!timerTick())
+ return false;
+
+ erase();
+ m_realX += (m_direct * m_speed);
+ m_x = (int) m_realX;
+
+ ++m_ticksSinceLastChange;
+ if(m_ticksSinceLastChange * m_screen->msPerTick() > m_frameTime)
+ {
+ m_ticksSinceLastChange = 0;
+
+ ++m_currentFrame;
+ if(m_currentFrame == m_frames.size())
+ m_currentFrame = 0;
+ }
+
+ if((m_x + m_frames[m_currentFrame].width() < 0) || (m_x > m_screen->width()))
+ kill();
+
+ return true;
+ }
+};
+
+/**
+ * Will spawn a random sprite when killed, otherwise behaves just like
+ * MovingSprite.
+ */
+class RandomMovingSprite : public MovingSprite
+{
+public:
+ RandomMovingSprite(Screen *screen, int direct, double speed, int x, int y, int z):
+ MovingSprite(screen, direct, speed, x, y, z)
+ {
+ }
+
+ /// Spawns another RandomMovingSprite before dying.
+ virtual void kill()
+ {
+ MovingSprite::kill();
+ AASaver::addRandom(m_screen);
+ }
+};
+
+/**
+ * Special subclass that represents a fish. Used so TeethSprite knows when it
+ * has caused a collision, and also to handle air bubble generation.
+ */
+class FishSprite : public MovingSprite
+{
+ double m_spacesPerBubble; ///< Amount of spaces a fish moves for each bubble.
+ double m_lastBubbleRelease; ///< Amount of space traveled since the last bubble.
+
+public:
+ FishSprite(Screen* screen, int direct, double speed, int x, int y, int z):
+ MovingSprite(screen, direct, speed, x, y, z), m_lastBubbleRelease(x)
+ {
+ m_spacesPerBubble = AASaver::doubleRand(screen->width()) + 12.0;
+ }
+
+ /// Spawns another fish before dying.
+ virtual void kill()
+ {
+ MovingSprite::kill();
+ AASaver::addFish(m_screen);
+ }
+
+ /**
+ * Reimplemented from MovingSprite::tickUpdate() to handle creating air
+ * bubbles. Inherited tickUpdate() is still called.
+ */
+ virtual bool tickUpdate()
+ {
+ if(!MovingSprite::tickUpdate())
+ return false;
+
+ if(isKilled())
+ return true;
+
+ if(TQABS(realX() - m_lastBubbleRelease) >= m_spacesPerBubble)
+ {
+ m_lastBubbleRelease = realX();
+
+ int bubbleX = m_x;
+ TQRect geometry = geom();
+
+ if(m_direct > 0) // Moving right
+ bubbleX += geometry.width();
+
+ AASaver::addBubble(m_screen, bubbleX, m_y + geometry.height() / 2 - 1, m_z - 1);
+ }
+
+ return true;
+ }
+};
+
+void AASaver::addAllFish()
+{
+ // Determine how many logical pixels we are dealing with, and find out how
+ // many we'd be dealing with in full screen, and then scale the user's
+ // number down to adjust so that we look about the same in a window as we
+ // do fullscreen. TODO: Xinerama issues?
+ TQRect fullScreenGeometry = kapp->desktop()->screenGeometry();
+
+ int full_width = fullScreenGeometry.width() / screen->cellWidth();
+ int full_height = fullScreenGeometry.height() / screen->cellHeight() - 9;
+ int full_size = full_width * full_height;
+ int screen_size = (screen->height() - 9) * screen->width();
+
+ int fish_count = AASaverConfig::fishCount() * screen_size / full_size;
+ if(fish_count < 5)
+ fish_count = 5;
+
+ for (int i = 1; i <= fish_count; ++ i)
+ addFish(screen);
+}
+
+Sprite *AASaver::newFish(Screen *screen)
+{
+ TQString fish_image[] = {
+" \\\n"
+" ...\\..,\n"
+"\\" "??" "/' \\\n" // trigraphs suck
+" >= ( ' >\n"
+"/??\\ / /\n"
+" `\"'\"'/''\n",
+
+" 2\n"
+" 1112111\n"
+"6 11 1\n"
+" 66 7 4 5\n"
+"6 1 3 1\n"
+" 11111311\n",
+
+//////////////////////////////
+" /\n"
+" ,../...\n"
+" / '\\" "??" "/\n" // trigraphs suck
+"< ' ) =<\n"
+" \\ \\ /??\\\n"
+" `'\\'\"'\"'\n",
+
+" 2\n"
+" 1112111\n"
+" 1 11 6\n"
+"5 4 7 66\n"
+" 1 3 1 6\n"
+" 11311111\n",
+//////////////////////////////
+" \\\n"
+"\\?/--\\\n"
+">= (o>\n"
+"/?\\__/\n"
+" /\n",
+
+" 2\n"
+"6 1111\n"
+"66 745\n"
+"6 1111\n"
+" 3\n",
+
+//////////////////////////////
+" /\n"
+" /--\\?/\n"
+"<o) =<\n"
+" \\__/?\\\n"
+" \\\n",
+
+" 2\n"
+" 1111 6\n"
+"547 66\n"
+" 1111 6\n"
+" 3\n",
+
+//////////////////////////////
+" \\:.\n"
+"\\;,???,;\\\\\\\\\\,,\n"
+" \\\\\\\\\\;;:::::o\n"
+" ///;;::::::::<\n"
+" /;`?``/////``\n",
+
+" 222\n"
+"666 1122211\n"
+" 6661111111114\n"
+" 66611111111115\n"
+" 666 113333311\n",
+
+//////////////////////////////
+" .:/\n"
+" ,,///;,???,;/\n"
+" o:::::::;;///\n"
+">::::::::;;\\\\\\\n"
+" ''\\\\\\\\\\''?';\\\n",
+
+" 222\n"
+" 1122211 666\n"
+" 4111111111666\n"
+"51111111111666\n"
+" 113333311 666\n",
+
+//////////////////////////////
+" __\n"
+"><_'>\n"
+" '\n",
+
+" 11\n"
+"61145\n"
+" 3\n",
+
+//////////////////////////////
+" __\n"
+"<'_><\n"
+" `\n",
+
+" 11\n"
+"54116\n"
+" 3\n",
+
+//////////////////////////////
+" ..\\,\n"
+">=' ('>\n"
+" '''/''\n",
+
+" 1121\n"
+"661 745\n"
+" 111311\n",
+
+//////////////////////////////
+" ,/..\n"
+"<') `=<\n"
+" ``\\```\n",
+
+" 1211\n"
+"547 166\n"
+" 113111\n",
+
+//////////////////////////////
+" \\\n"
+" / \\\n"
+">=_('>\n"
+" \\_/\n"
+" /\n",
+
+" 2\n"
+" 1 1\n"
+"661745\n"
+" 111\n"
+" 3\n",
+
+//////////////////////////////
+" /\n"
+" / \\\n"
+"<')_=<\n"
+" \\_/\n"
+" \\\n",
+
+" 2\n"
+" 1 1\n"
+"547166\n"
+" 111\n"
+" 3\n",
+
+//////////////////////////////
+" ,\\\n"
+">=('>\n"
+" '/\n",
+
+" 12\n"
+"66745\n"
+" 13\n",
+
+//////////////////////////////
+" /,\n"
+"<')=<\n"
+" \\`\n",
+
+" 21\n"
+"54766\n"
+" 31\n",
+
+//////////////////////////////
+" __\n"
+"\\/ o\\\n"
+"/\\__/\n",
+
+" 11\n"
+"61 41\n"
+"61111\n",
+
+//////////////////////////////
+" __\n"
+"/o \\/\n"
+"\\__/\\\n",
+
+" 11\n"
+"14 16\n"
+"11116\n"
+};
+
+ // # 1: body
+ // # 2: dorsal fin
+ // # 3: flippers
+ // # 4: eye
+ // # 5: mouth
+ // # 6: tailfin
+ // # 7: gills*
+ int fish_num = intRand(ARRAY_SIZE(fish_image)/2);
+ int fish_index = fish_num * 2;
+
+ double speed = doubleRand(2) + 0.25;
+ int depth = 3 + intRand(18);
+
+ TQString color_mask = fish_image[fish_index+1];
+ color_mask.replace('4', 'W');
+
+ color_mask = randColor(color_mask);
+
+ Frame fishFrame(fish_image[fish_index], color_mask, 0);
+ int max_height = 9;
+ int min_height = screen->height() - fishFrame.height();
+
+ int x, y, dir;
+ y = max_height + intRand(min_height - max_height);
+ if (fish_num % 2)
+ {
+ x = screen->width() - 2;
+ dir = -1;
+ }
+ else
+ {
+ x = 1 - fishFrame.width();
+ dir = 1;
+ }
+
+ Sprite* fish = new FishSprite(screen, dir, speed, x, y, depth);
+ fish->addFrame(fishFrame);
+
+ return fish;
+}
+
+void AASaver::addFish(Screen* screen)
+{
+ screen->addSprite(newFish(screen));
+}
+
+/**
+ * Sprite that represents a blood "splat" in the water.
+ */
+class Splat : public Sprite
+{
+public:
+ /**
+ * Constructor.
+ *
+ * @param screen The Screen to create the splat in.
+ * @param center The point to center the splat around.
+ * @param depth The depth to create the splat at.
+ */
+ Splat(Screen *screen, TQPoint center, int depth) :
+ Sprite(screen, 0, 0, depth, 450 /* frame Delay */)
+ {
+ TQString splats[] = {
+"\n"
+" .\n"
+" ***\n"
+" '\n"
+""
+,
+
+"\n"
+" \",*;`\n"
+" \"*,**\n"
+" *\"'~'\n"
+""
+,
+" , ,\n"
+" \" \",\"'\n"
+" *\" *'\"\n"
+" \" ; .\n"
+""
+,
+"* ' , ' `\n"
+"' ` * . '\n"
+" ' `' \",'\n"
+"* ' \" * .\n"
+"\" * ', '"
+ };
+
+ for(unsigned i = 0; i < ARRAY_SIZE(splats); ++i)
+ addFrame(Frame(splats[i], TQString(), 0xB21818, ' '));
+
+ TQRect r(center, TQSize(9, 5));
+ r.moveCenter(center);
+ m_x = r.x();
+ m_y = r.y();
+
+ setDieAfterLastFrame(true);
+ }
+};
+
+/**
+ * Invisible sprite which are created on a shark's teeth, to handle collisions
+ * with fish, creating splats and kill()'ing the fish.
+ */
+class TeethSprite : public MovingSprite
+{
+public:
+ /**
+ * Constructor. Copied parameters as appropriate from \p shark.
+ *
+ * @param shark The shark to create the teeth over.
+ */
+ TeethSprite(MovingSprite *shark) : MovingSprite(shark->screen(), shark->direction(),
+ shark->realSpeed(), 2 + shark->geom().left(), shark->geom().top(), shark->depth())
+ {
+ m_y += 7;
+ m_z -= 1;
+ m_realX = 2 + shark->realX();
+
+ if(m_direct > 0) // Moving to right.
+ m_realX = -10;
+
+ addFrame(Frame("????????", TQString(), 0));
+ }
+
+ /// Returns true since we can collide.
+ bool canCollide() const { return true; }
+
+ /**
+ * Reimplemented in order to handle collisions. When colliding with a
+ * FishSprite, the fish is kill()'ed and a splat is created in its place.
+ * Otherwise, nothing is done.
+ *
+ * @param sprite The Sprite we collided with.
+ */
+ void collision(Sprite *sprite)
+ {
+ if(dynamic_cast<FishSprite *>(sprite)) {
+ kdDebug() << "A fish just got killinated!\n";
+
+ sprite->erase();
+ sprite->kill();
+
+ screen()->addSprite(new Splat(screen(), sprite->geom().center(), depth() - 1));
+ }
+ }
+};
+
+void AASaver::addShark(Screen* screen)
+{
+ TQString shark_image[] = {
+" __\n"
+" ( `\\\n"
+" ,??????????????????????????" ") `\\\n" // trigraphs suck
+";' `.????????????????????????" "( `\\__\n" // trigraphs suck
+" ; `.?????????????__..---'' `~~~~-._\n"
+" `. `.____...--'' (b `--._\n"
+" > _.-' .(( ._ )\n"
+" .`.-`--...__ .-' -.___.....-(|/|/|/|/'\n"
+" ;.'?????????`. ...----`.___.',,,_______......---'\n"
+" '???????????" "'-'\n", // trigraphs suck
+
+" \n"
+" \n"
+" \n"
+" \n"
+" \n"
+" cR \n"
+" \n"
+" cWWWWWWWW \n"
+" \n"
+" \n",
+
+" __\n"
+" /' )\n"
+" /' (??????????????????????????,\n"
+" __/' )????????????????????????.' `;\n"
+" _.-~~~~' ``---..__?????????????.' ;\n"
+" _.--' b) ``--...____.' .'\n"
+"( _. )). `-._ <\n"
+" `\\|\\|\\|\\|)-.....___.- `-. __...--'-.'.\n"
+" `---......_______,,,`.___.'----... .'?????????`.;\n"
+" `-`???????????`\n",
+
+" \n"
+" \n"
+" \n"
+" \n"
+" \n"
+" Rc \n"
+" \n"
+" WWWWWWWWc \n"
+" \n"
+" \n"
+ };
+
+ int shark_num = intRand(ARRAY_SIZE(shark_image)/2);
+ int shark_index = shark_num * 2;
+ TQString color_mask = randColor(shark_image[shark_index+1]);
+ Frame sharkFrame(shark_image[shark_index], color_mask, 0x18B2B2);
+
+ int x = -53;
+ int y = 9 + intRand(screen->height() - (10 + 9));
+ int dir = (shark_num % 2) ? -1 : 1;
+
+ if(dir < 0)
+ x = screen->width() - 2;
+
+ RandomMovingSprite* shark = new RandomMovingSprite(screen, dir, 2, x, y, 2 /* Always at 2 */);
+ shark->addFrame(sharkFrame);
+ screen->addSprite(shark);
+
+ TeethSprite *teeth = new TeethSprite(shark);
+ screen->addSprite(teeth);
+}
+
+void AASaver::addBubble(Screen *screen, int x, int y, int z)
+{
+ screen->addSprite(new AirBubble(screen, x, y, z));
+}
+
+void AASaver::addShip(Screen* screen)
+{
+ TQString ship_image[] = {
+" | | |\n"
+" )_) )_) )_)\n"
+" )___))___))___)\\\n"
+" )____)____)_____)\\\\\n"
+"_____|____|____|____\\\\\\__\n"
+"\\ /",
+
+" y y y\n"
+" \n"
+" w\n"
+" ww\n"
+"yyyyyyyyyyyyyyyyyyyywwwyy\n"
+"y y",
+
+" | | |\n"
+" (_( (_( (_(\n"
+" /(___((___((___(\n"
+" //(_____(____(____(\n"
+"__///____|____|____|_____\n"
+" \\ /",
+
+" y y y\n"
+" \n"
+" w \n"
+" ww \n"
+"yywwwyyyyyyyyyyyyyyyyyyyy\n"
+" y y"
+ };
+
+ int ship_num = intRand(17) % 2; // right == 0, left == 1
+ int x = -24, dir = 1;
+
+ if(ship_num == 1) {
+ x = screen->width() - 2;
+ dir = -1;
+ }
+
+ RandomMovingSprite *ship = new RandomMovingSprite(screen, dir, 1.0, x, 0, 2);
+ ship->addFrame(Frame(ship_image[2 * ship_num], ship_image[2 * ship_num + 1], 0xFFFFFF));
+ screen->addSprite(ship);
+}
+
+void AASaver::addWhale(Screen* screen)
+{
+ TQString whale_image[] = {
+" .-----:\n"
+" .' `.\n"
+",????/ (o) \\\n"
+"\\`._/ ,__)",
+
+" C C\n"
+" CCCCCCC\n"
+" C C C\n"
+" BBBBBBB\n"
+" BB BB\n"
+"B B BWB B\n"
+"BBBBB BBBB",
+
+" :-----.\n"
+" .' `.\n"
+" / (o) \\????,\n"
+"(__, \\_.'/",
+
+" C C\n"
+" CCCCCCC\n"
+" C C C\n"
+" BBBBBBB\n"
+" BB BB\n"
+" B BWB B B\n"
+"BBBB BBBBB"
+ };
+
+ TQString spouty[] = {
+"\n"
+"\n"
+" :",
+
+"\n"
+" :\n"
+" :",
+
+" . .\n"
+" -:-\n"
+" :",
+
+" . .\n"
+" .-:-.\n"
+" :",
+
+" . .\n"
+"'.-:-.`\n"
+"' : '",
+
+"\n"
+" .- -.\n"
+"; : ;",
+
+"\n"
+"\n"
+"; ;"
+ };
+
+ int whale_num = intRand(2); // 0 = right, 1 = left
+ int x = -18, spout_align = 11, dir = 1;
+
+ if (whale_num == 1)
+ {
+ x = screen->width() - 2;
+ spout_align = 1; // Waterspout closer to left side now.
+ dir = -1;
+ }
+
+ TQString mask = whale_image[2 * whale_num + 1];
+
+ RandomMovingSprite *whale = new RandomMovingSprite(screen, dir, 1.0, x, 0, 2);
+ whale->setFrameDelay(80);
+ whale->setFrameTime(40);
+
+ // We have to add some frames now. The first five will have no water spout.
+ TQString blankWhaleFrame = TQString("\n\n\n") + whale_image[2 * whale_num];
+
+ for(unsigned i = 0; i < 5; ++i)
+ whale->addFrame(Frame(blankWhaleFrame, mask, 0xFFFFFF));
+
+ // Now add frames for the animated water spout.
+ TQString whaleFrame = whale_image[2 * whale_num];
+ for (unsigned i = 0; i < ARRAY_SIZE(spouty); ++i)
+ {
+ TQStringList spoutLines = TQStringList::split("\n", spouty[i], true);
+ TQString spout;
+ TQString padding;
+
+ padding.fill(' ', spout_align);
+
+ // Move spout over an appropriate distance to line up right.
+ for(TQStringList::ConstIterator it = spoutLines.begin(); it != spoutLines.end(); ++it)
+ {
+ spout += padding;
+ spout += *it;
+ spout += "\n";
+ }
+
+ // Add spout to whale frame.
+ whale->addFrame(Frame(spout + whaleFrame, mask, 0xFFFFFF));
+ }
+
+ screen->addSprite(whale);
+}
+
+void AASaver::addBigFish(Screen* screen)
+{
+ TQString big_fish_image[] = {
+" ______\n"
+"`\"\"-. `````-----.....__\n"
+" `. . . `-.\n"
+" : . . `.\n"
+" ,?????: . . _ :\n"
+": `.???: (@) `._\n"
+" `. `..' . =`-. .__)\n"
+" ; . = ~ : .-\"\n"
+" .' .'`. . . =.-' `._ .'\n"
+": .'???: . .'\n"
+" '???.' . . . .-'\n"
+" .'____....----''.'=.'\n"
+" \"\"?????????????.'.'\n"
+" ''\"'`",
+
+" 111111\n"
+"11111 11111111111111111\n"
+" 11 2 2 111\n"
+" 1 2 2 11\n"
+" 1 1 2 2 1 1\n"
+"1 11 1 1W1 111\n"
+" 11 1111 2 1111 1111\n"
+" 1 2 1 1 1 111\n"
+" 11 1111 2 2 1111 111 11\n"
+"1 11 1 2 11\n"
+" 1 11 2 2 2 111\n"
+" 111111111111111111111\n"
+" 11 1111\n"
+" 11111",
+
+" ______\n"
+" __.....-----''''' .-\"\"'\n"
+" .-' . . .'\n"
+" .' . . :\n"
+" : _ . . :?????,\n"
+" _.' (@) :???.' :\n"
+"(__. .-'= . `..' .'\n"
+" \"-. : ~ = . ;\n"
+" `. _.' `-.= . . .'`. `.\n"
+" `. . :???`. :\n"
+" `-. . . . `.???`\n"
+" `.=`.``----....____`.\n"
+" `.`.?????????????\"\"\n"
+" '`\"``",
+
+" 111111\n"
+" 11111111111111111 11111\n"
+" 111 2 2 11\n"
+" 11 2 2 1\n"
+" 1 1 2 2 1 1\n"
+" 111 1W1 1 11 1\n"
+"1111 1111 2 1111 11\n"
+" 111 1 1 1 2 1\n"
+" 11 111 1111 2 2 1111 11\n"
+" 11 2 1 11 1\n"
+" 111 2 2 2 11 1\n"
+" 111111111111111111111\n"
+" 1111 11\n"
+" 11111"
+ };
+
+ int big_fish_num = intRand(2); // right = 0, left = 1
+
+ int maxHeight = 9, minHeight = screen->height() - 15;
+ int y = intRand(minHeight - maxHeight) + maxHeight;
+ int x = -34, dir = 1;
+
+ if(big_fish_num == 1)
+ {
+ x = screen->width() - 1;
+ dir = -1;
+ }
+
+ TQString colors = randColor(big_fish_image[2 * big_fish_num + 1]);
+ RandomMovingSprite *bigFish = new RandomMovingSprite(screen, dir, 3.0, x, y, 2);
+ bigFish->addFrame(Frame(big_fish_image[2 * big_fish_num], colors, 0xFFFF54));
+
+ screen->addSprite(bigFish);
+}
+
+void AASaver::addNessie(Screen* screen)
+{
+ TQString nessie_image[] = {
+" ____\n"
+" __??????????????????????????????????????????/ o \\\n"
+" / \\????????_?????????????????????_???????/ ____ >\n"
+" _??????| __ |?????/ \\????????_????????/ \\????| |\n"
+" | \\?????| || |????| |?????/ \\?????| |???| |",
+
+" ____\n"
+" __?????????/ o \\\n"
+" _?????????????????????_???????/ \\?????/ ____ >\n"
+" _???????/ \\????????_????????/ \\????| __ |???| |\n"
+" | \\?????| |?????/ \\?????| |???| || |???| |\n",
+
+" ____\n"
+" __????????????????????/ o \\\n"
+" _??????????????????????_???????/ \\????????_???????/ ____ >\n"
+"| \\??????????_????????/ \\????| __ |?????/ \\????| |\n"
+" \\ \\???????/ \\?????| |???| || |????| |???| |",
+
+" ____\n"
+" __???????????????????????????????/ o \\\n"
+" _??????????_???????/ \\????????_??????????????????/ ____ >\n"
+" | \\???????/ \\????| __ |?????/ \\????????_??????| |\n"
+" \\ \\?????| |???| || |????| |?????/ \\????| |",
+
+" ____\n"
+" / o \\??????????????????????????????????????????__\n"
+"< ____ \\???????_?????????????????????_????????/ \\\n"
+" | |????/ \\????????_????????/ \\?????| __ |??????_\n"
+" | |???| |?????/ \\?????| |????| || |?????/ |",
+
+" ____\n"
+" / o \\?????????__\n"
+"< ____ \\?????/ \\???????_?????????????????????_\n"
+" | |???| __ |????/ \\????????_????????/ \\???????_\n"
+" | |???| || |???| |?????/ \\?????| |?????/ |",
+
+" ____\n"
+" / o \\????????????????????__\n"
+"< ____ \\???????_????????/ \\???????_??????????????????????_\n"
+" | |????/ \\?????| __ |????/ \\????????_??????????/ |\n"
+" | |???| |????| || |???| |?????/ \\???????/ /",
+
+" ____\n"
+" / o \\???????????????????????????????__\n"
+"< ____ \\??????????????????_????????/ \\???????_??????????_\n"
+" | |??????_????????/ \\?????| __ |????/ \\???????/ |\n"
+" | |????/ \\?????| |????| || |???| |?????/ /"
+ };
+
+ TQString nessie_mask[] = {
+"\n"
+" W\n"
+"\n"
+"\n"
+"\n"
+"",
+
+"\n"
+" W\n"
+"\n"
+"\n"
+"\n"
+""
+ };
+
+ int nessie_num = intRand(2); // 0 = right, 1 = left.
+ int x = -64, dir = 1;
+
+ if(nessie_num == 1) {
+ x = screen->width() - 2;
+ dir = -1;
+ }
+
+ RandomMovingSprite *nessie = new RandomMovingSprite(screen, dir, 1.4, x, 2, 2);
+ nessie->setFrameDelay(75);
+ nessie->setFrameTime(400);
+
+ for(unsigned i = 0; i < 4; ++i)
+ nessie->addFrame(Frame(nessie_image[nessie_num * 4 + i], nessie_mask[nessie_num], 0x18B218));
+
+ screen->addSprite(nessie);
+}
+
+void AASaver::addRandom(Screen* screen)
+{
+ const char *const cute_messages[] = {
+ "Quick, someone cue the ominous music!",
+ "Her continuing mission... to explore strange new seas...",
+ "I caught one that big once, but it got away. :(",
+ "Nessie, an Earthbound hero's best friend...",
+ "Thar be WHALES, Cap'n!!"
+ };
+ int choice = intRand(5);
+
+ if(intRand(45) < 7 && choice < ARRAY_SIZE(cute_messages))
+ kdDebug() << cute_messages[choice] << endl;
+
+ switch(choice)
+ {
+ case 0:
+ addShark(screen);
+ break;
+ case 1:
+ addShip(screen);
+ break;
+ case 2:
+ addBigFish(screen);
+ break;
+ case 3:
+ addNessie(screen);
+ break;
+ case 4:
+ addWhale(screen);
+ break;
+ }
+}
+
+void AASaver::paintEvent(TQPaintEvent* pe)
+{
+ screen->paint(pe->region());
+}
+
+// libkscreensaver interface
+extern "C"
+{
+ KDE_EXPORT const char *kss_applicationName = "tdeasciiquarium.kss";
+ KDE_EXPORT const char *kss_description = I18N_NOOP( "TDEAsciiquarium" );
+ KDE_EXPORT const char *kss_version = "0.3.2";
+
+ KDE_EXPORT KScreenSaver *kss_create( WId id )
+ {
+ return new AASaver( id );
+ }
+
+ KDE_EXPORT TQDialog *kss_setup()
+ {
+ TDEConfigDialog *dialog = TDEConfigDialog::exists("settings");
+ if(dialog)
+ return dialog;
+
+ dialog = new TDEConfigDialog(0, "settings", AASaverConfig::self());
+ SettingsWidget *settings = new SettingsWidget(0, "settings_widget");
+
+ dialog->addPage(settings, i18n("TDEAsciiquarium Settings"), "tdescreensaver");
+
+ return dialog;
+ }
+}
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/aasaver.h b/tdescreensaver/kdesavers/tdeasciiquarium/aasaver.h
new file mode 100644
index 00000000..ce0d3faa
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/aasaver.h
@@ -0,0 +1,170 @@
+#ifndef AA_AASAVER_H
+#define AA_AASAVER_H
+
+#include <tdescreensaver.h>
+#include <tdeapplication.h>
+
+#include <stdlib.h>
+
+class Screen;
+class Sprite;
+
+/**
+ * \mainpage Asciiquarium.
+ *
+ * \section intro Introduction
+ *
+ * Asciiquarium is a KDE screensaver to draw an ASCII art aquarium. This is the
+ * documentation of the API used in the program to generate the effect. It should
+ * be fairly simple, but basically:
+ *
+ * class AASaver is the main class, which handles outside events. All of the
+ * processing happens in the Screen class however, which manages a list of
+ * Sprites, updating them and drawing them as needed. When AASaver receives a
+ * paintEvent(), it forwards it on to Screen to handle it.
+ *
+ * Each Sprite is composed of 1 or more Frames. When a Screen wants a Sprite
+ * to draw itself, the Sprite forwards the request to its currently shown Frame.
+ *
+ * The Frame is rectangular, and created from textual ASCII art, with a ASCII
+ * art shape and color mask. The mask is optional. See aasaver.cpp for
+ * examples for creating a Frame.
+ *
+ * The Frame supports transparency and colors, and will convert the textual data
+ * into a TQPixmap representation on demand in order to reduce CPU load (at the
+ * expense of a slight memory usage increase for each sprite).
+ *
+ * Screen handles the timing for the project, and at each timeout will call
+ * Sprite::tickUpdate() from Screen::doAnimate().
+ *
+ * This whole program was inspired/copied from Kirk Baucom's asciiquarium
+ * program, from http://www.robobunny.com/projects/asciiquarium/
+ */
+
+/**
+ * The main class for the Asciiquarium screensaver.
+ */
+class AASaver: public KScreenSaver
+{
+ /// Handles the animation and drawing.
+ Screen* screen;
+
+public:
+ /// Construct the screensaver with window id \p id.
+ AASaver( WId id );
+
+ /// Returns a random double between [0.0, limit).
+ static double doubleRand(double limit)
+ {
+ return (limit * (static_cast<double>(TDEApplication::random()) / RAND_MAX));
+ }
+
+ /// Returns a random integer between [0, limit)
+ static int intRand(int limit)
+ {
+ return TDEApplication::random() % limit;
+ }
+
+ /**
+ * Returns a TQString holding a color mask, created by choosing random colors
+ * to replace numbers in \p color_mask.
+ */
+ static TQString randColor(TQString color_mask);
+
+ /// Adds the castle sprite to the screen.
+ void addCastle();
+
+ /// Adds the environment (sea, etc.) to the screen.
+ void addEnvironment();
+
+ /// Adds the seaweed to the screen.
+ void addAllSeaweed();
+
+ /// Adds the initial layout of fish to the sea, scaling the number of fish
+ /// based on the current screen size.
+ void addAllFish();
+
+ /**
+ * Adds a seaweed to a random position of the sea bottom.
+ *
+ * @param screen The Screen to add into.
+ */
+ static void addSeaweed(Screen* screen);
+
+ /**
+ * Returns a new fish sprite, which has not yet been added to a screen.
+ *
+ * @param screen The Screen to use when constructing the Sprite.
+ * @todo Combine with addFish().
+ */
+ static Sprite *newFish(Screen *screen);
+
+ /**
+ * Adds a new fish sprite to \p screen.
+ *
+ * @param screen The Screen to add a fish to.
+ */
+ static void addFish(Screen *screen);
+
+ /**
+ * Adds a new air bubble sprite to \p screen. The \p x, \p y, and \p z
+ * coordinates are all in logical coordinates.
+ *
+ * @param screen The Screen to add the bubble to.
+ * @param x The x position to start the bubble at.
+ * @param y The y position to start the bubble at.
+ * @param z The z position to start the bubble at.
+ */
+ static void addBubble(Screen* screen, int x, int y, int z);
+
+ /**
+ * Adds a Nessie, the Loch Ness Monster sprite to \p screen.
+ *
+ * @param screen The Screen to add Nessie to.
+ */
+ static void addNessie(Screen* screen);
+
+ /**
+ * Adds a big fish sprite to \p screen.
+ *
+ * @param screen The Screen to add the big fish to.
+ */
+ static void addBigFish(Screen* screen);
+
+ /**
+ * Adds a whale sprite to \p screen.
+ *
+ * @param screen The Screen to add the whale to.
+ */
+ static void addWhale(Screen* screen);
+
+ /**
+ * Adds a shark sprite to \p screen. The shark can kill() fish it comes in
+ * contact with (they will spawn more fish automatically).
+ *
+ * @param screen The Screen to add the shark to.
+ */
+ static void addShark(Screen* screen);
+
+ /**
+ * Adds a ship sprite to \p screen.
+ *
+ * @param screen The Screen to add the ship to.
+ */
+ static void addShip(Screen* screen);
+
+ /**
+ * Adds a random object from the set (Shark, Big Fish, Nessie, Whale, Ship)
+ * to the sea.
+ *
+ * @param screen The Screen to add to.
+ */
+ static void addRandom(Screen* screen);
+
+ /**
+ * Reimplemented to update the widget when it gets dirty.
+ */
+ virtual void paintEvent(TQPaintEvent* pe);
+};
+
+#endif /* AA_AASAVER_H */
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/asciiquarium.kcfg b/tdescreensaver/kdesavers/tdeasciiquarium/asciiquarium.kcfg
new file mode 100644
index 00000000..87701bce
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/asciiquarium.kcfg
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
+<kcfg>
+ <kcfgfile name="tdeasciiquariumrc"/>
+ <group name="Settings">
+ <entry name="fishCount" type="Int">
+ <label>Amount of fish to have in the sea.</label>
+ <default>20</default>
+ <whatsthis>You can use this value to select the number of fish that will be
+ on screen at a given time.</whatsthis>
+ </entry>
+ </group>
+</kcfg>
+<!-- vim: set noet ts=4: -->
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/doxygen-stylesheet.css b/tdescreensaver/kdesavers/tdeasciiquarium/doxygen-stylesheet.css
new file mode 100644
index 00000000..b42407b6
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/doxygen-stylesheet.css
@@ -0,0 +1,309 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+ font-family: sans-serif, Geneva, Arial, Helvetica;
+}
+BODY,TD {
+ font-size: 100%;
+}
+H1 {
+ text-align: center;
+ font-size: 160%;
+}
+H2 {
+ font-size: 120%;
+}
+H3 {
+ font-size: 110%;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+ width: 100%;
+ background-color: #eeeeff;
+ border: 1px solid #b0b0b0;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+ line-height: 140%;
+}
+DIV.nav {
+ width: 100%;
+ background-color: #eeeeff;
+ border: 1px solid #b0b0b0;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+ line-height: 140%;
+}
+DIV.navtab {
+ background-color: #eeeeff;
+ border: 1px solid #b0b0b0;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+TD.navtab {
+ font-size: 80%;
+}
+A.qindex {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1A419D;
+}
+A.qindex:visited {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1A419D
+}
+A.qindex:hover {
+ text-decoration: none;
+ background-color: #ddddff;
+}
+A.qindexHL {
+ text-decoration: none;
+ font-weight: bold;
+ background-color: #6666cc;
+ color: #ffffff;
+ border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+ text-decoration: none;
+ background-color: #6666cc;
+ color: #ffffff;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
+A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
+A.codeRef:link { font-weight: normal; color: #0000FF}
+A.codeRef:visited { font-weight: normal; color: #0000FF}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+.fragment {
+ font-family: monospace;
+ font-size: 105%;
+}
+PRE.fragment {
+ border: 1px solid #CCCCCC;
+ background-color: #f5f5f5;
+ margin-top: 4px;
+ margin-bottom: 4px;
+ margin-left: 2px;
+ margin-right: 8px;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 4px;
+ padding-bottom: 4px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+TD.md { background-color: #F4F4FB; font-weight: bold; }
+TD.mdPrefix {
+ background-color: #F4F4FB;
+ color: #606060;
+ font-size: 90%;
+}
+TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
+TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
+DIV.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ margin-bottom: 6px;
+ font-weight: bold;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 95% }
+BODY {
+ background: white;
+ color: black;
+ margin-right: 20px;
+ margin-left: 20px;
+}
+TD.indexkey {
+ background-color: #eeeeff;
+ font-weight: bold;
+ padding-right : 10px;
+ padding-top : 2px;
+ padding-left : 10px;
+ padding-bottom : 2px;
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 2px;
+ margin-bottom : 2px;
+ border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+ background-color: #eeeeff;
+ font-style: italic;
+ padding-right : 10px;
+ padding-top : 2px;
+ padding-left : 10px;
+ padding-bottom : 2px;
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 2px;
+ margin-bottom : 2px;
+ border: 1px solid #CCCCCC;
+}
+TR.memlist {
+ background-color: #f0f0f0;
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword { color: #008000 }
+SPAN.keywordtype { color: #604020 }
+SPAN.keywordflow { color: #e08000 }
+SPAN.comment { color: #800000 }
+SPAN.preprocessor { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral { color: #008080 }
+.mdTable {
+ border: 1px solid #868686;
+ background-color: #F4F4FB;
+}
+.mdRow {
+ padding: 8px 10px;
+}
+.mdescLeft {
+ padding: 0px 8px 4px 8px;
+ font-size: 80%;
+ font-style: italic;
+ background-color: #FAFAFA;
+ border-top: 1px none #E0E0E0;
+ border-right: 1px none #E0E0E0;
+ border-bottom: 1px none #E0E0E0;
+ border-left: 1px none #E0E0E0;
+ margin: 0px;
+}
+.mdescRight {
+ padding: 0px 8px 4px 8px;
+ font-size: 80%;
+ font-style: italic;
+ background-color: #FAFAFA;
+ border-top: 1px none #E0E0E0;
+ border-right: 1px none #E0E0E0;
+ border-bottom: 1px none #E0E0E0;
+ border-left: 1px none #E0E0E0;
+ margin: 0px;
+}
+.memItemLeft {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplItemLeft {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplParams {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ color: #606060;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.search { color: #003399;
+ font-weight: bold;
+}
+FORM.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #eeeeff;
+}
+TD.tiny { font-size: 75%;
+}
+a {
+ color: #252E78;
+}
+a:visited {
+ color: #3D2185;
+}
+.dirtab { padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #b0b0b0;
+}
+TH.dirtab { background: #eeeeff;
+ font-weight: bold;
+}
+HR { height: 1px;
+ border: none;
+ border-top: 1px solid black;
+}
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/frame.cpp b/tdescreensaver/kdesavers/tdeasciiquarium/frame.cpp
new file mode 100644
index 00000000..65d77de0
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/frame.cpp
@@ -0,0 +1,175 @@
+#include <tdeglobalsettings.h>
+#include <kdebug.h>
+
+#include <tqvaluevector.h>
+#include <tqstringlist.h>
+#include <tqimage.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+
+#include "frame.h"
+
+void Frame::convertDataToPixmap(const Screen *screen)
+{
+ if(!height() || !width()) {
+ // Assume we're not ready to go.
+ return;
+ }
+
+ int w = screen->cellWidth(), h = screen->cellHeight();
+ TQPixmap pix(width() * w, height() * h);
+ pix.fill();
+
+ TQBitmap mask(pix.size(), true);
+
+ TQPainter p, p2;
+
+ p.begin(&pix, true);
+ p2.begin(&mask, true);
+
+ p.setFont(TDEGlobalSettings::fixedFont());
+ TQFontMetrics fm(p.font());
+ int leadHeight = fm.leading() + fm.descent();
+
+ for(unsigned j = 0; j < m_data.count(); ++j) {
+ TQValueVector<Screen::Pixel> row = m_data[j];
+ if(row.isEmpty())
+ continue;
+
+ unsigned first, last;
+ for (first = 0; first < row.count() && row[first].letter == ' '; ++first)
+ ;
+
+ last = row.count() - 1; // Assume the end is already stripped.
+
+ for(unsigned i = first; i <= last; ++i) {
+ if(row[i].letter == m_transparentChar)
+ continue;
+
+ p2.fillRect(i * w, j * h, w, h, TQt::color1);
+
+ p.setPen(row[i].color);
+ p.fillRect(i * w, j * h, w, h, TQt::black);
+ p.drawText(i * w, j * h + (h - 1 - leadHeight), TQChar(row[i].letter));
+ }
+ }
+
+ pix.setMask(mask);
+
+ TQPixmap erase(pix);
+ erase.fill(TQt::black);
+ erase.setMask(mask);
+
+ m_pixmap = pix;
+ m_erasePixmap = erase;
+
+ // Clear m_data to save a wee bit of memory.
+ m_data.clear();
+}
+
+Frame::Frame (TQString text, TQString mask, TQRgb defaultColor, TQChar transparent)
+{
+ //First, process the pixels.
+
+ TQStringList rows = TQStringList::split('\n', text, true);
+ m_height = rows.size();
+ m_width = 0;
+ m_transparentChar = transparent;
+
+ for (TQStringList::iterator i = rows.begin(); i != rows.end(); ++i)
+ {
+ TQValueVector<Screen::Pixel> row;
+ for (int pos = 0; pos < (*i).length(); ++pos)
+ {
+ Screen::Pixel p;
+ p.letter = (*i).at(pos).unicode();
+ p.color = defaultColor;
+ row.append(p);
+ }
+
+ m_width = TQMAX(m_width, row.size());
+ m_data.append(row);
+ }
+
+ //Now, the colors.
+ TQStringList cols = TQStringList::split('\n', mask, true);
+ int y = 0;
+ for (TQStringList::iterator i = cols.begin(); i != cols.end(); ++i)
+ {
+ if (y >= m_data.size())
+ break;
+
+ for (int pos = 0; pos < (*i).length() && pos < m_data[y].size(); ++pos)
+ {
+ switch ((*i).at(pos).unicode())
+ {
+ //Colors stolen from konsole, TEWidget.cpp
+ case 'R':
+ m_data[y][pos].color = 0xFF5454;
+ break;
+ case 'r':
+ m_data[y][pos].color = 0xB21818;
+ break;
+ case 'C':
+ m_data[y][pos].color = 0x54FFFF;
+ break;
+ case 'c':
+ m_data[y][pos].color = 0x18B2B2;
+ break;
+ case 'Y':
+ m_data[y][pos].color = 0xFFFF54;
+ break;
+ case 'y':
+ m_data[y][pos].color = 0xB26818;
+ break;
+ case 'G':
+ m_data[y][pos].color = 0x54FF54;
+ break;
+ case 'g':
+ m_data[y][pos].color = 0x18B218;
+ break;
+ case 'B':
+ m_data[y][pos].color = 0x5454FF;
+ break;
+ case 'b':
+ m_data[y][pos].color = 0x1818B2;
+ break;
+ case 'M':
+ m_data[y][pos].color = 0xFF54FF;
+ break;
+ case 'm':
+ m_data[y][pos].color = 0xB218B2;
+ break;
+ case 'W':
+ m_data[y][pos].color = 0xFFFFFF;
+ break;
+ case 'w':
+ m_data[y][pos].color = 0xB2B2B2;
+ break;
+ case ' ':
+ break;
+ default:
+ tqDebug("dunno about color code:'%c'", (*i).at(pos).unicode());
+ m_data[y][pos].color = 0xFFFFFF;
+ }
+ }
+ ++y;
+ }
+}
+
+void Frame::paint(Screen* scr, int x, int y)
+{
+ if(m_pixmap.isNull())
+ convertDataToPixmap(scr);
+
+ scr->updateSpan(x, y, m_pixmap);
+}
+
+void Frame::erase(Screen* scr, int x, int y)
+{
+ if(m_erasePixmap.isNull())
+ convertDataToPixmap(scr);
+
+ scr->clearSpan(x, y, m_erasePixmap);
+}
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/frame.h b/tdescreensaver/kdesavers/tdeasciiquarium/frame.h
new file mode 100644
index 00000000..ca62bbab
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/frame.h
@@ -0,0 +1,121 @@
+#ifndef AA_FRAME_H
+#define AA_FRAME_H
+
+#include <tqstring.h>
+#include <tqvaluevector.h>
+#include <tqpixmap.h>
+#include "screen.h"
+
+/**
+ * Represents a single frame of a sprite's animation.
+ *
+ * @see Sprite
+ */
+class Frame
+{
+ /**
+ * Two-dimensional array of Pixels, which represent the appearance of this
+ * frame. This is used to create m_pixmap and m_erasePixmap when they are
+ * needed.
+ *
+ * @see Pixel
+ */
+ TQValueVector<TQValueVector<Screen::Pixel> > m_data;
+
+ /// Masked pixmap of the animation frame. Created by convertDataToPixmap().
+ TQPixmap m_pixmap;
+
+ /// Masked pixmap used to clear frame. Created by convertDataToPixmap().
+ TQPixmap m_erasePixmap;
+
+ /// Height of this frame of animation in logical coordinates.
+ int m_height;
+
+ /// Width of this frame of animation in logical coordinates.
+ int m_width;
+
+ /// Character to be used as a special 'transparent' character. Normally is
+ /// the '?' character.
+ TQChar m_transparentChar;
+
+public:
+
+ /**
+ * Constructs an empty animation Frame. Do not insert this into a Sprite.
+ */
+ Frame() : m_height(0), m_width(0)
+ {
+ }
+
+ /**
+ * Constructs an animation frame.
+ *
+ * @param text Newline-separated text used to construct the Pixel arrays.
+ * The lines do not have to be equal length, any extra needed
+ * characters will automatically be filled with transparency.
+ * Any whitespace at the beginning of a line is converted to
+ * transparency as well.
+ *
+ * @param mask Newline-separated text used to mask \p text's colors. This
+ * can be empty or null in which case no masking is performed.
+ * However, if present, there should be the same number of
+ * lines in \p mask as in \p text, although individual lines
+ * can be shorter or empty as convienient. You can use letters
+ * to stand for colors, e.g. 'r' will make the letter in \p
+ * text at the same position dark red.
+ *
+ * @param defaultColor The default color to apply to characters. This
+ * color is used for all characters in \p text that are
+ * not altered by \p mask.
+ *
+ * @param transparent The character to use to represent transparent areas
+ * in \p text. This can be useful when the
+ * auto-transparency feature can't detect transparent
+ * areas.
+ */
+ Frame(TQString text, TQString mask, TQRgb defaultColor, TQChar transparent = '?');
+
+ /**
+ * Paints this Frame into the given screen.
+ *
+ * @param scr The Screen to draw into.
+ * @param x The logical x coordinate of the left edge of the update region.
+ * @param y The logical y coordinate of the top edge of the update region.
+ */
+ void paint(Screen* scr, int x, int y);
+
+ /**
+ * Erases this Frame from the given screen.
+ *
+ * @param scr The Screen to draw into.
+ * @param x The logical x coordinate of the left edge of the update region.
+ * @param y The logical y coordinate of the top edge of the update region.
+ */
+ void erase(Screen* scr, int x, int y);
+
+ /// Returns the logical width of this frame.
+ int width() const
+ {
+ return m_width;
+ }
+
+ /// Returns the logical height of this frame.
+ int height() const
+ {
+ return m_height;
+ }
+
+protected:
+
+ /**
+ * This function converts the Pixel data in m_data to setup m_pixmap
+ * and m_erasePixmap, which are not setup until this function is called.
+ *
+ * m_data is not valid after this call is performed to save memory.
+ *
+ * @param screen The Screen we will be drawing into later.
+ */
+ void convertDataToPixmap(const Screen *screen);
+};
+
+#endif
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/screen.cpp b/tdescreensaver/kdesavers/tdeasciiquarium/screen.cpp
new file mode 100644
index 00000000..ade5abc1
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/screen.cpp
@@ -0,0 +1,222 @@
+#include <tqcolor.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
+
+#include <tdeglobalsettings.h>
+
+#include "screen.h"
+#include "sprite.h"
+#include "aasaver.h"
+
+Screen::Screen(AASaver* widget): m_widget(widget)
+{
+ TQFontMetrics fm(TDEGlobalSettings::fixedFont());
+
+ // Compute cell geometries.
+ m_cellW = fm.maxWidth();
+ m_cellH = fm.lineSpacing();
+
+ // Computer number of full cells that will fit.
+ m_width = widget->width() / m_cellW;
+ m_height = widget->height() / m_cellH;
+
+ // Calculate offset needed to evenly distribute excess screen space.
+ m_offX = (widget->width() - m_width * m_cellW) / 2;
+ m_offY = (widget->height() - m_height * m_cellH) / 2;
+
+ // Create double buffer.
+ m_backBuffer = TQPixmap(m_widget->size());
+ m_backBuffer.fill(black);
+
+ // FIXME: handle resizing!
+
+ // Setup animation timer.
+ TQTimer* timer = new TQTimer(this);
+ connect(timer, SIGNAL(timeout()), SLOT(doAnimate()));
+
+ timer->start(msPerTick());
+}
+
+int Screen::msPerTick() const
+{
+ return 50;
+}
+
+Screen::~Screen()
+{
+}
+
+void Screen::updateSpan(int x, int y, const TQPixmap &updatePixmap)
+{
+ if (y < 0 || y >= m_height) return;
+
+ TQPoint upperLeft(m_offX + x * m_cellW, m_offY + y * m_cellH);
+ bitBlt(&m_backBuffer, upperLeft, &updatePixmap, updatePixmap.rect(), TQt::CopyROP);
+ m_widget->update(TQRect(upperLeft, updatePixmap.size()));
+}
+
+void Screen::clearSpan(int x, int y, const TQPixmap &clearPixmap)
+{
+ if (y < 0 || y >= m_height) return;
+
+ TQPoint upperLeft(m_offX + x * m_cellW, m_offY + y * m_cellH);
+ bitBlt(&m_backBuffer, upperLeft, &clearPixmap, clearPixmap.rect(), TQt::CopyROP);
+ m_widget->update(TQRect(upperLeft, clearPixmap.size()));
+}
+
+//Actually paints the region on the widget.
+void Screen::paint(TQRegion r)
+{
+ TQPainter p(m_widget);
+ TQMemArray<TQRect> rects = r.rects();
+
+ for (int r = 0; r < rects.size(); ++r)
+ {
+ //Determine the grid locations described by the rect
+ TQRect bound = rects[r];
+
+ bitBlt(m_widget, bound.topLeft(), &m_backBuffer, bound, TQt::CopyROP);
+ } //for rect in region
+};
+
+/**
+ * Utility type used to faciliate sorting of the Sprite list in order to
+ * implement the Painter's Algorithm when painting the back buffer.
+ */
+struct ZKey
+{
+ /**
+ * Logical depth of sprite. Now 0 is farthest away from the eyes, unlike
+ * with Sprite::depth().
+ */
+ int z;
+
+ Sprite* addr;
+
+ ZKey(): z(0), addr(0)
+ {}
+
+ ZKey(Sprite* spr): z(1000 - spr->depth()), addr(spr)
+ {}
+
+ bool operator<(const ZKey& other) const
+ {
+ if (z < other.z) return true;
+ if (z > other.z) return false;
+
+ return addr < other.addr;
+ }
+};
+
+void Screen::doAnimate()
+{
+ //First, rebuild a new list of sprites, and build a dirty region
+ TQRegion dirtyRegion;
+
+ TQValueVector<Sprite*> sprites;
+ TQValueVector<Sprite*> colliders;
+
+ // Look for sprites that can suffer a collision.
+ for (unsigned pos = 0; pos < m_sprites.size(); ++pos)
+ {
+ if(m_sprites[pos]->canCollide())
+ colliders.append(m_sprites[pos]);
+ }
+
+ // Find collisions.
+ // FIXME: Use transparent regions for accuracy.
+ for (unsigned pos = 0; pos < colliders.size(); ++pos)
+ for (unsigned sprite = 0; sprite < m_sprites.size(); ++sprite)
+ {
+ if(m_sprites[sprite] == colliders[pos])
+ continue;
+
+ if(colliders[pos]->geom().intersects(m_sprites[sprite]->geom()))
+ colliders[pos]->collision(m_sprites[sprite]);
+ }
+
+ //Retain all live existing sprites
+ for (int pos = 0; pos < m_sprites.size(); ++pos)
+ {
+ Sprite* sprite = m_sprites[pos];
+ TQRect oldRect = sprite->geom();
+ if (!sprite->isKilled()) {
+ bool dirty = sprite->tickUpdate();
+
+ if (dirty)
+ dirtyRegion |= oldRect | sprite->geom();
+
+ if (!sprite->isKilled())
+ sprites.append(sprite);
+ }
+
+ if (sprite->isKilled()) //note:may be made true by updateTick!
+ {
+ dirtyRegion |= oldRect;
+ delete sprite;
+ }
+ }
+
+ //Add new sprites.
+ for (int pos = 0; pos < m_addedSprites.size(); ++pos)
+ {
+ dirtyRegion |= m_addedSprites[pos]->geom();
+ sprites.append(m_addedSprites[pos]);
+ }
+
+ m_addedSprites.clear();
+ m_sprites = sprites;
+
+ //Compute the list of sprites affected. Note that this is
+ //done iteratively until fixed point.
+ TQValueVector<Sprite*> paintSprites;
+ TQValueVector<Sprite*> remSprites;
+
+ bool changed;
+ do
+ {
+ changed = false;
+ remSprites.clear();
+
+ for (int c = 0; c < sprites.size(); ++c)
+ {
+ Sprite* sprite = sprites[c];
+
+ if (dirtyRegion.intersect(sprite->geom()).isEmpty())
+ remSprites.append(sprite); //not to be painted thus far
+ else
+ {
+ //This sprite is to be painted
+ paintSprites.append(sprite);
+
+ //make sure we repaint everything overlapping it
+ dirtyRegion |= sprite->geom();
+ changed = true;
+ }
+ }
+ sprites = remSprites;
+ }
+ while (changed);
+
+ //Z-sort the items.
+ TQMap<ZKey, Sprite* > sorted;
+ for (int pos = 0; pos < paintSprites.size(); ++pos)
+ sorted[ZKey(paintSprites[pos])] = paintSprites[pos];
+
+ //Paint, in Z-order
+ for (TQMapIterator<ZKey, Sprite*> i = sorted.begin();
+ i != sorted.end(); ++i)
+ i.data()->paint();
+
+ // Make sure black strip at edge is still present.
+ if(!paintSprites.isEmpty())
+ {
+ TQPainter p(&m_backBuffer);
+ p.fillRect(m_backBuffer.width() - m_offX, 0, m_offX, m_backBuffer.height(), TQt::black);
+ }
+}
+
+#include "screen.moc"
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/screen.h b/tdescreensaver/kdesavers/tdeasciiquarium/screen.h
new file mode 100644
index 00000000..b6e7f92b
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/screen.h
@@ -0,0 +1,142 @@
+#ifndef AA_SCREEN_H
+#define AA_SCREEN_H
+
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
+#include <tqpixmap.h>
+
+class Sprite;
+class AASaver;
+
+/**
+ * This is the main display class of Asciiquarium. We use a pseudo-terminal-ish
+ * type coordinate system, where although this is a full fledged GUI application,
+ * Sprites and most external functions deal with logical text position
+ * coordinates instead of GUI coordinates. (x, y) starts in the upper-left of
+ * the real screen at (0, 0), and continues on to (width - 1, height - 1).
+ *
+ * Use addSprite() to add new Sprites to the Screen after you have created them
+ * and added their Frames.
+ */
+class Screen: public TQObject
+{
+ Q_OBJECT
+
+public:
+ /**
+ * Represents a logical character on the Screen.
+ */
+ struct Pixel {
+ char letter; ///< Character to display in the cell.
+ TQRgb color; ///< Color to use for the cell.
+
+ /// Default constructor.
+ Pixel(): letter(' '), color(0)
+ {
+ }
+ };
+
+private:
+ AASaver* m_widget; ///< Widget that we should paint on.
+ int m_width; ///< Number of logical columns in the screen.
+ int m_height; ///< Number of logical rows on the screen.
+ int m_offX; ///< Number of pixels on left side needed to center image.
+ int m_offY; ///< Number of pixels on top side needed to center image.
+
+ /** Pixmap cache of the image used to speed up rendering. All paints happen
+ * to the pixmap, which is then bitBlt()'ed to m_widget when the time comes
+ * to paint.
+ */
+ TQPixmap m_backBuffer;
+
+ int m_cellW; ///< The GUI width of a character cell.
+ int m_cellH; ///< The GUI height of a character cell.
+
+ TQValueVector<Sprite*> m_sprites; ///< List of Sprites on screen.
+ TQValueVector<Sprite*> m_addedSprites; ///< List of Sprites to be added next frame.
+
+private slots:
+ /**
+ * Handles updating the screen buffer to draw the next frame.
+ */
+ void doAnimate();
+
+public:
+ /**
+ * Constructor.
+ *
+ * @param widget The widget to draw on.
+ */
+ Screen(AASaver* widget);
+ ~Screen();
+
+ /// Returns the logical width of the screen.
+ int width() const
+ {
+ return m_width;
+ }
+
+ /// Returns the logical height of the screen.
+ int height() const
+ {
+ return m_height;
+ }
+
+ /// Returns the GUI width of a character cell.
+ int cellWidth() const
+ {
+ return m_cellW;
+ }
+
+ /// Returns the GUI height of a character cell.
+ int cellHeight() const
+ {
+ return m_cellH;
+ }
+
+ /**
+ * Adds a sprite to the internal sprite list.
+ *
+ * @param sprite The Sprite to add. It will show up in the next frame.
+ */
+ void addSprite(Sprite* sprite)
+ {
+ m_addedSprites.append(sprite);
+ }
+
+ /// Returns the number of milliseconds separating each animation tick.
+ int msPerTick() const;
+
+ /**
+ * Updates the backbuffer, and asks the portion of the widget to be
+ * repainted.
+ *
+ * @param x The logical x coordinate of the left edge of the update area.
+ * @param y The logical y coordinate of the top edge of the update area.
+ * @param updatePixmap The pixmap to draw into the buffer, which should be
+ * masked to only draw non-transparent regions.
+ */
+ void updateSpan(int x, int y, const TQPixmap &updatePixmap);
+
+ /**
+ * Clear the given portion of the backbuffer, asks for a repaint.
+ *
+ * @param x The logical x coordinate of the left edge of the update region.
+ * @param y The logical y coordinate of the top edge of the update region.
+ * @param clearPixmap the pixmap to use to clear the span, which should be
+ * the background color of the Screen, and masked to
+ * only draw the area that needs cleared.
+ */
+ void clearSpan(int x, int y, const TQPixmap &clearPixmap);
+
+ /**
+ * Actually paints the region on the widget.
+ *
+ * @param r The region of the widget to update.
+ */
+ void paint(TQRegion r);
+};
+
+#endif
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/settingswidget.ui b/tdescreensaver/kdesavers/tdeasciiquarium/settingswidget.ui
new file mode 100644
index 00000000..16ead9a2
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/settingswidget.ui
@@ -0,0 +1,50 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>SettingsWidget</class>
+<widget class="TQWidget">
+ <property name="name">
+ <cstring>SettingsWidget</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>399</width>
+ <height>45</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Asciiquarium Settings</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Number of Fish:</string>
+ </property>
+ </widget>
+ <widget class="TQSpinBox">
+ <property name="name">
+ <cstring>kcfg_fishCount</cstring>
+ </property>
+ <property name="maxValue">
+ <number>50</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ <property name="lineStep">
+ <number>5</number>
+ </property>
+ <property name="value">
+ <number>15</number>
+ </property>
+ </widget>
+ </hbox>
+</widget>
+<layoutdefaults spacing="6" margin="0"/>
+</UI>
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/sprite.cpp b/tdescreensaver/kdesavers/tdeasciiquarium/sprite.cpp
new file mode 100644
index 00000000..11d7d360
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/sprite.cpp
@@ -0,0 +1,64 @@
+#include "sprite.h"
+
+Sprite::Sprite(Screen* screen, int x, int y, int z, int frameDelay):
+ m_screen(screen), m_currentFrame(0), m_x(x), m_y(y), m_z(z),
+ m_isKilled(false), m_killAfterLastFrame(false),
+ m_ticksSinceFrameChange(0), m_frameDelay(frameDelay)
+{
+}
+
+void Sprite::addFrame(const Frame& frame)
+{
+ m_frames.append(frame);
+}
+
+void Sprite::erase()
+{
+ m_frames[m_currentFrame].erase(m_screen, m_x, m_y);
+}
+
+void Sprite::paint()
+{
+ m_frames[m_currentFrame].paint(m_screen, m_x, m_y);
+}
+
+bool Sprite::timerTick()
+{
+ ++m_ticksSinceFrameChange;
+ if (m_ticksSinceFrameChange * m_screen->msPerTick() < m_frameDelay)
+ return false;
+
+ //Ring! Ring!
+ m_ticksSinceFrameChange = 0;
+ return true;
+}
+
+bool Sprite::tickUpdate()
+{
+ if (m_frames.size() == 1)
+ return false;
+
+ if (!timerTick())
+ return false;
+
+ erase();
+
+ ++m_currentFrame;
+ if (m_currentFrame == m_frames.size())
+ {
+ m_currentFrame = 0;
+
+ if(m_killAfterLastFrame)
+ {
+ erase();
+ kill();
+ }
+ }
+
+ return true;
+}
+
+TQRect Sprite::geom() const
+{
+ return TQRect(m_x, m_y, m_frames[0].width(), m_frames[0].height());
+}
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/sprite.h b/tdescreensaver/kdesavers/tdeasciiquarium/sprite.h
new file mode 100644
index 00000000..0eb3a0a7
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/sprite.h
@@ -0,0 +1,178 @@
+#ifndef AA_SPRITE_H
+#define AA_SPRITE_H
+
+#include <tqvaluevector.h>
+#include "frame.h"
+
+/**
+ * This class represents a on-screen character of some sort. These make up
+ * the building blocks of the animation.
+ *
+ * You can use multiple frames of animation, but movement is not supported in
+ * this class, try MovingSprite. If you use multiple frames, use
+ * setFrameDelay to control the interval between frames, and use
+ * setDieAfterLastFrame to set whether the animation should loop or cause
+ * the Sprite to go away.
+ *
+ * Use kill() to get rid of a Sprite, do not delete it by yourself, as Screen
+ * will do that as needed.
+ */
+class Sprite
+{
+protected:
+ Screen* m_screen; ///< The Screen that we belong to.
+ int m_currentFrame; ///< The current frame of animation.
+ int m_x; ///< Our current logical x position.
+ int m_y; ///< Our current logical y position.
+ int m_z; ///< Our current depth.
+
+ TQValueVector<Frame> m_frames; ///< Array of animation frames.
+ bool m_isKilled; ///< True if we've been killed.
+ bool m_killAfterLastFrame; ///< True if we should auto-kill after the last frame.
+ int m_ticksSinceFrameChange; ///< Number of timer ticks since we last changed frame.
+ int m_frameDelay; ///< Number of milliseconds to show a frame for.
+
+ /**
+ * Increments the animation timer.
+ *
+ * @return true if time has elapsed past m_frameDelay since the last frame
+ * change.
+ */
+ bool timerTick();
+
+public:
+ /**
+ * Construct a sprite without automatically adding it to \p screen.
+ *
+ * @param screen The Screen that the sprite belongs to.
+ * @param x The x column position for the left edge of this sprite.
+ * @param y The y row position for the upper line of this sprite.
+ * @param z The depth of the sprite (0 is closest to screen).
+ * @param frameDelay Amount of milliseconds to elapse between animation
+ * frames.
+ */
+ Sprite(Screen* screen, int x, int y, int z, int frameDelay = 100);
+
+ /**
+ * Destuctor. Does nothing at this point, present to ensure a continuous
+ * line of virtual destructors.
+ */
+ virtual ~Sprite()
+ {
+ }
+
+ /**
+ * @return true if this sprite can be involved in a collision with another
+ * Sprite. The other sprite doesn't necessarily have to have this
+ * also set to true.
+ */
+ virtual bool canCollide() const { return false; }
+
+ /**
+ * Called when a collision occurs with *any* Sprite on-screen if canCollide()
+ * returns true.
+ *
+ * @param sprite The Sprite that a collision happened with. It is safe to
+ * kill() the Sprite, move it, etc.
+ */
+ virtual void collision (Sprite *sprite)
+ {
+ }
+
+ /**
+ * Appends a frame of animation to the end of the current list.
+ *
+ * @param frame Frame of animation to add. It should be the same size as
+ * the other frames already in the list.
+ */
+ void addFrame(const Frame& frame);
+
+ /**
+ * Sets the amount of time to show a frame for.
+ *
+ * @param delay The frame delay, in milliseconds of time.
+ */
+ void setFrameDelay(int delay)
+ {
+ m_frameDelay = delay;
+ }
+
+ /**
+ * Sets whether this Sprite should automatically call kill() after the
+ * last frame of animation has run.
+ *
+ * @param dieAfterLast If true, this Sprite will automatically call kill()
+ * after its last frame has elapsed.
+ */
+ void setDieAfterLastFrame(bool dieAfterLast)
+ {
+ m_killAfterLastFrame = dieAfterLast;
+ }
+
+ /**
+ * @return The Screen this Sprite belongs to.
+ */
+ Screen *screen() const
+ {
+ return m_screen;
+ }
+
+ /**
+ * @return true if this Sprite is dead. If true, it will probably soon be
+ * deleted by its Screen.
+ */
+ bool isKilled() const
+ {
+ return m_isKilled;
+ }
+
+ /**
+ * @return The depth of the Sprite. 0 is closest to the screen.
+ */
+ int depth() const
+ {
+ return m_z;
+ }
+
+ /**
+ * @return The rectangular geometry of this object in the Pixel coordinate
+ * system.
+ */
+ TQRect geom() const;
+
+ /**
+ * Erases this Sprite from its Screen, using the current animation frame to
+ * form the clear mask. This should be called *before* any change which
+ * will change the on-screen display of the object, such as motion or
+ * animation changes.
+ */
+ void erase();
+
+ /**
+ * Draws this Sprite onto the Screen.
+ */
+ void paint();
+
+ /**
+ * Kills this Sprite. The parent Screen will delete this Sprite on the next
+ * animation cycle.
+ */
+ virtual void kill()
+ {
+ m_isKilled = true;
+ }
+
+ //main animation hook. Should return true + erase if something changed
+ /**
+ * Called when the current frame expires. This function needs to perform
+ * any actions necessary to make sure that it is ready to be painted,
+ * including calling erase(). You do not need to call paint() from this
+ * function.
+ *
+ * @return true if the on-screen representation of this Sprite changed,
+ * false, otherwise.
+ */
+ virtual bool tickUpdate();
+};
+
+#endif
diff --git a/tdescreensaver/kdesavers/tdeasciiquarium/tdeasciiquarium.desktop b/tdescreensaver/kdesavers/tdeasciiquarium/tdeasciiquarium.desktop
new file mode 100644
index 00000000..65a4e90e
--- /dev/null
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/tdeasciiquarium.desktop
@@ -0,0 +1,23 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=tdeasciiquarium.kss
+Icon=tdescreensaver
+Type=Application
+Actions=InWindow;Root;Setup
+Name=TDEAsciiquarium
+X-TDE-Category=Miscellaneous
+
+[Desktop Action InWindow]
+Exec=tdeasciiquarium.kss -window-id %w
+Name=Display in specified window
+NoDisplay=true
+
+[Desktop Action Root]
+Exec=tdeasciiquarium.kss -root
+Name=Display in root window
+NoDisplay=true
+
+[Desktop Action Setup]
+Exec=tdeasciiquarium.kss -setup
+Name=Display setup dialog
+NoDisplay=true