From c2217d557536ce6c8b6fd255803113ef45f5dc4c Mon Sep 17 00:00:00 2001 From: gregory guy Date: Mon, 26 Apr 2021 18:28:44 +0200 Subject: [PATCH] asciiquarium: Convert to tdelibs library. Signed-off-by: gregory guy (cherry picked from commit b0ef1b76e6bc94f5a8a35b9a43573eab81bca459) --- asciiquarium/src/aasaver.cpp | 10 +++++----- asciiquarium/src/aasaver.h | 8 ++++---- asciiquarium/src/asciiquarium.desktop | 4 ++-- asciiquarium/src/frame.cpp | 4 ++-- asciiquarium/src/screen.cpp | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/asciiquarium/src/aasaver.cpp b/asciiquarium/src/aasaver.cpp index 984ca0ea..0fba1340 100644 --- a/asciiquarium/src/aasaver.cpp +++ b/asciiquarium/src/aasaver.cpp @@ -36,8 +36,8 @@ // by Dirk Staneker 1997 #include -#include -#include +#include +#include #include #include @@ -1239,14 +1239,14 @@ extern "C" KDE_EXPORT TQDialog *kss_setup() { - KConfigDialog *dialog = KConfigDialog::exists("settings"); + TDEConfigDialog *dialog = TDEConfigDialog::exists("settings"); if(dialog) return dialog; - dialog = new KConfigDialog(0, "settings", AASaverConfig::self()); + dialog = new TDEConfigDialog(0, "settings", AASaverConfig::self()); SettingsWidget *settings = new SettingsWidget(0, "settings_widget"); - dialog->addPage(settings, i18n("Asciiquarium Settings"), "kscreensaver"); + dialog->addPage(settings, i18n("Asciiquarium Settings"), "tdescreensaver"); return dialog; } diff --git a/asciiquarium/src/aasaver.h b/asciiquarium/src/aasaver.h index 725378c4..94a95b36 100644 --- a/asciiquarium/src/aasaver.h +++ b/asciiquarium/src/aasaver.h @@ -28,8 +28,8 @@ #ifndef AA_AASAVER_H #define AA_AASAVER_H -#include -#include +#include +#include #include @@ -83,13 +83,13 @@ public: /// Returns a random double between [0.0, limit). static double doubleRand(double limit) { - return (limit * (static_cast(KApplication::random()) / RAND_MAX)); + return (limit * (static_cast(TDEApplication::random()) / RAND_MAX)); } /// Returns a random integer between [0, limit) static int intRand(int limit) { - return KApplication::random() % limit; + return TDEApplication::random() % limit; } /** diff --git a/asciiquarium/src/asciiquarium.desktop b/asciiquarium/src/asciiquarium.desktop index e73d64d3..1bdbc754 100644 --- a/asciiquarium/src/asciiquarium.desktop +++ b/asciiquarium/src/asciiquarium.desktop @@ -1,11 +1,11 @@ [Desktop Entry] Encoding=UTF-8 Exec=asciiquarium.kss -Icon=kscreensaver +Icon=tdescreensaver Type=Application Actions=InWindow;Root;Setup Name=Asciiquarium -X-KDE-Category=Miscellaneous +X-TDE-Category=Miscellaneous [Desktop Action InWindow] Exec=asciiquarium.kss -window-id %w diff --git a/asciiquarium/src/frame.cpp b/asciiquarium/src/frame.cpp index 9f73e1fe..ef5997f1 100644 --- a/asciiquarium/src/frame.cpp +++ b/asciiquarium/src/frame.cpp @@ -25,7 +25,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include +#include #include #include @@ -55,7 +55,7 @@ void Frame::convertDataToPixmap(const Screen *screen) p.begin(&pix, true); p2.begin(&mask, true); - p.setFont(KGlobalSettings::fixedFont()); + p.setFont(TDEGlobalSettings::fixedFont()); TQFontMetrics fm(p.font()); int leadHeight = fm.leading() + fm.descent(); diff --git a/asciiquarium/src/screen.cpp b/asciiquarium/src/screen.cpp index 20f57d13..534e8b07 100644 --- a/asciiquarium/src/screen.cpp +++ b/asciiquarium/src/screen.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include "screen.h" #include "sprite.h" @@ -40,7 +40,7 @@ Screen::Screen(AASaver* widget): m_widget(widget) { - TQFontMetrics fm(KGlobalSettings::fixedFont()); + TQFontMetrics fm(TDEGlobalSettings::fixedFont()); // Compute cell geometries. m_cellW = fm.maxWidth();