asciiquarium: Convert to tdelibs library.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
(cherry picked from commit b0ef1b76e6)
r14.0.x
gregory guy 4 years ago committed by Michele Calgaro
parent 75814a8af5
commit c2217d5575
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -36,8 +36,8 @@
// by Dirk Staneker 1997 // by Dirk Staneker 1997
#include <kdebug.h> #include <kdebug.h>
#include <klocale.h> #include <tdelocale.h>
#include <kconfigdialog.h> #include <tdeconfigdialog.h>
#include <ntqdesktopwidget.h> #include <ntqdesktopwidget.h>
#include <ntqpainter.h> #include <ntqpainter.h>
@ -1239,14 +1239,14 @@ extern "C"
KDE_EXPORT TQDialog *kss_setup() KDE_EXPORT TQDialog *kss_setup()
{ {
KConfigDialog *dialog = KConfigDialog::exists("settings"); TDEConfigDialog *dialog = TDEConfigDialog::exists("settings");
if(dialog) if(dialog)
return dialog; return dialog;
dialog = new KConfigDialog(0, "settings", AASaverConfig::self()); dialog = new TDEConfigDialog(0, "settings", AASaverConfig::self());
SettingsWidget *settings = new SettingsWidget(0, "settings_widget"); SettingsWidget *settings = new SettingsWidget(0, "settings_widget");
dialog->addPage(settings, i18n("Asciiquarium Settings"), "kscreensaver"); dialog->addPage(settings, i18n("Asciiquarium Settings"), "tdescreensaver");
return dialog; return dialog;
} }

@ -28,8 +28,8 @@
#ifndef AA_AASAVER_H #ifndef AA_AASAVER_H
#define AA_AASAVER_H #define AA_AASAVER_H
#include <kscreensaver.h> #include <tdescreensaver.h>
#include <kapplication.h> #include <tdeapplication.h>
#include <stdlib.h> #include <stdlib.h>
@ -83,13 +83,13 @@ public:
/// Returns a random double between [0.0, limit). /// Returns a random double between [0.0, limit).
static double doubleRand(double limit) static double doubleRand(double limit)
{ {
return (limit * (static_cast<double>(KApplication::random()) / RAND_MAX)); return (limit * (static_cast<double>(TDEApplication::random()) / RAND_MAX));
} }
/// Returns a random integer between [0, limit) /// Returns a random integer between [0, limit)
static int intRand(int limit) static int intRand(int limit)
{ {
return KApplication::random() % limit; return TDEApplication::random() % limit;
} }
/** /**

@ -1,11 +1,11 @@
[Desktop Entry] [Desktop Entry]
Encoding=UTF-8 Encoding=UTF-8
Exec=asciiquarium.kss Exec=asciiquarium.kss
Icon=kscreensaver Icon=tdescreensaver
Type=Application Type=Application
Actions=InWindow;Root;Setup Actions=InWindow;Root;Setup
Name=Asciiquarium Name=Asciiquarium
X-KDE-Category=Miscellaneous X-TDE-Category=Miscellaneous
[Desktop Action InWindow] [Desktop Action InWindow]
Exec=asciiquarium.kss -window-id %w Exec=asciiquarium.kss -window-id %w

@ -25,7 +25,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
#include <kglobalsettings.h> #include <tdeglobalsettings.h>
#include <kdebug.h> #include <kdebug.h>
#include <ntqvaluevector.h> #include <ntqvaluevector.h>
@ -55,7 +55,7 @@ void Frame::convertDataToPixmap(const Screen *screen)
p.begin(&pix, true); p.begin(&pix, true);
p2.begin(&mask, true); p2.begin(&mask, true);
p.setFont(KGlobalSettings::fixedFont()); p.setFont(TDEGlobalSettings::fixedFont());
TQFontMetrics fm(p.font()); TQFontMetrics fm(p.font());
int leadHeight = fm.leading() + fm.descent(); int leadHeight = fm.leading() + fm.descent();

@ -32,7 +32,7 @@
#include <ntqtimer.h> #include <ntqtimer.h>
#include <ntqwidget.h> #include <ntqwidget.h>
#include <kglobalsettings.h> #include <tdeglobalsettings.h>
#include "screen.h" #include "screen.h"
#include "sprite.h" #include "sprite.h"
@ -40,7 +40,7 @@
Screen::Screen(AASaver* widget): m_widget(widget) Screen::Screen(AASaver* widget): m_widget(widget)
{ {
TQFontMetrics fm(KGlobalSettings::fixedFont()); TQFontMetrics fm(TDEGlobalSettings::fixedFont());
// Compute cell geometries. // Compute cell geometries.
m_cellW = fm.maxWidth(); m_cellW = fm.maxWidth();

Loading…
Cancel
Save