summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt117
-rw-r--r--ConfigureChecks.cmake4
-rw-r--r--asciiquarium/src/sprite.cpp94
-rw-r--r--tdescreensaver/kdesavers/CMakeLists.txt5
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/AASaverConfig.kcfgc (renamed from asciiquarium/src/AASaverConfig.kcfgc)0
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/CMakeLists.txt42
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/COPYRIGHT26
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/Doxyfile (renamed from asciiquarium/src/Doxyfile)0
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/README1
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/aasaver.cpp (renamed from asciiquarium/src/aasaver.cpp)48
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/aasaver.h (renamed from asciiquarium/src/aasaver.h)29
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/asciiquarium.kcfg (renamed from asciiquarium/src/asciiquarium.kcfg)2
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/doxygen-stylesheet.css (renamed from asciiquarium/src/doxygen-stylesheet.css)0
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/frame.cpp (renamed from asciiquarium/src/frame.cpp)41
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/frame.h (renamed from asciiquarium/src/frame.h)35
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/screen.cpp (renamed from asciiquarium/src/screen.cpp)41
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/screen.h (renamed from asciiquarium/src/screen.h)39
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/settingswidget.ui (renamed from asciiquarium/src/settingswidget.ui)0
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/sprite.cpp64
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/sprite.h (renamed from asciiquarium/src/sprite.h)31
-rw-r--r--tdescreensaver/kdesavers/tdeasciiquarium/tdeasciiquarium.desktop (renamed from asciiquarium/src/asciiquarium.desktop)10
21 files changed, 236 insertions, 393 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 160a244d..cdb7eae1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,18 +1,18 @@
-#################################################
-#
-# (C) 2011 Golubev Alexander
-# fatzer2 (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
+###########################################
+# #
+# (C) 2011 Golubev Alexander #
+# fatzer2 (AT) gmail.com #
+# #
+# Improvements and feedback are welcome #
+# #
+# This file is released under GPL >= 2 #
+# #
+###########################################
cmake_minimum_required( VERSION 2.8.12 )
-##### general package setup #####################
+##### general package setup
project( tdeartwork )
@@ -20,7 +20,7 @@ set( PACKAGE tdeartwork )
set( VERSION R14.0.11 )
-##### include essential cmake modules ###########
+##### include essential cmake modules
include( FindPkgConfig )
include( CheckIncludeFile )
@@ -29,79 +29,84 @@ include( CheckCXXSourceCompiles )
include( CheckSymbolExists )
-##### include our cmake modules #################
+##### include our cmake modules
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
-##### setup install paths #######################
+##### setup install paths
include( TDESetupPaths )
tde_setup_paths( )
-##### optional stuff ############################
+##### optional stuff
-option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
+option( WITH_XSCREENSAVER "Enable xscreensavers support" ${WITH_ALL_OPTIONS} )
+option( WITH_ALL_INCLUDED_XSCREENSAVERS "Install all included desktop files" OFF ) #regardless of the presence of XML
+option( WITH_LIBART "Enable libart support" ${WITH_ALL_OPTIONS} )
+option( WITH_OPENGL "Enable 3D GL modes" ${WITH_ALL_OPTIONS} )
+option( WITH_ARTS "Enable aRts support" OFF )
-option( WITH_XSCREENSAVER "Enable xscreensavers support" ${WITH_ALL_OPTIONS} )
-option( WITH_ALL_INCLUDED_XSCREENSAVERS
- "Install all included desktop files regardless of the presence of XML" OFF )
-option( WITH_LIBART "Enable libart support" ${WITH_ALL_OPTIONS} )
-option( WITH_OPENGL "Enable 3D GL modes" ${WITH_ALL_OPTIONS} )
-option( WITH_ARTS "Enable aRts support" OFF )
+########### options comments ##############
+# #
+# affects tdescreensaver build: #
+# #
+# WITH_XSCREENSAVER #
+# WITH_ALL_INCLUDED_XSCREENSAVERS #
+# WITH_LIBART #
+# WITH_OPENGL #
+# WITH_ARTS #
+# #
+##############################################
-##### options comments ##########################
-
-# WITH_XSCREENSAVER affects tdescreensaver
-# WITH_ALL_INCLUDED_XSCREENSAVERS affects tdescreensaver
-# WITH_LIBART affects tdescreensaver
-# WITH_OPENGL affects tdescreensaver
-# WITH_ARTS affects tdescreensaver
# NOTE: These flags control which screensavers are compiled/installed.
-##### user requested modules ####################
+##### user requested modules
+
+option( BUILD_ALL "Build all" ON )
+option( BUILD_EMOTICONS "Build emoticons" ${BUILD_ALL} )
+option( BUILD_ICEWM_THEMES "Build icewm-themes" ${BUILD_ALL} )
+option( BUILD_ICON_THEMES "Build icon themes" ${BUILD_ALL} )
+option( BUILD_TDESCREENSAVER "Build tdescreensaver" ${BUILD_ALL} )
+option( BUILD_TWIN_STYLES "Build twin styles" ${BUILD_ALL} )
+option( BUILD_KWORLDCLOCK "Build kworldclock" ${BUILD_ALL} )
+option( BUILD_SOUNDS "Build sounds" ${BUILD_ALL} )
+option( BUILD_STYLES "Build styles" ${BUILD_ALL} )
+option( BUILD_WALLPAPERS "Build wallpapers" ${BUILD_ALL} )
+option( BUILD_TDEASCIIQUARIUM "Build tdeasciiquarium screen saver" ${BUILD_ALL} )
-option( BUILD_ALL "Build all" OFF )
-option( BUILD_EMOTICONS "Build emoticons" ${BUILD_ALL} )
-option( BUILD_ICEWM_THEMES "Build icewm-themes" ${BUILD_ALL} )
-option( BUILD_ICON_THEMES "Build icon themes" ${BUILD_ALL} )
-option( BUILD_TDESCREENSAVER "Build tdescreensaver" ${BUILD_ALL} )
-option( BUILD_TWIN_STYLES "Build twin styles" ${BUILD_ALL} )
-option( BUILD_KWORLDCLOCK "Build kworldclock" ${BUILD_ALL} )
-option( BUILD_SOUNDS "Build sounds" ${BUILD_ALL} )
-option( BUILD_STYLES "Build styles" ${BUILD_ALL} )
-option( BUILD_WALLPAPERS "Build wallpapers" ${BUILD_ALL} )
-##### configure checks ##########################
+##### configure checks
include( ConfigureChecks.cmake )
-###### global compiler settings #################
-add_definitions(
- -DHAVE_CONFIG_H
-)
+###### global compiler settings
+
+add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
-##### tdenetwork directories ####################
+##### tdenetwork directories
+
+tde_conditional_add_subdirectory( BUILD_EMOTICONS emoticons )
+tde_conditional_add_subdirectory( BUILD_ICEWM_THEMES icewm-themes )
+tde_conditional_add_subdirectory( BUILD_ICON_THEMES IconThemes )
+tde_conditional_add_subdirectory( BUILD_TDESCREENSAVER tdescreensaver )
+tde_conditional_add_subdirectory( BUILD_TWIN_STYLES twin-styles )
+tde_conditional_add_subdirectory( BUILD_KWORLDCLOCK kworldclock )
+tde_conditional_add_subdirectory( BUILD_SOUNDS sounds )
+tde_conditional_add_subdirectory( BUILD_STYLES styles )
+tde_conditional_add_subdirectory( BUILD_WALLPAPERS wallpapers )
-tde_conditional_add_subdirectory( BUILD_EMOTICONS emoticons )
-tde_conditional_add_subdirectory( BUILD_ICEWM_THEMES icewm-themes )
-tde_conditional_add_subdirectory( BUILD_ICON_THEMES IconThemes )
-tde_conditional_add_subdirectory( BUILD_TDESCREENSAVER tdescreensaver )
-tde_conditional_add_subdirectory( BUILD_TWIN_STYLES twin-styles )
-tde_conditional_add_subdirectory( BUILD_KWORLDCLOCK kworldclock )
-tde_conditional_add_subdirectory( BUILD_SOUNDS sounds )
-tde_conditional_add_subdirectory( BUILD_STYLES styles )
-tde_conditional_add_subdirectory( BUILD_WALLPAPERS wallpapers )
-##### write configure files #####################
+##### write configure files
configure_file( config.h.cmake config.h @ONLY )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 28079e4c..592333db 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -95,3 +95,7 @@ if( BUILD_TDESCREENSAVER )
endif( )
endif( WITH_XSCREENSAVER )
endif( BUILD_TDESCREENSAVER )
+
+if( BUILD_TDEASCIIQUARIUM AND (NOT BUILD_TDESCREENSAVER) )
+ tde_message_fatal( "tdescreensaver build is mandatory for tdeasciiquarium" )
+endif()
diff --git a/asciiquarium/src/sprite.cpp b/asciiquarium/src/sprite.cpp
deleted file mode 100644
index 5606e489..00000000
--- a/asciiquarium/src/sprite.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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.
- */
-
-#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());
-}
-
-
-// vim: set et ts=8 sw=4:
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/asciiquarium/src/AASaverConfig.kcfgc b/tdescreensaver/kdesavers/tdeasciiquarium/AASaverConfig.kcfgc
index f709650b..f709650b 100644
--- a/asciiquarium/src/AASaverConfig.kcfgc
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/AASaverConfig.kcfgc
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/asciiquarium/src/Doxyfile b/tdescreensaver/kdesavers/tdeasciiquarium/Doxyfile
index 9588f8b2..9588f8b2 100644
--- a/asciiquarium/src/Doxyfile
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/Doxyfile
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/asciiquarium/src/aasaver.cpp b/tdescreensaver/kdesavers/tdeasciiquarium/aasaver.cpp
index 0fba1340..daf09d97 100644
--- a/asciiquarium/src/aasaver.cpp
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/aasaver.cpp
@@ -1,36 +1,3 @@
-/*
- * 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>
- *
- * ASCII Art was mostly created by Joan Stark:
- * http://www.geocities.com/SoHo/7373/
- *
- * the rest was crafted by Kirk Baucom, and all of it was edited by
- * Maksim Orlovich and Michael Pyne to adopt to C++ formatting.
- *
- * 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.
- */
-
//Stub stolen from:
// klines 0.1.1 - Basic screen saver for KDE
// by Dirk Staneker 1997
@@ -39,9 +6,9 @@
#include <tdelocale.h>
#include <tdeconfigdialog.h>
-#include <ntqdesktopwidget.h>
-#include <ntqpainter.h>
-#include <ntqbrush.h>
+#include <tqdesktopwidget.h>
+#include <tqpainter.h>
+#include <tqbrush.h>
#include "screen.h"
#include "frame.h"
@@ -1228,8 +1195,8 @@ void AASaver::paintEvent(TQPaintEvent* pe)
// libkscreensaver interface
extern "C"
{
- KDE_EXPORT const char *kss_applicationName = "asciiquarium.kss";
- KDE_EXPORT const char *kss_description = I18N_NOOP( "Asciiquarium" );
+ 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 )
@@ -1246,11 +1213,8 @@ extern "C"
dialog = new TDEConfigDialog(0, "settings", AASaverConfig::self());
SettingsWidget *settings = new SettingsWidget(0, "settings_widget");
- dialog->addPage(settings, i18n("Asciiquarium Settings"), "tdescreensaver");
+ dialog->addPage(settings, i18n("TDEAsciiquarium Settings"), "tdescreensaver");
return dialog;
}
}
-
-
-// vim: set et ts=8 sw=4:
diff --git a/asciiquarium/src/aasaver.h b/tdescreensaver/kdesavers/tdeasciiquarium/aasaver.h
index 94a95b36..ce0d3faa 100644
--- a/asciiquarium/src/aasaver.h
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/aasaver.h
@@ -1,30 +1,3 @@
-/*
- * 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.
- */
-
#ifndef AA_AASAVER_H
#define AA_AASAVER_H
@@ -195,5 +168,3 @@ public:
};
#endif /* AA_AASAVER_H */
-
-// vim: set et ts=8 sw=4:
diff --git a/asciiquarium/src/asciiquarium.kcfg b/tdescreensaver/kdesavers/tdeasciiquarium/asciiquarium.kcfg
index 244a1197..87701bce 100644
--- a/asciiquarium/src/asciiquarium.kcfg
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/asciiquarium.kcfg
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
<kcfg>
- <kcfgfile name="asciiquariumrc"/>
+ <kcfgfile name="tdeasciiquariumrc"/>
<group name="Settings">
<entry name="fishCount" type="Int">
<label>Amount of fish to have in the sea.</label>
diff --git a/asciiquarium/src/doxygen-stylesheet.css b/tdescreensaver/kdesavers/tdeasciiquarium/doxygen-stylesheet.css
index b42407b6..b42407b6 100644
--- a/asciiquarium/src/doxygen-stylesheet.css
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/doxygen-stylesheet.css
diff --git a/asciiquarium/src/frame.cpp b/tdescreensaver/kdesavers/tdeasciiquarium/frame.cpp
index ef5997f1..65d77de0 100644
--- a/asciiquarium/src/frame.cpp
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/frame.cpp
@@ -1,39 +1,12 @@
-/*
- * 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.
- */
-
#include <tdeglobalsettings.h>
#include <kdebug.h>
-#include <ntqvaluevector.h>
-#include <ntqstringlist.h>
-#include <ntqimage.h>
-#include <ntqfontmetrics.h>
-#include <ntqpainter.h>
-#include <ntqbitmap.h>
+#include <tqvaluevector.h>
+#include <tqstringlist.h>
+#include <tqimage.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
#include "frame.h"
@@ -200,5 +173,3 @@ void Frame::erase(Screen* scr, int x, int y)
scr->clearSpan(x, y, m_erasePixmap);
}
-
-// vim: set et ts=8 sw=4:
diff --git a/asciiquarium/src/frame.h b/tdescreensaver/kdesavers/tdeasciiquarium/frame.h
index 915b58ca..ca62bbab 100644
--- a/asciiquarium/src/frame.h
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/frame.h
@@ -1,36 +1,9 @@
-/*
- * 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.
- */
-
#ifndef AA_FRAME_H
#define AA_FRAME_H
-#include <ntqstring.h>
-#include <ntqvaluevector.h>
-#include <ntqpixmap.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
+#include <tqpixmap.h>
#include "screen.h"
/**
@@ -146,5 +119,3 @@ protected:
};
#endif
-
-// vim: set et ts=8 sw=4:
diff --git a/asciiquarium/src/screen.cpp b/tdescreensaver/kdesavers/tdeasciiquarium/screen.cpp
index 534e8b07..ade5abc1 100644
--- a/asciiquarium/src/screen.cpp
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/screen.cpp
@@ -1,36 +1,9 @@
-/*
- * 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.
- */
-
-#include <ntqcolor.h>
-#include <ntqfontmetrics.h>
-#include <ntqpainter.h>
-#include <ntqpixmap.h>
-#include <ntqtimer.h>
-#include <ntqwidget.h>
+#include <tqcolor.h>
+#include <tqfontmetrics.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <tdeglobalsettings.h>
@@ -247,5 +220,3 @@ void Screen::doAnimate()
}
#include "screen.moc"
-
-// vim: set et ts=8 sw=4:
diff --git a/asciiquarium/src/screen.h b/tdescreensaver/kdesavers/tdeasciiquarium/screen.h
index 26fa3efd..b6e7f92b 100644
--- a/asciiquarium/src/screen.h
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/screen.h
@@ -1,38 +1,11 @@
-/*
- * 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.
- */
-
#ifndef AA_SCREEN_H
#define AA_SCREEN_H
-#include <ntqcolor.h>
-#include <ntqfont.h>
-#include <ntqobject.h>
-#include <ntqvaluevector.h>
-#include <ntqpixmap.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
+#include <tqpixmap.h>
class Sprite;
class AASaver;
@@ -167,5 +140,3 @@ public:
};
#endif
-
-// vim: set et ts=8 sw=4:
diff --git a/asciiquarium/src/settingswidget.ui b/tdescreensaver/kdesavers/tdeasciiquarium/settingswidget.ui
index 16ead9a2..16ead9a2 100644
--- a/asciiquarium/src/settingswidget.ui
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/settingswidget.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/asciiquarium/src/sprite.h b/tdescreensaver/kdesavers/tdeasciiquarium/sprite.h
index 927c149c..0eb3a0a7 100644
--- a/asciiquarium/src/sprite.h
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/sprite.h
@@ -1,34 +1,7 @@
-/*
- * 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.
- */
-
#ifndef AA_SPRITE_H
#define AA_SPRITE_H
-#include <ntqvaluevector.h>
+#include <tqvaluevector.h>
#include "frame.h"
/**
@@ -203,5 +176,3 @@ public:
};
#endif
-
-// vim: set et ts=8 sw=4:
diff --git a/asciiquarium/src/asciiquarium.desktop b/tdescreensaver/kdesavers/tdeasciiquarium/tdeasciiquarium.desktop
index 1bdbc754..65a4e90e 100644
--- a/asciiquarium/src/asciiquarium.desktop
+++ b/tdescreensaver/kdesavers/tdeasciiquarium/tdeasciiquarium.desktop
@@ -1,23 +1,23 @@
[Desktop Entry]
Encoding=UTF-8
-Exec=asciiquarium.kss
+Exec=tdeasciiquarium.kss
Icon=tdescreensaver
Type=Application
Actions=InWindow;Root;Setup
-Name=Asciiquarium
+Name=TDEAsciiquarium
X-TDE-Category=Miscellaneous
[Desktop Action InWindow]
-Exec=asciiquarium.kss -window-id %w
+Exec=tdeasciiquarium.kss -window-id %w
Name=Display in specified window
NoDisplay=true
[Desktop Action Root]
-Exec=asciiquarium.kss -root
+Exec=tdeasciiquarium.kss -root
Name=Display in root window
NoDisplay=true
[Desktop Action Setup]
-Exec=asciiquarium.kss -setup
+Exec=tdeasciiquarium.kss -setup
Name=Display setup dialog
NoDisplay=true