Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 23a5c62758
commit f3141fbf4b

@ -106,7 +106,7 @@
- fixed potential double initialization of gameboard - fixed potential double initialization of gameboard
- don't crash when removing money from a trade - don't crash when removing money from a trade
- properly quote arguments given to KProcess in kio_atlantik - properly quote arguments given to TDEProcess in kio_atlantik
- valgrind leak and unitialised memory access fixes - valgrind leak and unitialised memory access fixes
0.5.0 0.5.0

@ -147,7 +147,7 @@ Atlantik::Atlantik ()
// Mix code and XML into GUI // Mix code and XML into GUI
KMainWindow::createGUI(); KMainWindow::createGUI();
applyMainWindowSettings( KGlobal::config(), "AtlantikMainWindow" ); applyMainWindowSettings( TDEGlobal::config(), "AtlantikMainWindow" );
KMainWindow::statusBar()->insertItem("Atlantik " ATLANTIK_VERSION_STRING, 0); KMainWindow::statusBar()->insertItem("Atlantik " ATLANTIK_VERSION_STRING, 0);
KMainWindow::statusBar()->insertItem(TQString(), 1); KMainWindow::statusBar()->insertItem(TQString(), 1);
connect(statusBar(), TQT_SIGNAL(released(int)), TQT_TQOBJECT(this), TQT_SLOT(statusBarClick(int))); connect(statusBar(), TQT_SIGNAL(released(int)), TQT_TQOBJECT(this), TQT_SLOT(statusBarClick(int)));

@ -62,7 +62,7 @@ int main(int argc, char *argv[])
TDEApplication::addCmdLineOptions(); TDEApplication::addCmdLineOptions();
TDEApplication kapplication; TDEApplication kapplication;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
if (kapplication.isRestored()) if (kapplication.isRestored())
RESTORE(Atlantik) RESTORE(Atlantik)

@ -45,11 +45,11 @@ extern "C"
void AtlantikProtocol::get( const KURL& url ) void AtlantikProtocol::get( const KURL& url )
{ {
KProcess *proc = new KProcess; TDEProcess *proc = new TDEProcess;
*proc << "atlantik"; *proc << "atlantik";
#ifdef KDE_3_1_FEATURES #ifdef KDE_3_1_FEATURES
TQString host = url.hasHost() ? url.host() : KProcess::quote( url.queryItem("host") ); TQString host = url.hasHost() ? url.host() : TDEProcess::quote( url.queryItem("host") );
#else #else
TQString host = url.hasHost() ? url.host() : url.queryItem("host"); TQString host = url.hasHost() ? url.host() : url.queryItem("host");
#endif #endif
@ -64,7 +64,7 @@ void AtlantikProtocol::get( const KURL& url )
*proc << "--game" << gameString; *proc << "--game" << gameString;
} }
proc->start(KProcess::DontCare); proc->start(TDEProcess::DontCare);
proc->detach(); proc->detach();
finished(); finished();
} }

@ -174,11 +174,11 @@ void EstateDetails::paintEvent(TQPaintEvent *)
// Estate name // Estate name
painter.setPen(TQt::white); painter.setPen(TQt::white);
int fontSize = KGlobalSettings::generalFont().pointSize(); int fontSize = TDEGlobalSettings::generalFont().pointSize();
if (fontSize == -1) if (fontSize == -1)
fontSize = KGlobalSettings::generalFont().pixelSize(); fontSize = TDEGlobalSettings::generalFont().pixelSize();
painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize * 2, TQFont::Bold)); painter.setFont(TQFont(TDEGlobalSettings::generalFont().family(), fontSize * 2, TQFont::Bold));
painter.drawText(KDialog::marginHint(), KDialog::marginHint(), width()-KDialog::marginHint(), titleHeight, TQt::AlignJustify, m_estate->name()); painter.drawText(KDialog::marginHint(), KDialog::marginHint(), width()-KDialog::marginHint(), titleHeight, TQt::AlignJustify, m_estate->name());
painter.setPen(TQt::black); painter.setPen(TQt::black);
@ -189,12 +189,12 @@ void EstateDetails::paintEvent(TQPaintEvent *)
if (m_estate->estateGroup()) if (m_estate->estateGroup())
{ {
xText = titleHeight - fontSize - KDialog::marginHint(); xText = titleHeight - fontSize - KDialog::marginHint();
painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize, TQFont::Bold)); painter.setFont(TQFont(TDEGlobalSettings::generalFont().family(), fontSize, TQFont::Bold));
painter.drawText(5, xText, width()-10, titleHeight, TQt::AlignRight, m_estate->estateGroup()->name().upper()); painter.drawText(5, xText, width()-10, titleHeight, TQt::AlignRight, m_estate->estateGroup()->name().upper());
} }
xText = titleHeight + fontSize + 5; xText = titleHeight + fontSize + 5;
painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize, TQFont::Normal)); painter.setFont(TQFont(TDEGlobalSettings::generalFont().family(), fontSize, TQFont::Normal));
} }
b_recreate = false; b_recreate = false;

@ -401,7 +401,7 @@ void EstateView::paintEvent(TQPaintEvent *)
delete quartzBuffer; delete quartzBuffer;
} }
TQFont font = TQFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal ); TQFont font = TQFont( TDEGlobalSettings::generalFont().family(), TDEGlobalSettings::generalFont().pointSize(), TQFont::Normal );
painter.setFont(font); painter.setFont(font);
TQString estateName = m_estate->name(); TQString estateName = m_estate->name();
#if defined(TDE_MAKE_VERSION) #if defined(TDE_MAKE_VERSION)

@ -64,7 +64,7 @@ void KWrappedListViewItem::wrapColumn( int c )
if ( !lv ) if ( !lv )
return; return;
TQFont font = TQFont( KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal ); TQFont font = TQFont( TDEGlobalSettings::generalFont().family(), TDEGlobalSettings::generalFont().pointSize(), TQFont::Normal );
TQFontMetrics fm = TQFontMetrics( font ); TQFontMetrics fm = TQFontMetrics( font );
int wrapWidth = lv->width(); int wrapWidth = lv->width();

@ -216,7 +216,7 @@ void PortfolioView::paintEvent(TQPaintEvent *)
} }
painter.setPen(TQt::white); painter.setPen(TQt::white);
painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Bold)); painter.setFont(TQFont(TDEGlobalSettings::generalFont().family(), TDEGlobalSettings::generalFont().pointSize(), TQFont::Bold));
painter.drawText(ICONSIZE + KDialog::marginHint(), 15, m_player->name()); painter.drawText(ICONSIZE + KDialog::marginHint(), 15, m_player->name());
if ( m_portfolioEstates.count() ) if ( m_portfolioEstates.count() )
@ -226,7 +226,7 @@ void PortfolioView::paintEvent(TQPaintEvent *)
painter.setPen(TQt::black); painter.setPen(TQt::black);
painter.setBrush(TQt::white); painter.setBrush(TQt::white);
painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal)); painter.setFont(TQFont(TDEGlobalSettings::generalFont().family(), TDEGlobalSettings::generalFont().pointSize(), TQFont::Normal));
painter.drawText(ICONSIZE + KDialog::marginHint(), 30, m_player->host()); painter.drawText(ICONSIZE + KDialog::marginHint(), 30, m_player->host());
} }

@ -53,7 +53,7 @@ Token::Token(Player *player, AtlantikBoard *parent, const char *name) : TQWidget
m_image = 0; m_image = 0;
loadIcon(); loadIcon();
setFixedSize(TQSize(TOKEN_ICONSIZE, TOKEN_ICONSIZE + KGlobalSettings::generalFont().pointSize())); setFixedSize(TQSize(TOKEN_ICONSIZE, TOKEN_ICONSIZE + TDEGlobalSettings::generalFont().pointSize()));
} }
Token::~Token() Token::~Token()
@ -140,10 +140,10 @@ void Token::paintEvent(TQPaintEvent *)
painter.setPen(TQt::black); painter.setPen(TQt::black);
painter.setBrush(TQt::black); painter.setBrush(TQt::black);
painter.drawRect(0, TOKEN_ICONSIZE, width(), KGlobalSettings::generalFont().pointSize()); painter.drawRect(0, TOKEN_ICONSIZE, width(), TDEGlobalSettings::generalFont().pointSize());
painter.setPen(TQt::white); painter.setPen(TQt::white);
painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::DemiBold)); painter.setFont(TQFont(TDEGlobalSettings::generalFont().family(), TDEGlobalSettings::generalFont().pointSize(), TQFont::DemiBold));
painter.drawText(1, height()-1, (m_player ? m_player->name() : TQString())); painter.drawText(1, height()-1, (m_player ? m_player->name() : TQString()));
b_recreate = false; b_recreate = false;

@ -30,9 +30,9 @@ int main( int argc, char *argv[] )
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDEApplication app; TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
KGlobal::dirs()->addResourceType("sprite", KStandardDirs::kde_default("data") + "kasteroids/sprites/"); TDEGlobal::dirs()->addResourceType("sprite", KStandardDirs::kde_default("data") + "kasteroids/sprites/");
KGlobal::dirs()->addResourceType("sounds", KStandardDirs::kde_default("data") + "kasteroids/sounds/"); TDEGlobal::dirs()->addResourceType("sounds", KStandardDirs::kde_default("data") + "kasteroids/sounds/");
#ifdef KA_ENABLE_SOUND #ifdef KA_ENABLE_SOUND
// setup mcop communication // setup mcop communication

@ -89,7 +89,7 @@ KAstTopLevel::KAstTopLevel()
TQHBoxLayout *hbd = new TQHBoxLayout; TQHBoxLayout *hbd = new TQHBoxLayout;
vb->addLayout( hb ); vb->addLayout( hb );
TQFont labelFont( KGlobalSettings::generalFont().family(), 24 ); TQFont labelFont( TDEGlobalSettings::generalFont().family(), 24 );
TQColorGroup grp( darkGreen, black, TQColor( 128, 128, 128 ), TQColorGroup grp( darkGreen, black, TQColor( 128, 128, 128 ),
TQColor( 64, 64, 64 ), black, darkGreen, black ); TQColor( 64, 64, 64 ), black, darkGreen, black );
TQPalette pal( grp, grp, grp ); TQPalette pal( grp, grp, grp );
@ -160,11 +160,11 @@ KAstTopLevel::KAstTopLevel()
vb->addLayout( hbd ); vb->addLayout( hbd );
TQFont smallFont( KGlobalSettings::generalFont().family(), 14 ); TQFont smallFont( TDEGlobalSettings::generalFont().family(), 14 );
hbd->addSpacing( 10 ); hbd->addSpacing( 10 );
TQString sprites_prefix = TQString sprites_prefix =
KGlobal::dirs()->findResourceDir("sprite", "rock1/rock10000.png"); TDEGlobal::dirs()->findResourceDir("sprite", "rock1/rock10000.png");
/* /*
label = new TQLabel( i18n( "T" ), mainWin ); label = new TQLabel( i18n( "T" ), mainWin );
label->setFont( smallFont ); label->setFont( smallFont );
@ -627,10 +627,10 @@ void KAstTopLevel::doStats()
{ {
TQString r; TQString r;
if ( view->shots() ) if ( view->shots() )
r = KGlobal::locale()->formatNumber(( (float)view->hits() / r = TDEGlobal::locale()->formatNumber(( (float)view->hits() /
(float)view->shots() ) * 100, 2 ); (float)view->shots() ) * 100, 2 );
else else
r = KGlobal::locale()->formatNumber( 0.0, 2 ); r = TDEGlobal::locale()->formatNumber( 0.0, 2 );
TQString s = i18n( "Game Over\n\n" TQString s = i18n( "Game Over\n\n"
"Shots fired:\t%1\n" "Shots fired:\t%1\n"

@ -81,7 +81,7 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name )
field.setBackgroundPixmap( pm ); field.setBackgroundPixmap( pm );
textSprite = new TQCanvasText( &field ); textSprite = new TQCanvasText( &field );
TQFont font( KGlobalSettings::generalFont().family(), 18 ); TQFont font( TDEGlobalSettings::generalFont().family(), 18 );
textSprite->setFont( font ); textSprite->setFont( font );
shield = 0; shield = 0;
@ -230,7 +230,7 @@ void KAsteroidsView::brake( bool b )
void KAsteroidsView::readSprites() void KAsteroidsView::readSprites()
{ {
TQString sprites_prefix = TQString sprites_prefix =
KGlobal::dirs()->findResourceDir("sprite", "rock1/rock10000.png"); TDEGlobal::dirs()->findResourceDir("sprite", "rock1/rock10000.png");
int i = 0; int i = 0;
while ( kas_animations[i].id ) while ( kas_animations[i].id )

@ -171,7 +171,7 @@ GameWidget::GameWidget ( TQWidget *parent, const char* name )
: TQWidget( parent, name ) : TQWidget( parent, name )
{ {
level = 1; level = 1;
nlevels = KGlobal::dirs()->findAllResources("appdata", "levels/level_*", nlevels = TDEGlobal::dirs()->findAllResources("appdata", "levels/level_*",
false, true).count(); false, true).count();
TQHBoxLayout *top = new TQHBoxLayout(this, 10); TQHBoxLayout *top = new TQHBoxLayout(this, 10);
@ -210,7 +210,7 @@ GameWidget::GameWidget ( TQWidget *parent, const char* name )
slay->addWidget(new TQLabel(i18n("Highscore:"), bg)); slay->addWidget(new TQLabel(i18n("Highscore:"), bg));
TQFont headerFont = KGlobalSettings::generalFont(); TQFont headerFont = TDEGlobalSettings::generalFont();
headerFont.setBold(true); headerFont.setBold(true);
hs = new TQLabel (highest, bg); hs = new TQLabel (highest, bg);
@ -229,7 +229,7 @@ GameWidget::GameWidget ( TQWidget *parent, const char* name )
updateLevel(1); updateLevel(1);
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("Options"); config->setGroup("Options");
settings.anim_speed = config->readNumEntry("Animation Speed", 1); settings.anim_speed = config->readNumEntry("Animation Speed", 1);
if (settings.anim_speed < 1 || settings.anim_speed > MAX_SPEED) if (settings.anim_speed < 1 || settings.anim_speed > MAX_SPEED)

@ -54,7 +54,7 @@ int main(int argc, char **argv)
TQApplication::setColorSpec(TQApplication::ManyColor); TQApplication::setColorSpec(TQApplication::ManyColor);
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
if ( a.isRestored() ) if ( a.isRestored() )
RESTORE(AtomTopLevel) RESTORE(AtomTopLevel)

@ -70,12 +70,12 @@ void AtomTopLevel::configopts()
void AtomTopLevel::initConfig() void AtomTopLevel::initConfig()
{ {
config = KGlobal::config(); config = TDEGlobal::config();
} }
void AtomTopLevel::saveConfig() void AtomTopLevel::saveConfig()
{ {
config = KGlobal::config(); config = TDEGlobal::config();
if (settings.changed) { if (settings.changed) {
config->setGroup("Options"); config->setGroup("Options");

@ -484,12 +484,12 @@ void KBgEngineGNU::start()
*/ */
gnubg << "gnubg" << "--tty"; gnubg << "gnubg" << "--tty";
connect(&gnubg, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(gnubgExit(KProcess *))); connect(&gnubg, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(gnubgExit(TDEProcess *)));
connect(&gnubg, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), connect(&gnubg, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)),
this, TQT_SLOT(receiveData(KProcess *, char *, int))); this, TQT_SLOT(receiveData(TDEProcess *, char *, int)));
connect(&gnubg, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), connect(&gnubg, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)),
this, TQT_SLOT(receiveData(KProcess *, char *, int))); this, TQT_SLOT(receiveData(TDEProcess *, char *, int)));
connect(&gnubg, TQT_SIGNAL(wroteStdin(KProcess *)), this, TQT_SLOT(wroteStdin(KProcess *))); connect(&gnubg, TQT_SIGNAL(wroteStdin(TDEProcess *)), this, TQT_SLOT(wroteStdin(TDEProcess *)));
startGNU(); startGNU();
} }
@ -502,7 +502,7 @@ void KBgEngineGNU::startGNU()
resAction->setEnabled(false); resAction->setEnabled(false);
if (!gnubg.start(KProcess::NotifyOnExit, KProcess::All)) if (!gnubg.start(TDEProcess::NotifyOnExit, TDEProcess::All))
KMessageBox::information((TQWidget *)parent(), KMessageBox::information((TQWidget *)parent(),
i18n("Could not start the GNU Backgammon process.\n" i18n("Could not start the GNU Backgammon process.\n"
"Make sure the program is in your PATH and is " "Make sure the program is in your PATH and is "
@ -518,7 +518,7 @@ void KBgEngineGNU::startGNU()
/* /*
* The gnubg process has died. Stop all user activity and allow a restart. * The gnubg process has died. Stop all user activity and allow a restart.
*/ */
void KBgEngineGNU::gnubgExit(KProcess *proc) void KBgEngineGNU::gnubgExit(TDEProcess *proc)
{ {
ct->stop(); ct->stop();
@ -544,7 +544,7 @@ void KBgEngineGNU::gnubgExit(KProcess *proc)
/* /*
* Last command has been sent. Try to send pending ones. * Last command has been sent. Try to send pending ones.
*/ */
void KBgEngineGNU::wroteStdin(KProcess *proc) void KBgEngineGNU::wroteStdin(TDEProcess *proc)
{ {
if (!proc->isRunning()) if (!proc->isRunning())
return; return;
@ -577,7 +577,7 @@ void KBgEngineGNU::nextCommand()
* Get data from GNU Backgammon and process them. Note that we may have * Get data from GNU Backgammon and process them. Note that we may have
* to buffer the last line and wait for the closing newline... * to buffer the last line and wait for the closing newline...
*/ */
void KBgEngineGNU::receiveData(KProcess *proc, char *buffer, int buflen) void KBgEngineGNU::receiveData(TDEProcess *proc, char *buffer, int buflen)
{ {
if (!proc->isRunning()) if (!proc->isRunning())
return; return;

@ -191,7 +191,7 @@ private:
enum Turn {uRoll, uMove, tRoll, tMove, maxTurn}; enum Turn {uRoll, uMove, tRoll, tMove, maxTurn};
KProcess gnubg; TDEProcess gnubg;
TQStringList cmdList; TQStringList cmdList;
@ -209,13 +209,13 @@ private:
protected slots: protected slots:
void wroteStdin(KProcess *); void wroteStdin(TDEProcess *);
void receiveData(KProcess *, char *buffer, int buflen); void receiveData(TDEProcess *, char *buffer, int buflen);
void handleLine(const TQString &l); void handleLine(const TQString &l);
void gnubgExit(KProcess *proc); void gnubgExit(TDEProcess *proc);
void nextCommand(); void nextCommand();

@ -684,11 +684,11 @@ void KBg::toggleMenubar()
*/ */
void KBg::configureToolbars() void KBg::configureToolbars()
{ {
saveMainWindowSettings(KGlobal::config(), "kedittoolbar settings"); // temp group saveMainWindowSettings(TDEGlobal::config(), "kedittoolbar settings"); // temp group
KEditToolbar dlg(actionCollection(), xmlFile(), true, this); KEditToolbar dlg(actionCollection(), xmlFile(), true, this);
connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(newToolbarConfig())); connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(newToolbarConfig()));
dlg.exec(); dlg.exec();
KGlobal::config()->deleteGroup( "kedittoolbar settings" ); // delete temp group TDEGlobal::config()->deleteGroup( "kedittoolbar settings" ); // delete temp group
} }
/* /*
@ -697,7 +697,7 @@ void KBg::configureToolbars()
void KBg::newToolbarConfig() void KBg::newToolbarConfig()
{ {
createGUI(); createGUI();
applyMainWindowSettings(KGlobal::config(), "kedittoolbar settings"); applyMainWindowSettings(TDEGlobal::config(), "kedittoolbar settings");
} }
/* /*

@ -52,7 +52,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &about); TDECmdLineArgs::init(argc, argv, &about);
TDEApplication app; TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
if (app.isRestored()) if (app.isRestored())
RESTORE(KBg) RESTORE(KBg)

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options. TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
TDEApplication app; TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
TQString picDirCheck = locate("data", "kbattleship/pictures/"); TQString picDirCheck = locate("data", "kbattleship/pictures/");
TQString onePicCheck = locate("data", "kbattleship/pictures/hit.png"); TQString onePicCheck = locate("data", "kbattleship/pictures/hit.png");

@ -326,12 +326,12 @@ void KBBGame::gameFinished()
"I guess you need more practice."); "I guess you need more practice.");
KMessageBox::information(this, KMessageBox::information(this,
s.arg(KGlobal::locale()->formatNumber(score, 0))); s.arg(TDEGlobal::locale()->formatNumber(score, 0)));
} else { } else {
s = i18n( "You should place %1 balls!\n" s = i18n( "You should place %1 balls!\n"
"You have placed %2.") "You have placed %2.")
.arg(KGlobal::locale()->formatNumber(balls, 0)) .arg(TDEGlobal::locale()->formatNumber(balls, 0))
.arg(KGlobal::locale()->formatNumber(ballsPlaced, 0)); .arg(TDEGlobal::locale()->formatNumber(ballsPlaced, 0));
KMessageBox::sorry(this, s); KMessageBox::sorry(this, s);
} }

@ -33,7 +33,7 @@ int main( int argc, char **argv )
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
if (a.isRestored()) if (a.isRestored())
RESTORE(KBBGame) RESTORE(KBBGame)

@ -429,7 +429,7 @@ void JezzGame::display( const TQString &text, int size )
{ {
//kdDebug(12008) << "text = " << text << endl; //kdDebug(12008) << "text = " << text << endl;
TQFont font = KGlobalSettings::generalFont(); TQFont font = TDEGlobalSettings::generalFont();
font.setBold(true); font.setBold(true);
font.setPointSize(size); font.setPointSize(size);
m_text->setFont( font ); m_text->setFont( font );

@ -56,7 +56,7 @@ int main(int argc, char **argv)
TQApplication::setColorSpec(TQApplication::ManyColor); TQApplication::setColorSpec(TQApplication::ManyColor);
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
ExtManager manager; ExtManager manager;

@ -47,7 +47,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options. TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
TDEApplication app; TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
/* command line handling */ /* command line handling */
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -76,7 +76,7 @@ KGoldrunner::KGoldrunner()
/******************************************************************************/ /******************************************************************************/
// Get catalog for translation // Get catalog for translation
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
// Tell the KMainWindow that this is the main widget // Tell the KMainWindow that this is the main widget
setCentralWidget (view); setCentralWidget (view);
@ -769,12 +769,12 @@ void KGoldrunner::optionsConfigureToolbars()
// use the standard toolbar editor // use the standard toolbar editor
#if defined(TDE_MAKE_VERSION) #if defined(TDE_MAKE_VERSION)
# if TDE_VERSION >= TDE_MAKE_VERSION(3,1,0) # if TDE_VERSION >= TDE_MAKE_VERSION(3,1,0)
saveMainWindowSettings(KGlobal::config(), autoSaveGroup()); saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
# else # else
saveMainWindowSettings(KGlobal::config()); saveMainWindowSettings(TDEGlobal::config());
# endif # endif
#else #else
saveMainWindowSettings(KGlobal::config()); saveMainWindowSettings(TDEGlobal::config());
#endif #endif
} }
@ -786,12 +786,12 @@ void KGoldrunner::newToolbarConfig()
#if defined(TDE_MAKE_VERSION) #if defined(TDE_MAKE_VERSION)
# if TDE_VERSION >= TDE_MAKE_VERSION(3,1,0) # if TDE_VERSION >= TDE_MAKE_VERSION(3,1,0)
applyMainWindowSettings(KGlobal::config(), autoSaveGroup()); applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
# else # else
applyMainWindowSettings(KGlobal::config()); applyMainWindowSettings(TDEGlobal::config());
# endif # endif
#else #else
applyMainWindowSettings(KGlobal::config()); applyMainWindowSettings(TDEGlobal::config());
#endif #endif
} }

@ -782,7 +782,7 @@ KGrLGDialog::KGrLGDialog (TQFile * savedGames,
#ifdef KGR_PORTABLE #ifdef KGR_PORTABLE
TQFont f ("courier", 12); TQFont f ("courier", 12);
#else #else
TQFont f = KGlobalSettings::fixedFont(); // KDE version. TQFont f = TDEGlobalSettings::fixedFont(); // KDE version.
#endif #endif
f.setFixedPitch (TRUE); f.setFixedPitch (TRUE);
lgList-> setFont (f); lgList-> setFont (f);

@ -1162,7 +1162,7 @@ void KGrGame::showHighScores()
#ifdef KGR_PORTABLE #ifdef KGR_PORTABLE
TQFont f ("courier", 12); TQFont f ("courier", 12);
#else #else
TQFont f = KGlobalSettings::fixedFont(); // KDE version. TQFont f = TDEGlobalSettings::fixedFont(); // KDE version.
#endif #endif
f. setFixedPitch (TRUE); f. setFixedPitch (TRUE);
f. setBold (TRUE); f. setBold (TRUE);

@ -44,7 +44,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDEApplication app; TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
// All session management is handled in the RESTORE macro // All session management is handled in the RESTORE macro
if (app.isRestored()) if (app.isRestored())

@ -43,7 +43,7 @@ int main( int argc, char **argv )
TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
if (a.isRestored()) if (a.isRestored())
RESTORE(KLines) RESTORE(KLines)

@ -105,7 +105,7 @@ Editor::~Editor()
void Editor::setupToolbar() void Editor::setupToolbar()
{ {
KIconLoader *loader = KGlobal::iconLoader(); KIconLoader *loader = TDEGlobal::iconLoader();
topToolbar = new KToolBar( this, "editToolBar" ); topToolbar = new KToolBar( this, "editToolBar" );
KToolBarRadioGroup *radio = new KToolBarRadioGroup(topToolbar); KToolBarRadioGroup *radio = new KToolBarRadioGroup(topToolbar);

@ -127,7 +127,7 @@ HighScore::HighScore
resetBtn->setAutoRepeat( false ); resetBtn->setAutoRepeat( false );
resetBtn->setAutoResize( false ); resetBtn->setAutoResize( false );
KIconLoader *loader = KGlobal::iconLoader(); KIconLoader *loader = TDEGlobal::iconLoader();
resetBtn->setPixmap(loader->loadIcon("editdelete", KIcon::Toolbar)); resetBtn->setPixmap(loader->loadIcon("editdelete", KIcon::Toolbar));

@ -23,7 +23,7 @@ int main( int argc, char** argv )
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
KImageIO::registerFormats(); KImageIO::registerFormats();
if (a.isRestored()) if (a.isRestored())

@ -248,7 +248,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::init(argc, argv, &aboutData);
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
KExtHighscore::ExtManager manager; KExtHighscore::ExtManager manager;
if ( a.isRestored() ) RESTORE(MainWidget) if ( a.isRestored() ) RESTORE(MainWidget)

@ -46,7 +46,7 @@ void Cell::initPixmaps()
NamesMap::ConstIterator it; NamesMap::ConstIterator it;
for(it = names.constBegin(); it != names.constEnd(); ++it) for(it = names.constBegin(); it != names.constEnd(); ++it)
{ {
connectedpixmap[it.key()]=new TQPixmap(KGlobal::iconLoader()->loadIcon( connectedpixmap[it.key()]=new TQPixmap(TDEGlobal::iconLoader()->loadIcon(
locate("data","knetwalk/cable"+it.data()+".png"), KIcon::NoGroup, 32) ); locate("data","knetwalk/cable"+it.data()+".png"), KIcon::NoGroup, 32) );
TQImage image = connectedpixmap[it.key()]->convertToImage(); TQImage image = connectedpixmap[it.key()]->convertToImage();
@ -152,9 +152,9 @@ void Cell::paintEvent(TQPaintEvent*)
{ {
changed = false; changed = false;
if ( locked ) { if ( locked ) {
pixmap = KGlobal::iconLoader()->loadIcon(locate("data", "knetwalk/background_locked.png"), KIcon::NoGroup, 32); pixmap = TDEGlobal::iconLoader()->loadIcon(locate("data", "knetwalk/background_locked.png"), KIcon::NoGroup, 32);
} else { } else {
pixmap = KGlobal::iconLoader()->loadIcon(locate("data", "knetwalk/background.png"), KIcon::NoGroup, 32); pixmap = TDEGlobal::iconLoader()->loadIcon(locate("data", "knetwalk/background.png"), KIcon::NoGroup, 32);
} }
TQPainter paint; TQPainter paint;
@ -185,14 +185,14 @@ void Cell::paintEvent(TQPaintEvent*)
if(root) if(root)
{ {
pix=KGlobal::iconLoader()->loadIcon(locate("data", "knetwalk/server.png"), KIcon::NoGroup, 32); pix=TDEGlobal::iconLoader()->loadIcon(locate("data", "knetwalk/server.png"), KIcon::NoGroup, 32);
} }
else if(ddirs == U || ddirs == L || ddirs == D || ddirs == R) else if(ddirs == U || ddirs == L || ddirs == D || ddirs == R)
{ {
if(connected) if(connected)
pix=KGlobal::iconLoader()->loadIcon(locate("data","knetwalk/computer2.png"),KIcon::NoGroup,32); pix=TDEGlobal::iconLoader()->loadIcon(locate("data","knetwalk/computer2.png"),KIcon::NoGroup,32);
else else
pix=KGlobal::iconLoader()->loadIcon(locate("data","knetwalk/computer1.png"),KIcon::NoGroup,32); pix=TDEGlobal::iconLoader()->loadIcon(locate("data","knetwalk/computer1.png"),KIcon::NoGroup,32);
} }
paint.drawPixmap(0, 0, pix); paint.drawPixmap(0, 0, pix);
} }

@ -50,7 +50,7 @@ int main(int argc, char ** argv)
TDEApplication app; TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->isSet("Novice")) Settings::setSkill(Settings::EnumSkill::Novice); if (args->isSet("Novice")) Settings::setSkill(Settings::EnumSkill::Novice);

@ -94,7 +94,7 @@ MainWindow::MainWindow(TQWidget *parent, const char* name, WFlags /*fl*/) :
" to turn it in a counter-clockwise direction." " to turn it in a counter-clockwise direction."
"<p>Start the LAN with as few turns as possible!")); "<p>Start the LAN with as few turns as possible!"));
//const int cellsize = KGlobal::iconLoader()->loadIcon("knetwalk/background.png", KIcon::User, 32).width(); //const int cellsize = TDEGlobal::iconLoader()->loadIcon("knetwalk/background.png", KIcon::User, 32).width();
const int cellsize = 32; const int cellsize = 32;
const int gridsize = cellsize * MasterBoardSize + 2; const int gridsize = cellsize * MasterBoardSize + 2;

@ -86,7 +86,7 @@ TQString KComboBoxDialog::getItem( const TQString &_text, const TQString &_capti
TQString prevAnswer; TQString prevAnswer;
if ( !dontAskAgainName.isEmpty() ) if ( !dontAskAgainName.isEmpty() )
{ {
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup( "Notification Messages" ); config->setGroup( "Notification Messages" );
prevAnswer = config->readEntry( dontAskAgainName ); prevAnswer = config->readEntry( dontAskAgainName );
if ( !prevAnswer.isEmpty() ) if ( !prevAnswer.isEmpty() )
@ -106,7 +106,7 @@ TQString KComboBoxDialog::getItem( const TQString &_text, const TQString &_capti
{ {
if ( !dontAskAgainName.isEmpty() && !text.isEmpty() ) if ( !dontAskAgainName.isEmpty() && !text.isEmpty() )
{ {
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup ( "Notification Messages" ); config->setGroup ( "Notification Messages" );
config->writeEntry( dontAskAgainName, text ); config->writeEntry( dontAskAgainName, text );
} }

@ -104,7 +104,7 @@ public:
const TQString &_value = TQString(), const TQString &_value = TQString(),
bool *ok = 0, TQWidget *parent = 0, bool *ok = 0, TQWidget *parent = 0,
const TQString &configName = TQString(), const TQString &configName = TQString(),
KConfig *config = KGlobal::config()); KConfig *config = TDEGlobal::config());
protected: protected:
KHistoryCombo *combo; KHistoryCombo *combo;

@ -200,7 +200,7 @@ void Kolf::startNewGame()
config.setGroup("0 Saved Game"); config.setGroup("0 Saved Game");
if (isTutorial) if (isTutorial)
filename = KGlobal::dirs()->findResource("appdata", "tutorial.kolf"); filename = TDEGlobal::dirs()->findResource("appdata", "tutorial.kolf");
else else
filename = config.readEntry("Course", TQString()); filename = config.readEntry("Course", TQString());
@ -305,7 +305,7 @@ void Kolf::newGame()
void Kolf::tutorial() void Kolf::tutorial()
{ {
TQString newfilename = KGlobal::dirs()->findResource("appdata", "tutorial.kolfgame"); TQString newfilename = TDEGlobal::dirs()->findResource("appdata", "tutorial.kolfgame");
if (newfilename.isNull()) if (newfilename.isNull())
return; return;
@ -369,7 +369,7 @@ void Kolf::createSpacer()
spacerPlayers.last().setId(1); spacerPlayers.last().setId(1);
delete spacer; delete spacer;
spacer = new KolfGame(obj, &spacerPlayers, KGlobal::dirs()->findResource("appdata", "intro"), dummy); spacer = new KolfGame(obj, &spacerPlayers, TDEGlobal::dirs()->findResource("appdata", "intro"), dummy);
spacer->setSound(false); spacer->setSound(false);
spacer->startFirstHole(1); spacer->startFirstHole(1);
layout->addWidget(spacer, 0, 0, AlignCenter); layout->addWidget(spacer, 0, 0, AlignCenter);

@ -72,7 +72,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
TQApplication::setColorSpec(TQApplication::ManyColor); TQApplication::setColorSpec(TQApplication::ManyColor);
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
Kolf *top = new Kolf; Kolf *top = new Kolf;

@ -104,7 +104,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_
externCourses = config->readListEntry("extra"); externCourses = config->readListEntry("extra");
/// course loading /// course loading
TQStringList items = externCourses + KGlobal::dirs()->findAllResources("appdata", "courses/*"); TQStringList items = externCourses + TDEGlobal::dirs()->findAllResources("appdata", "courses/*");
TQStringList nameList; TQStringList nameList;
const TQString lastCourse(config->readEntry("course", "")); const TQString lastCourse(config->readEntry("course", ""));
int curItem = 0; int curItem = 0;

@ -17,7 +17,7 @@ ObjectList *PluginLoader::loadAll()
ObjectList *ret = new ObjectList; ObjectList *ret = new ObjectList;
TQStringList libs; TQStringList libs;
TQStringList files = KGlobal::dirs()->findAllResources("appdata", "*.plugin", false, true); TQStringList files = TDEGlobal::dirs()->findAllResources("appdata", "*.plugin", false, true);
for (TQStringList::Iterator it = files.begin(); it != files.end(); ++it) for (TQStringList::Iterator it = files.begin(); it != files.end(); ++it)
{ {

@ -20,7 +20,7 @@ main(int argc, char **argv)
TDEApplication a; TDEApplication a;
TQApplication::setGlobalMouseTracking( true ); TQApplication::setGlobalMouseTracking( true );
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
if (a.isRestored()) if (a.isRestored())
RESTORE(MainWindow) RESTORE(MainWindow)

@ -82,7 +82,7 @@ FleetDlg::init()
TQString("%1").arg(fleetNumber), TQString("%1").arg(fleetNumber),
curFleet->destination->getName(), curFleet->destination->getName(),
TQString("%1").arg(curFleet->getShipCount()), TQString("%1").arg(curFleet->getShipCount()),
TQString("%1").arg(KGlobal::locale()->formatNumber(curFleet->killPercentage, 3)), TQString("%1").arg(TDEGlobal::locale()->formatNumber(curFleet->killPercentage, 3)),
TQString("%1").arg((int)ceil(curFleet->arrivalTurn))); TQString("%1").arg((int)ceil(curFleet->arrivalTurn)));
} }
} }

@ -317,8 +317,8 @@ GameBoard::turn()
"A ship leaving this turn will arrive on turn %4") "A ship leaving this turn will arrive on turn %4")
.arg(sourcePlanet->getName()) .arg(sourcePlanet->getName())
.arg(destPlanet->getName()) .arg(destPlanet->getName())
.arg(KGlobal::locale()->formatNumber( dist, 2 )) .arg(TDEGlobal::locale()->formatNumber( dist, 2 ))
.arg(KGlobal::locale()->formatNumber( turnNumber + (int)dist, 0 )); .arg(TDEGlobal::locale()->formatNumber( turnNumber + (int)dist, 0 ));
KMessageBox::information( this, msg, i18n("Distance")); KMessageBox::information( this, msg, i18n("Distance"));
gameState = NONE; gameState = NONE;

@ -17,7 +17,7 @@ ConquestMap::ConquestMap( Map *newMap, TQWidget *parent )
map( newMap ), gridColor( 50, 80, 50 ), map( newMap ), gridColor( 50, 80, 50 ),
hiLiteRow( -1 ), hiLiteCol( -1 ) hiLiteRow( -1 ), hiLiteCol( -1 )
{ {
labelFont = KGlobalSettings::generalFont(); labelFont = TDEGlobalSettings::generalFont();
labelFont.setPointSize( 8 ); labelFont.setPointSize( 8 );
setFrameStyle( NoFrame ); setFrameStyle( NoFrame );

@ -147,13 +147,13 @@ void PlanetInfo::showPlanet( Planet *planet )
temp = "<qt>" + i18n("Owner: %1").arg(p->planet->getPlayer()->getColoredName()); temp = "<qt>" + i18n("Owner: %1").arg(p->planet->getPlayer()->getColoredName());
owner->setText( temp ); owner->setText( temp );
temp = "<qt>" + i18n("Ships: %1").arg( KGlobal::locale()->formatNumber(p->ships, 0) ); temp = "<qt>" + i18n("Ships: %1").arg( TDEGlobal::locale()->formatNumber(p->ships, 0) );
ships->setText( temp ); ships->setText( temp );
temp = "<qt>" + i18n("Production: %1").arg( KGlobal::locale()->formatNumber(p->production, 0) ); temp = "<qt>" + i18n("Production: %1").arg( TDEGlobal::locale()->formatNumber(p->production, 0) );
production->setText( temp ); production->setText( temp );
temp = "<qt>" + i18n("Kill percent: %1").arg( KGlobal::locale()->formatNumber(p->killRate, 3) ); temp = "<qt>" + i18n("Kill percent: %1").arg( TDEGlobal::locale()->formatNumber(p->killRate, 3) );
kill_percent->setText( temp ); kill_percent->setText( temp );
} }
} }

@ -104,7 +104,7 @@ bool cardMap::setCardDir( const TQString &dir)
if( animate ) { if( animate ) {
t1 = TQTime::currentTime(); t1 = TQTime::currentTime();
w = new TQWidget( 0, "", TQt::WStyle_Customize | TQt::WStyle_NoBorder | TQt::WStyle_Tool ); w = new TQWidget( 0, "", TQt::WStyle_Customize | TQt::WStyle_NoBorder | TQt::WStyle_Tool );
TQRect dg = KGlobalSettings::splashScreenDesktopGeometry(); TQRect dg = TDEGlobalSettings::splashScreenDesktopGeometry();
w->setBackgroundColor( TQt::darkGreen ); w->setBackgroundColor( TQt::darkGreen );
w->setGeometry( dg.left() + ( dg.width() - greeting_width ) / 2, dg.top() + ( dg.height() - 180 ) / 2, greeting_width, 180); w->setGeometry( dg.left() + ( dg.width() - greeting_width ) / 2, dg.top() + ( dg.height() - 180 ) / 2, greeting_width, 180);
w->show(); w->show();

@ -58,7 +58,7 @@ int main( int argc, char **argv )
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
if (a.isRestored()) if (a.isRestored())
RESTORE(pWidget) RESTORE(pWidget)

@ -70,7 +70,7 @@ pWidget::pWidget()
actionCollection(), "open"); actionCollection(), "open");
recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openGame(const KURL&)), recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openGame(const KURL&)),
actionCollection(), "open_recent"); actionCollection(), "open_recent");
recent->loadEntries(KGlobal::config()); recent->loadEntries(TDEGlobal::config());
(void)KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveGame()), (void)KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveGame()),
actionCollection(), "save"); actionCollection(), "save");
(void)new KAction(i18n("&Choose Game..."), 0, TQT_TQOBJECT(this), TQT_SLOT(chooseGame()), (void)new KAction(i18n("&Choose Game..."), 0, TQT_TQOBJECT(this), TQT_SLOT(chooseGame()),
@ -102,14 +102,14 @@ pWidget::pWidget()
} }
games->setItems(list); games->setItems(list);
KGlobal::dirs()->addResourceType("wallpaper", KStandardDirs::kde_default("data") + "kpat/backgrounds/"); TDEGlobal::dirs()->addResourceType("wallpaper", KStandardDirs::kde_default("data") + "kpat/backgrounds/");
KGlobal::dirs()->addResourceType("wallpaper", KStandardDirs::kde_default("data") + "ksnake/backgrounds/"); TDEGlobal::dirs()->addResourceType("wallpaper", KStandardDirs::kde_default("data") + "ksnake/backgrounds/");
wallpapers = new KSelectAction(i18n("&Change Background"), 0, TQT_TQOBJECT(this), wallpapers = new KSelectAction(i18n("&Change Background"), 0, TQT_TQOBJECT(this),
TQT_SLOT(changeWallpaper()), TQT_SLOT(changeWallpaper()),
actionCollection(), "wallpaper"); actionCollection(), "wallpaper");
list.clear(); list.clear();
wallpaperlist.clear(); wallpaperlist.clear();
TQStringList wallpaperlist2 = KGlobal::dirs()->findAllResources("wallpaper", TQString(), TQStringList wallpaperlist2 = TDEGlobal::dirs()->findAllResources("wallpaper", TQString(),
false, true, list); false, true, list);
TQStringList list2; TQStringList list2;
for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
@ -470,7 +470,7 @@ void pWidget::gameLost()
KConfig *config = 0; KConfig *config = 0;
TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
config = KGlobal::config(); config = TDEGlobal::config();
KConfigGroupSaver saver(config, KConfigGroupSaver saver(config,
TQString::fromLatin1("Notification Messages")); TQString::fromLatin1("Notification Messages"));
TQString dontAsk = config->readEntry(dontAskAgainName).lower(); TQString dontAsk = config->readEntry(dontAskAgainName).lower();
@ -524,7 +524,7 @@ void pWidget::openGame(const KURL &url)
setGameCaption(); setGameCaption();
KIO::NetAccess::removeTempFile( tmpFile ); KIO::NetAccess::removeTempFile( tmpFile );
recent->addURL(url); recent->addURL(url);
recent->saveEntries(KGlobal::config()); recent->saveEntries(TDEGlobal::config());
} }
} }
@ -545,7 +545,7 @@ void pWidget::saveGame()
file.close(); file.close();
KIO::NetAccess::upload(file.name(), url, this); KIO::NetAccess::upload(file.name(), url, this);
recent->addURL(url); recent->addURL(url);
recent->saveEntries(KGlobal::config()); recent->saveEntries(TDEGlobal::config());
} }
void pWidget::showStats() void pWidget::showStats()

@ -46,10 +46,10 @@ BetBox::BetBox(TQWidget* parent, const char* name)
foldButton = new TQPushButton(this); foldButton = new TQPushButton(this);
l->addWidget(foldButton, 0); l->addWidget(foldButton, 0);
bet5Up->setText(TQString("+%1").arg(KGlobal::locale()->formatMoney(5))); bet5Up->setText(TQString("+%1").arg(TDEGlobal::locale()->formatMoney(5)));
bet10Up->setText(TQString("+%1").arg(KGlobal::locale()->formatMoney(10))); bet10Up->setText(TQString("+%1").arg(TDEGlobal::locale()->formatMoney(10)));
bet5Down->setText(TQString("-%1").arg(KGlobal::locale()->formatMoney(5))); bet5Down->setText(TQString("-%1").arg(TDEGlobal::locale()->formatMoney(5)));
bet10Down->setText(TQString("-%1").arg(KGlobal::locale()->formatMoney(10))); bet10Down->setText(TQString("-%1").arg(TDEGlobal::locale()->formatMoney(10)));
adjustBet->setText(i18n("Adjust Bet")); adjustBet->setText(i18n("Adjust Bet"));
foldButton->setText(i18n("Fold")); foldButton->setText(i18n("Fold"));

@ -269,7 +269,7 @@ void kpok::initWindow()
mWonWidget = new TQWidget(this); mWonWidget = new TQWidget(this);
inputLayout->addWidget(mWonWidget, 2); inputLayout->addWidget(mWonWidget, 2);
mWonWidget->setMinimumHeight(50); //FIXME hardcoded value for the wave mWonWidget->setMinimumHeight(50); //FIXME hardcoded value for the wave
mWonWidget->setMinimumWidth(tmp.width(i18n("You won %1").arg(KGlobal::locale()->formatMoney(100))) + 20); // workaround for width problem in wave mWonWidget->setMinimumWidth(tmp.width(i18n("You won %1").arg(TDEGlobal::locale()->formatMoney(100))) + 20); // workaround for width problem in wave
TQHBoxLayout* wonLayout = new TQHBoxLayout(mWonWidget); TQHBoxLayout* wonLayout = new TQHBoxLayout(mWonWidget);
wonLayout->setAutoAdd(true); wonLayout->setAutoAdd(true);
@ -686,7 +686,7 @@ void kpok::paintCash()
for (unsigned int i = 0; i < m_numPlayers; i++) { for (unsigned int i = 0; i < m_numPlayers; i++) {
playerBox[i]->showCash(); playerBox[i]->showCash();
} }
potLabel->setText(i18n("Pot: %1").arg(KGlobal::locale()->formatMoney(m_game.getPot()))); potLabel->setText(i18n("Pot: %1").arg(TDEGlobal::locale()->formatMoney(m_game.getPot())));
} }
@ -805,9 +805,9 @@ void kpok::displayWinner_Computer(PokerPlayer* winner, bool othersPassed)
// Generate a string with winner info and show it. // Generate a string with winner info and show it.
TQString label; TQString label;
if (winner->getHuman()) if (winner->getHuman())
label = i18n("You won %1").arg(KGlobal::locale()->formatMoney(m_game.getPot())); label = i18n("You won %1").arg(TDEGlobal::locale()->formatMoney(m_game.getPot()));
else else
label = i18n("%1 won %2").arg(winner->getName()).arg(KGlobal::locale()->formatMoney(m_game.getPot())); label = i18n("%1 won %2").arg(winner->getName()).arg(TDEGlobal::locale()->formatMoney(m_game.getPot()));
wonLabel->setText(label); wonLabel->setText(label);
// Start the waving motion of the text. // Start the waving motion of the text.
@ -1072,7 +1072,7 @@ void kpok::displayWin(const TQString& hand, int cashWon)
if (cashWon) { if (cashWon) {
playSound("win.wav"); playSound("win.wav");
buf = i18n("You won %1!").arg(KGlobal::locale()->formatMoney(cashWon)); buf = i18n("You won %1!").arg(TDEGlobal::locale()->formatMoney(cashWon));
} else { } else {
playSound("lose.wav"); playSound("lose.wav");
buf = i18n("Game Over"); // locale buf = i18n("Game Over"); // locale

@ -41,7 +41,7 @@ int main( int argc, char *argv[] )
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDEApplication myApp; TDEApplication myApp;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
if (myApp.isRestored()) if (myApp.isRestored())
RESTORE(PokerWindow) RESTORE(PokerWindow)

@ -122,7 +122,7 @@ void PlayerBox::showCash()
{ {
// Show the amount of cash the player has. // Show the amount of cash the player has.
m_cashLabel->setText(i18n("Cash: %1") m_cashLabel->setText(i18n("Cash: %1")
.arg(KGlobal::locale()->formatMoney(m_player->getCash()))); .arg(TDEGlobal::locale()->formatMoney(m_player->getCash())));
// Show how much we have bet during this round. // Show how much we have bet during this round.
if (m_player->out()) if (m_player->out())
@ -130,10 +130,10 @@ void PlayerBox::showCash()
else { else {
if (m_singlePlayer) if (m_singlePlayer)
m_betLabel->setText(i18n("Cash per round: %1") m_betLabel->setText(i18n("Cash per round: %1")
.arg(KGlobal::locale()->formatMoney(m_cashPerRound))); .arg(TDEGlobal::locale()->formatMoney(m_cashPerRound)));
else else
m_betLabel->setText(i18n("Bet: %1") m_betLabel->setText(i18n("Bet: %1")
.arg(KGlobal::locale()-> formatMoney(m_player->getCurrentBet()))); .arg(TDEGlobal::locale()-> formatMoney(m_player->getCurrentBet())));
} }
} }

@ -56,7 +56,7 @@
#ifndef PICDATA #ifndef PICDATA
#define PICDATA(x) KGlobal::dirs()->findResource("appdata", TQString("pics/")+ x) #define PICDATA(x) TDEGlobal::dirs()->findResource("appdata", TQString("pics/")+ x)
#endif #endif
const uint HINT_BLINKRATE = 250000; const uint HINT_BLINKRATE = 250000;
@ -109,7 +109,7 @@ void QReversiBoardView::loadChips(ChipType type)
TQString name("pics/"); TQString name("pics/");
name += (type==Colored ? "chips.png" : "chips_mono.png"); name += (type==Colored ? "chips.png" : "chips_mono.png");
TQString s = KGlobal::dirs()->findResource("appdata", name); TQString s = TDEGlobal::dirs()->findResource("appdata", name);
bool ok = allchips.load(s); bool ok = allchips.load(s);
Q_ASSERT( ok && allchips.width()==CHIP_SIZE*5 Q_ASSERT( ok && allchips.width()==CHIP_SIZE*5

@ -74,7 +74,7 @@
#ifndef PICDATA #ifndef PICDATA
#define PICDATA(x) \ #define PICDATA(x) \
KGlobal::dirs()->findResource("appdata", TQString("pics/") + x) TDEGlobal::dirs()->findResource("appdata", TQString("pics/") + x)
#endif #endif

@ -55,7 +55,7 @@
</entry> </entry>
<entry name="BackgroundImage" type="Path"> <entry name="BackgroundImage" type="Path">
<label>Image to use as background.</label> <label>Image to use as background.</label>
<code>#define PICDATA(x) KGlobal::dirs()->findResource("appdata", QString("pics/")+ x)</code> <code>#define PICDATA(x) TDEGlobal::dirs()->findResource("appdata", QString("pics/")+ x)</code>
<default code="true">PICDATA("background/Light_Wood.png")</default> <default code="true">PICDATA("background/Light_Wood.png")</default>
</entry> </entry>
<entry name="MenubarVisible" type="Bool" key="menubar visible"> <entry name="MenubarVisible" type="Bool" key="menubar visible">

@ -67,7 +67,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
// used for loading background pixmaps // used for loading background pixmaps
KImageIO::registerFormats(); KImageIO::registerFormats();

@ -41,7 +41,7 @@ int main( int argc, char **argv ) {
TDEApplication::setColorSpec(TQApplication::ManyColor+TQApplication::CustomColor); TDEApplication::setColorSpec(TQApplication::ManyColor+TQApplication::CustomColor);
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
KSameWidget *w = new KSameWidget; KSameWidget *w = new KSameWidget;
if (kapp->isRestored()) { if (kapp->isRestored()) {

@ -74,7 +74,7 @@ Board::Board(TQWidget *parent, const char *name) :
_redo.setAutoDelete(true); _redo.setAutoDelete(true);
_undo.setAutoDelete(true); _undo.setAutoDelete(true);
TQPixmap bg(KGlobal::dirs()->findResource("appdata", "kshisen_bgnd.png")); TQPixmap bg(TDEGlobal::dirs()->findResource("appdata", "kshisen_bgnd.png"));
setBackgroundPixmap(bg); setBackgroundPixmap(bg);
loadSettings(); loadSettings();
@ -458,7 +458,7 @@ void Board::paintEvent(TQPaintEvent *e)
if(paused) if(paused)
{ {
p.setFont(KGlobalSettings::largeFont()); p.setFont(TDEGlobalSettings::largeFont());
p.drawText(rect(), TQt::AlignCenter, i18n("Game Paused")); p.drawText(rect(), TQt::AlignCenter, i18n("Game Paused"));
} }
else else

@ -63,7 +63,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
App *app = new App(); App *app = new App();
app->show(); app->show();

@ -36,7 +36,7 @@
TileSet::TileSet() : scaledTiles(nTiles) TileSet::TileSet() : scaledTiles(nTiles)
{ {
//loadTiles //loadTiles
TQImage tileset(KGlobal::dirs()->findResource("appdata", "tileset.png")); TQImage tileset(TDEGlobal::dirs()->findResource("appdata", "tileset.png"));
if(tileset.isNull()) if(tileset.isNull())
{ {
KMessageBox::sorry(0, i18n("Cannot load tiles pixmap!")); KMessageBox::sorry(0, i18n("Cannot load tiles pixmap!"));

@ -44,7 +44,7 @@ int main(int argc, char **argv)
TDEApplication app; TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
GameWindow *w = new GameWindow; GameWindow *w = new GameWindow;
app.setMainWidget(w); app.setMainWidget(w);

@ -35,7 +35,7 @@ Levels *leV = 0;
Levels::Levels() Levels::Levels()
{ {
leV = this; leV = this;
list = KGlobal::dirs()->findAllResources("appdata", "levels/*"); list = TDEGlobal::dirs()->findAllResources("appdata", "levels/*");
list.prepend( "dummy" ); list.prepend( "dummy" );
} }

@ -44,7 +44,7 @@ int main( int argc, char **argv )
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDEApplication app; TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
Game *ksnake = new Game(); Game *ksnake = new Game();
app.setMainWidget( ksnake ); app.setMainWidget( ksnake );

@ -146,7 +146,7 @@ void PixServer::initbackPixmaps()
} else if(Settings::bgimage_enabled()) { } else if(Settings::bgimage_enabled()) {
// A bit of a hack. // A bit of a hack.
TQStringList backgroundPixmaps = TQStringList backgroundPixmaps =
KGlobal::dirs()->findAllResources("appdata", "backgrounds/*.png"); TDEGlobal::dirs()->findAllResources("appdata", "backgrounds/*.png");
path = backgroundPixmaps[(Settings::bgimage())]; path = backgroundPixmaps[(Settings::bgimage())];
} }

@ -79,7 +79,7 @@ Rattler::Rattler( TQWidget *parent, const char *name )
TQTimer::singleShot( 2000, this, TQT_SLOT(demo()) ); // Why wait? TQTimer::singleShot( 2000, this, TQT_SLOT(demo()) ); // Why wait?
backgroundPixmaps = backgroundPixmaps =
KGlobal::dirs()->findAllResources("appdata", "backgrounds/*.png"); TDEGlobal::dirs()->findAllResources("appdata", "backgrounds/*.png");
} }
Rattler::~Rattler() Rattler::~Rattler()

@ -38,7 +38,7 @@
void void
Bookmark::fileName(TQString &p) { Bookmark::fileName(TQString &p) {
p = KGlobal::dirs()->saveLocation("appdata"); p = TDEGlobal::dirs()->saveLocation("appdata");
TQString n; TQString n;
n.setNum(number_); n.setNum(number_);

@ -31,7 +31,7 @@
ModalLabel::ModalLabel(const TQString &text, TQWidget *parent, ModalLabel::ModalLabel(const TQString &text, TQWidget *parent,
const char *name, WFlags f) const char *name, WFlags f)
: TQLabel(text, parent, name, f) { : TQLabel(text, parent, name, f) {
TQFont font(KGlobalSettings::generalFont().family(), 24, TQFont::Bold); TQFont font(TDEGlobalSettings::generalFont().family(), 24, TQFont::Bold);
TQFontMetrics fontMet(font); TQFontMetrics fontMet(font);
TQString currentLine; TQString currentLine;

@ -52,7 +52,7 @@ PlayField::PlayField(TQWidget *parent, const char *name, WFlags f)
wheelDelta_(0), wheelDelta_(0),
levelText_(i18n("Level:")), stepsText_(i18n("Steps:")), levelText_(i18n("Level:")), stepsText_(i18n("Steps:")),
pushesText_(i18n("Pushes:")), pushesText_(i18n("Pushes:")),
statusFont_(KGlobalSettings::generalFont().family(), 18, TQFont::Bold), statusMetrics_(statusFont_) { statusFont_(TDEGlobalSettings::generalFont().family(), 18, TQFont::Bold), statusMetrics_(statusFont_) {
setFocusPolicy(TQ_StrongFocus); setFocusPolicy(TQ_StrongFocus);
setFocus(); setFocus();

@ -41,7 +41,7 @@ MyMainView::MyMainView(TQWidget *parent)
minePut[p]=false; minePut[p]=false;
} }
TQString tmp = KGlobal::dirs()->findResourceDir("appdata", (TQString)MV_BACKGROUND); TQString tmp = TDEGlobal::dirs()->findResourceDir("appdata", (TQString)MV_BACKGROUND);
TQCanvasPixmapArray *sunsequence TQCanvasPixmapArray *sunsequence
= loadOldPixmapSequence( tmp + MV_SUN_PPM, tmp + MV_SUN_PBM ); = loadOldPixmapSequence( tmp + MV_SUN_PPM, tmp + MV_SUN_PBM );
@ -535,7 +535,7 @@ void MyMainView::timerEvent(TQTimerEvent *event)
textSprite->move(width()/2,height()/2-90); textSprite->move(width()/2,height()/2-90);
textSprite->setTextFlags(AlignCenter); textSprite->setTextFlags(AlignCenter);
textSprite->setColor(tqRgb(255,160,0)); textSprite->setColor(tqRgb(255,160,0));
textSprite->setFont(TQFont(KGlobalSettings::generalFont().family(),14)); textSprite->setFont(TQFont(TDEGlobalSettings::generalFont().family(),14));
textSprite->show( ); textSprite->show( );
if(ship[0]->getHitPoints()==0) if(ship[0]->getHitPoints()==0)
{ {

@ -41,7 +41,7 @@ int main(int argc, char* argv[])
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDEApplication a; TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
// used for loading background pixmaps // used for loading background pixmaps
KImageIO::registerFormats(); KImageIO::registerFormats();

@ -40,7 +40,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
TDEApplication app; TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
KImageIO::registerFormats(); KImageIO::registerFormats();
TopLevel *toplevel=0; TopLevel *toplevel=0;

@ -29,8 +29,8 @@ void BaseFactory::init(int argc, char **argv)
{ {
TDECmdLineArgs::init(argc, argv, _aboutData); TDECmdLineArgs::init(argc, argv, _aboutData);
(void)new TDEApplication; (void)new TDEApplication;
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
KGlobal::locale()->insertCatalogue("libksirtet"); TDEGlobal::locale()->insertCatalogue("libksirtet");
} }
BaseFactory::~BaseFactory() BaseFactory::~BaseFactory()

@ -19,7 +19,7 @@ Contents:
of classes which are explained in the kgame docu (as soon as it is of classes which are explained in the kgame docu (as soon as it is
written) written)
if you use libtdegames in your game please also add if you use libtdegames in your game please also add
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
to main() to main()
This will add libtdegames.pot to your game and therefore all libtdegames This will add libtdegames.pot to your game and therefore all libtdegames
strings get translated. strings get translated.

@ -132,7 +132,7 @@ TQString Item::pretty(uint, const TQVariant &value) const
return timeFormat(value.toUInt()); return timeFormat(value.toUInt());
case DateTime: case DateTime:
if ( value.toDateTime().isNull() ) return "--"; if ( value.toDateTime().isNull() ) return "--";
return KGlobal::locale()->formatDateTime(value.toDateTime()); return TDEGlobal::locale()->formatDateTime(value.toDateTime());
case NoSpecial: case NoSpecial:
break; break;
} }

@ -226,7 +226,7 @@ TQString KCardDialog::getDefaultCardDir()
KCardDialog::init(); KCardDialog::init();
TQString file = KCARD_DEFAULTCARDDIR + KCARD_DEFAULTCARD; TQString file = KCARD_DEFAULTCARDDIR + KCARD_DEFAULTCARD;
return KGlobal::dirs()->findResourceDir("cards",file) + KCARD_DEFAULTCARDDIR; return TDEGlobal::dirs()->findResourceDir("cards",file) + KCARD_DEFAULTCARDDIR;
} }
TQString KCardDialog::getCardPath(const TQString &carddir, int index) TQString KCardDialog::getCardPath(const TQString &carddir, int index)
@ -452,7 +452,7 @@ void KCardDialog::setupDialog(bool showResizeBox)
void KCardDialog::insertCardIcons() void KCardDialog::insertCardIcons()
{ {
TQStringList list = KGlobal::dirs()->findAllResources("cards", "card*/index.desktop", false, true); TQStringList list = TDEGlobal::dirs()->findAllResources("cards", "card*/index.desktop", false, true);
// kdDebug(11000) << "insert " << list.count() << endl; // kdDebug(11000) << "insert " << list.count() << endl;
if (list.isEmpty()) if (list.isEmpty())
return; return;
@ -488,7 +488,7 @@ void KCardDialog::insertCardIcons()
void KCardDialog::insertDeckIcons() void KCardDialog::insertDeckIcons()
{ {
TQStringList list = KGlobal::dirs()->findAllResources("cards", "decks/*.desktop", false, true); TQStringList list = TDEGlobal::dirs()->findAllResources("cards", "decks/*.desktop", false, true);
if (list.isEmpty()) if (list.isEmpty())
return; return;
@ -575,7 +575,7 @@ TQString KCardDialog::getRandomDeck()
{ {
KCardDialog::init(); KCardDialog::init();
TQStringList list = KGlobal::dirs()->findAllResources("cards", "decks/*.desktop"); TQStringList list = TDEGlobal::dirs()->findAllResources("cards", "decks/*.desktop");
if (list.isEmpty()) if (list.isEmpty())
return TQString(); return TQString();
@ -587,7 +587,7 @@ TQString KCardDialog::getRandomCardDir()
{ {
KCardDialog::init(); KCardDialog::init();
TQStringList list = KGlobal::dirs()->findAllResources("cards", "card*/index.desktop"); TQStringList list = TDEGlobal::dirs()->findAllResources("cards", "card*/index.desktop");
if (list.isEmpty()) if (list.isEmpty())
return TQString(); return TQString();
@ -799,9 +799,9 @@ void KCardDialog::init()
static bool _inited = false; static bool _inited = false;
if (_inited) if (_inited)
return; return;
KGlobal::dirs()->addResourceType("cards", KStandardDirs::kde_default("data") + TQString::fromLatin1("carddecks/")); TDEGlobal::dirs()->addResourceType("cards", KStandardDirs::kde_default("data") + TQString::fromLatin1("carddecks/"));
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
_inited = true; _inited = true;
} }

@ -222,7 +222,7 @@ void KChatBase::init(bool noComboBox)
d->mEdit->setHandleSignals(false); d->mEdit->setHandleSignals(false);
d->mEdit->setTrapReturnKey(true); d->mEdit->setTrapReturnKey(true);
d->mEdit->completionObject(); // add the completion object d->mEdit->completionObject(); // add the completion object
d->mEdit->setCompletionMode(KGlobalSettings::CompletionNone); d->mEdit->setCompletionMode(TDEGlobalSettings::CompletionNone);
connect(d->mEdit, TQT_SIGNAL(returnPressed(const TQString&)), this, TQT_SLOT(slotReturnPressed(const TQString&))); connect(d->mEdit, TQT_SIGNAL(returnPressed(const TQString&)), this, TQT_SLOT(slotReturnPressed(const TQString&)));
h->addWidget(d->mEdit); h->addWidget(d->mEdit);
@ -414,7 +414,7 @@ void KChatBase::slotClear()
d->mBox->clear(); d->mBox->clear();
} }
void KChatBase::setCompletionMode(KGlobalSettings::Completion mode) void KChatBase::setCompletionMode(TDEGlobalSettings::Completion mode)
{ d->mEdit->setCompletionMode(mode); } { d->mEdit->setCompletionMode(mode); }
void KChatBase::setNameFont(const TQFont& font) void KChatBase::setNameFont(const TQFont& font)

@ -290,7 +290,7 @@ public:
/** /**
* See KLineEdit::setCompletionMode * See KLineEdit::setCompletionMode
**/ **/
void setCompletionMode(KGlobalSettings::Completion mode); void setCompletionMode(TDEGlobalSettings::Completion mode);
/** /**
* Set the font that used used for the name part of a message. See also * Set the font that used used for the name part of a message. See also

@ -28,7 +28,7 @@
#include <kdemacros.h> #include <kdemacros.h>
class KPlayer; class KPlayer;
class KGame; class KGame;
class KProcess; class TDEProcess;
/** /**
* \short Base class for IO devices for games * \short Base class for IO devices for games

@ -35,7 +35,7 @@ class KMessageFilePipe;
/** /**
* This is the process class used on the computer player * This is the process class used on the computer player
* side to communicate with its counterpart KProcessIO class. * side to communicate with its counterpart TDEProcessIO class.
* Using these two classes will give fully transparent communication * Using these two classes will give fully transparent communication
* via TQDataStreams. * via TQDataStreams.
*/ */
@ -222,7 +222,7 @@ class KDE_EXPORT KGameProcess: public TQObject
/** /**
* This signal is emmited when the process is initialized, i.e. added * This signal is emmited when the process is initialized, i.e. added
* to a KPlayer. Initial initialisation can be performed here be reacting * to a KPlayer. Initial initialisation can be performed here be reacting
* to the KProcessIO signal signalIOAdded and retrieving the data here * to the TDEProcessIO signal signalIOAdded and retrieving the data here
* from the stream. * from the stream.
* It works just as the signalTurn() but is only send when the player is * It works just as the signalTurn() but is only send when the player is
* added to the game, i.e. it needs some initialization data * added to the game, i.e. it needs some initialization data

@ -243,20 +243,20 @@ KMessageProcess::KMessageProcess(TQObject *parent, TQString file) : KMessageIO(p
// Start process // Start process
kdDebug(11001) << "@@@KMessageProcess::Start process" << endl; kdDebug(11001) << "@@@KMessageProcess::Start process" << endl;
mProcessName=file; mProcessName=file;
mProcess=new KProcess; mProcess=new TDEProcess;
int id=0; int id=0;
*mProcess << mProcessName << TQString("%1").arg(id); *mProcess << mProcessName << TQString("%1").arg(id);
kdDebug(11001) << "@@@KMessageProcess::Init:Id= " << id << endl; kdDebug(11001) << "@@@KMessageProcess::Init:Id= " << id << endl;
kdDebug(11001) << "@@@KMessgeProcess::Init:Processname: " << mProcessName << endl; kdDebug(11001) << "@@@KMessgeProcess::Init:Processname: " << mProcessName << endl;
connect(mProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )), connect(mProcess, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int )),
this, TQT_SLOT(slotReceivedStdout(KProcess *, char * , int ))); this, TQT_SLOT(slotReceivedStdout(TDEProcess *, char * , int )));
connect(mProcess, TQT_SIGNAL(receivedStderr(KProcess *, char *, int )), connect(mProcess, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int )),
this, TQT_SLOT(slotReceivedStderr(KProcess *, char * , int ))); this, TQT_SLOT(slotReceivedStderr(TDEProcess *, char * , int )));
connect(mProcess, TQT_SIGNAL(processExited(KProcess *)), connect(mProcess, TQT_SIGNAL(processExited(TDEProcess *)),
this, TQT_SLOT(slotProcessExited(KProcess *))); this, TQT_SLOT(slotProcessExited(TDEProcess *)));
connect(mProcess, TQT_SIGNAL(wroteStdin(KProcess *)), connect(mProcess, TQT_SIGNAL(wroteStdin(TDEProcess *)),
this, TQT_SLOT(slotWroteStdin(KProcess *))); this, TQT_SLOT(slotWroteStdin(TDEProcess *)));
mProcess->start(KProcess::NotifyOnExit,KProcess::All); mProcess->start(TDEProcess::NotifyOnExit,TDEProcess::All);
mSendBuffer=0; mSendBuffer=0;
mReceiveCount=0; mReceiveCount=0;
mReceiveBuffer.resize(1024); mReceiveBuffer.resize(1024);
@ -300,7 +300,7 @@ void KMessageProcess::writeToProcess()
mProcess->writeStdin(mSendBuffer->data(),mSendBuffer->size()); mProcess->writeStdin(mSendBuffer->data(),mSendBuffer->size());
} }
void KMessageProcess::slotWroteStdin(KProcess * ) void KMessageProcess::slotWroteStdin(TDEProcess * )
{ {
kdDebug(11001) << k_funcinfo << endl; kdDebug(11001) << k_funcinfo << endl;
if (mSendBuffer) if (mSendBuffer)
@ -311,7 +311,7 @@ void KMessageProcess::slotWroteStdin(KProcess * )
writeToProcess(); writeToProcess();
} }
void KMessageProcess::slotReceivedStderr(KProcess * proc, char *buffer, int buflen) void KMessageProcess::slotReceivedStderr(TDEProcess * proc, char *buffer, int buflen)
{ {
int pid=0; int pid=0;
int len; int len;
@ -341,7 +341,7 @@ void KMessageProcess::slotReceivedStderr(KProcess * proc, char *buffer, int bufl
} }
void KMessageProcess::slotReceivedStdout(KProcess * , char *buffer, int buflen) void KMessageProcess::slotReceivedStdout(TDEProcess * , char *buffer, int buflen)
{ {
kdDebug(11001) << "$$$$$$ " << k_funcinfo << ": Received " << buflen << " bytes over inter process communication" << endl; kdDebug(11001) << "$$$$$$ " << k_funcinfo << ": Received " << buflen << " bytes over inter process communication" << endl;
@ -387,7 +387,7 @@ void KMessageProcess::slotReceivedStdout(KProcess * , char *buffer, int buflen)
} }
} }
void KMessageProcess::slotProcessExited(KProcess * /*p*/) void KMessageProcess::slotProcessExited(TDEProcess * /*p*/)
{ {
kdDebug(11001) << "Process exited (slot)" << endl; kdDebug(11001) << "Process exited (slot)" << endl;
emit connectionBroken(); emit connectionBroken();

@ -33,7 +33,7 @@
#include <kdebug.h> #include <kdebug.h>
class TQSocket; class TQSocket;
class KProcess; class TDEProcess;
//class TQFile; //class TQFile;
@ -373,14 +373,14 @@ class KMessageProcess : public KMessageIO
public slots: public slots:
void slotReceivedStdout(KProcess *proc, char *buffer, int buflen); void slotReceivedStdout(TDEProcess *proc, char *buffer, int buflen);
void slotReceivedStderr(KProcess *proc, char *buffer, int buflen); void slotReceivedStderr(TDEProcess *proc, char *buffer, int buflen);
void slotProcessExited(KProcess *p); void slotProcessExited(TDEProcess *p);
void slotWroteStdin(KProcess *p); void slotWroteStdin(TDEProcess *p);
private: private:
TQString mProcessName; TQString mProcessName;
KProcess *mProcess; TDEProcess *mProcess;
TQPtrQueue <TQByteArray> mQueue; TQPtrQueue <TQByteArray> mQueue;
TQByteArray *mSendBuffer; TQByteArray *mSendBuffer;
TQByteArray mReceiveBuffer; TQByteArray mReceiveBuffer;

@ -141,12 +141,12 @@ dist=true
install=false install=false
install_location= install_location=
type=HEADER type=HEADER
[lskat/KProcessConnect.cpp] [lskat/TDEProcessConnect.cpp]
dist=true dist=true
install=false install=false
install_location= install_location=
type=SOURCE type=SOURCE
[lskat/KProcessConnect.h] [lskat/TDEProcessConnect.h]
dist=true dist=true
install=false install=false
install_location= install_location=
@ -172,7 +172,7 @@ install=false
install_location= install_location=
type=HEADER type=HEADER
[lskat/Makefile.am] [lskat/Makefile.am]
files=lskat/main.cpp,lskat/lskat.cpp,lskat/lskat.h,lskat/lskatdoc.cpp,lskat/lskatdoc.h,lskat/lskatview.cpp,lskat/lskatview.h,lskat/resource.h,lskat/lskat.desktop,lskat/lskat.xpm,lskat/mini-lskat.xpm,lskat/KChildConnect.cpp,lskat/KChildConnect.h,lskat/KConnectEntry.cpp,lskat/KConnectEntry.h,lskat/KConnectTypes.h,lskat/KEInput.cpp,lskat/KEInput.h,lskat/KEMessage.cpp,lskat/KEMessage.h,lskat/KInputChildProcess.cpp,lskat/KInputChildProcess.h,lskat/KInteractiveConnect.cpp,lskat/KInteractiveConnect.h,lskat/KMessageEntry.cpp,lskat/KMessageEntry.h,lskat/KProcessConnect.cpp,lskat/KProcessConnect.h,lskat/KRSocket.cpp,lskat/KRSocket.h,lskat/KRemoteConnect.cpp,lskat/KRemoteConnect.h,lskat/namedlg.cpp,lskat/namedlg.h,lskat/networkdlg.cpp,lskat/networkdlg.h,lskat/aboutdlg.cpp,lskat/aboutdlg.h,lskat/aboutdlgdata.cpp,lskat/msgdlg.cpp,lskat/msgdlg.h files=lskat/main.cpp,lskat/lskat.cpp,lskat/lskat.h,lskat/lskatdoc.cpp,lskat/lskatdoc.h,lskat/lskatview.cpp,lskat/lskatview.h,lskat/resource.h,lskat/lskat.desktop,lskat/lskat.xpm,lskat/mini-lskat.xpm,lskat/KChildConnect.cpp,lskat/KChildConnect.h,lskat/KConnectEntry.cpp,lskat/KConnectEntry.h,lskat/KConnectTypes.h,lskat/KEInput.cpp,lskat/KEInput.h,lskat/KEMessage.cpp,lskat/KEMessage.h,lskat/KInputChildProcess.cpp,lskat/KInputChildProcess.h,lskat/KInteractiveConnect.cpp,lskat/KInteractiveConnect.h,lskat/KMessageEntry.cpp,lskat/KMessageEntry.h,lskat/TDEProcessConnect.cpp,lskat/TDEProcessConnect.h,lskat/KRSocket.cpp,lskat/KRSocket.h,lskat/KRemoteConnect.cpp,lskat/KRemoteConnect.h,lskat/namedlg.cpp,lskat/namedlg.h,lskat/networkdlg.cpp,lskat/networkdlg.h,lskat/aboutdlg.cpp,lskat/aboutdlg.h,lskat/aboutdlgdata.cpp,lskat/msgdlg.cpp,lskat/msgdlg.h
sub_dirs= sub_dirs=
type=prog_main type=prog_main
[lskat/aboutdlg.cpp] [lskat/aboutdlg.cpp]

@ -45,7 +45,7 @@ KRemoteConnect *KConnectEntry::QueryRemoteConnect()
return connect.r; return connect.r;
} }
KProcessConnect *KConnectEntry::QueryProcessConnect() TDEProcessConnect *KConnectEntry::QueryProcessConnect()
{ {
return connect.p; return connect.p;
} }
@ -132,7 +132,7 @@ bool KConnectEntry::Init(KG_INPUTTYPE stype,int id,KEMessage *msg)
result=connect.r->Init(id,msg); result=connect.r->Init(id,msg);
break; break;
case KG_INPUTTYPE_PROCESS: case KG_INPUTTYPE_PROCESS:
connect.p=new KProcessConnect; connect.p=new TDEProcessConnect;
result=connect.p->Init(id,msg); result=connect.p->Init(id,msg);
break; break;
default: result=FALSE; default: result=FALSE;

@ -19,7 +19,7 @@
#include <string.h> #include <string.h>
#include "KRemoteConnect.h" #include "KRemoteConnect.h"
#include "KProcessConnect.h" #include "TDEProcessConnect.h"
#include "KInteractiveConnect.h" #include "KInteractiveConnect.h"
#include "KConnectTypes.h" #include "KConnectTypes.h"
#include "KEMessage.h" #include "KEMessage.h"
@ -27,7 +27,7 @@
union UConnect union UConnect
{ {
KRemoteConnect *r; KRemoteConnect *r;
KProcessConnect *p; TDEProcessConnect *p;
KInteractiveConnect *i; KInteractiveConnect *i;
}; };
@ -42,7 +42,7 @@ class KConnectEntry
public: public:
KG_INPUTTYPE QueryType(); KG_INPUTTYPE QueryType();
KRemoteConnect *QueryRemoteConnect(); KRemoteConnect *QueryRemoteConnect();
KProcessConnect *QueryProcessConnect(); TDEProcessConnect *QueryProcessConnect();
KInteractiveConnect *QueryInteractiveConnect(); KInteractiveConnect *QueryInteractiveConnect();
KConnectEntry(); KConnectEntry();
~KConnectEntry(); ~KConnectEntry();

@ -23,7 +23,7 @@
#include <tqmemarray.h> #include <tqmemarray.h>
#include "KConnectEntry.h" #include "KConnectEntry.h"
#include "KRemoteConnect.h" #include "KRemoteConnect.h"
#include "KProcessConnect.h" #include "TDEProcessConnect.h"
#include "KInteractiveConnect.h" #include "KInteractiveConnect.h"
#include "KEMessage.h" #include "KEMessage.h"
#include "KConnectTypes.h" #include "KConnectTypes.h"
@ -42,7 +42,7 @@ class KEInput : public TQObject
TQTimer *cTimer; TQTimer *cTimer;
TQPtrList<KRemoteConnect> remoteList; TQPtrList<KRemoteConnect> remoteList;
TQPtrList<KProcessConnect> computerList; TQPtrList<TDEProcessConnect> computerList;
TQPtrList<KInteractiveConnect> interactiveList; TQPtrList<KInteractiveConnect> interactiveList;
TQMemArray<KConnectEntry> playerArray; TQMemArray<KConnectEntry> playerArray;

@ -1,5 +1,5 @@
/*************************************************************************** /***************************************************************************
KProcessConnect.cpp - description TDEProcessConnect.cpp - description
------------------- -------------------
begin : Tue May 2 2000 begin : Tue May 2 2000
copyright : (C) 2000 by Martin Heni copyright : (C) 2000 by Martin Heni
@ -31,25 +31,25 @@
* * * *
***************************************************************************/ ***************************************************************************/
#include <stdio.h> #include <stdio.h>
#include "KProcessConnect.h" #include "TDEProcessConnect.h"
#include "KProcessConnect.moc" #include "TDEProcessConnect.moc"
KProcessConnect::KProcessConnect() TDEProcessConnect::TDEProcessConnect()
: KChildConnect() : KChildConnect()
{ {
running=false; running=false;
process=0; process=0;
} }
KProcessConnect::~KProcessConnect() TDEProcessConnect::~TDEProcessConnect()
{ {
Exit(); Exit();
delete process; delete process;
// printf("DESTRUCTRING KPROCESSCONNECT\n"); // printf("DESTRUCTRING KPROCESSCONNECT\n");
} }
bool KProcessConnect::Init(int id,KEMessage *msg) bool TDEProcessConnect::Init(int id,KEMessage *msg)
{ {
int size; int size;
char *p; char *p;
@ -73,19 +73,19 @@ bool KProcessConnect::Init(int id,KEMessage *msg)
if (running) Exit(); if (running) Exit();
// create process // create process
process=new KProcess; process=new TDEProcess;
*process << processname; *process << processname;
connect(process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )), connect(process, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int )),
this, TQT_SLOT(slotReceivedStdout(KProcess *, char * , int ))); this, TQT_SLOT(slotReceivedStdout(TDEProcess *, char * , int )));
connect(process, TQT_SIGNAL(processExited(KProcess *)), connect(process, TQT_SIGNAL(processExited(TDEProcess *)),
this, TQT_SLOT(slotProcessExited(KProcess *))); this, TQT_SLOT(slotProcessExited(TDEProcess *)));
/* /*
connect(process, TQT_SIGNAL(wroteStdin(KProcess *)), connect(process, TQT_SIGNAL(wroteStdin(TDEProcess *)),
this, TQT_SLOT(slotWroteStdin(KProcess *))); this, TQT_SLOT(slotWroteStdin(TDEProcess *)));
*/ */
// TRUE if ok // TRUE if ok
running=process->start(KProcess::NotifyOnExit,KProcess::All); running=process->start(TDEProcess::NotifyOnExit,TDEProcess::All);
if (running && msg && msg->QueryNumberOfKeys()>0) if (running && msg && msg->QueryNumberOfKeys()>0)
{ {
@ -95,7 +95,7 @@ bool KProcessConnect::Init(int id,KEMessage *msg)
return running; return running;
} }
void KProcessConnect::slotReceivedStdout(KProcess *, char *buffer, int buflen) void TDEProcessConnect::slotReceivedStdout(TDEProcess *, char *buffer, int buflen)
{ {
TQString s; TQString s;
char c; char c;
@ -134,19 +134,19 @@ void KProcessConnect::slotReceivedStdout(KProcess *, char *buffer, int buflen)
Receive(s); Receive(s);
} }
} }
void KProcessConnect::slotProcessExited(KProcess *) void TDEProcessConnect::slotProcessExited(TDEProcess *)
{ {
running=false; running=false;
delete process; delete process;
process=0; process=0;
Init(QueryID()); Init(QueryID());
} }
void KProcessConnect::slotWroteStdin(KProcess *) void TDEProcessConnect::slotWroteStdin(TDEProcess *)
{ {
printf("slotWroteStdin:: IS NEVER CALLED\n"); printf("slotWroteStdin:: IS NEVER CALLED\n");
} }
bool KProcessConnect::Exit() bool TDEProcessConnect::Exit()
{ {
// kill process if running // kill process if running
if (running) if (running)
@ -159,12 +159,12 @@ bool KProcessConnect::Exit()
return true; return true;
} }
bool KProcessConnect::Next() bool TDEProcessConnect::Next()
{ {
bool result; bool result;
if (!running) return false; if (!running) return false;
// create and send message // create and send message
// printf("+- KProcessConnect::ProcessNext\n"); // printf("+- TDEProcessConnect::ProcessNext\n");
KEMessage *msg=new KEMessage; KEMessage *msg=new KEMessage;
// User fills message // User fills message
emit signalPrepareMove(msg,KG_INPUTTYPE_PROCESS); emit signalPrepareMove(msg,KG_INPUTTYPE_PROCESS);
@ -174,7 +174,7 @@ bool KProcessConnect::Next()
} }
// Send string to child // Send string to child
bool KProcessConnect::Send(TQString str) bool TDEProcessConnect::Send(TQString str)
{ {
bool result; bool result;
// printf("****** PROCESS:SEND\n"); // printf("****** PROCESS:SEND\n");

@ -1,5 +1,5 @@
/*************************************************************************** /***************************************************************************
KProcessConnect.h - description TDEProcessConnect.h - description
------------------- -------------------
begin : Tue May 2 2000 begin : Tue May 2 2000
copyright : (C) 2000 by Martin Heni copyright : (C) 2000 by Martin Heni
@ -24,19 +24,19 @@
#include "KChildConnect.h" #include "KChildConnect.h"
class KProcessConnect: public KChildConnect class TDEProcessConnect: public KChildConnect
{ {
Q_OBJECT Q_OBJECT
private: private:
KProcess *process; TDEProcess *process;
TQString processname; TQString processname;
bool running; bool running;
public: public:
KProcessConnect(); TDEProcessConnect();
~KProcessConnect(); ~TDEProcessConnect();
bool Init(int id=0,KEMessage *msg=0); bool Init(int id=0,KEMessage *msg=0);
bool Exit(); bool Exit();
bool Next(); bool Next();
@ -45,9 +45,9 @@ class KProcessConnect: public KChildConnect
// void Receive(TQString input); // void Receive(TQString input);
public slots: public slots:
void slotReceivedStdout(KProcess *proc, char *buffer, int buflen); void slotReceivedStdout(TDEProcess *proc, char *buffer, int buflen);
void slotProcessExited(KProcess *p); void slotProcessExited(TDEProcess *p);
void slotWroteStdin(KProcess *p); void slotWroteStdin(TDEProcess *p);
signals: signals:

@ -1,7 +1,7 @@
####### tdevelop will overwrite this part!!! (begin)########## ####### tdevelop will overwrite this part!!! (begin)##########
bin_PROGRAMS = lskat bin_PROGRAMS = lskat
lskat_SOURCES = msgdlg.cpp networkdlg.cpp namedlg.cpp KRemoteConnect.cpp KRSocket.cpp KProcessConnect.cpp KMessageEntry.cpp KInteractiveConnect.cpp KInputChildProcess.cpp KEMessage.cpp KEInput.cpp KConnectEntry.cpp KChildConnect.cpp lskatview.cpp lskatdoc.cpp lskat.cpp main.cpp networkdlgbase.ui lskat_SOURCES = msgdlg.cpp networkdlg.cpp namedlg.cpp KRemoteConnect.cpp KRSocket.cpp TDEProcessConnect.cpp KMessageEntry.cpp KInteractiveConnect.cpp KInputChildProcess.cpp KEMessage.cpp KEInput.cpp KConnectEntry.cpp KChildConnect.cpp lskatview.cpp lskatdoc.cpp lskat.cpp main.cpp networkdlgbase.ui
lskat_LDADD = $(LIB_KFILE) $(LIB_TDEGAMES) $(LIB_KDNSSD) lskat_LDADD = $(LIB_KFILE) $(LIB_TDEGAMES) $(LIB_KDNSSD)
lskat_DEPENDENCIES = $(LIB_TDEGAMES_DEP) lskat_DEPENDENCIES = $(LIB_TDEGAMES_DEP)

@ -252,7 +252,7 @@ void LSkatView::drawIntro(TQPainter *p)
TQPoint point,point1,p2; TQPoint point,point1,p2;
TQString s; TQString s;
// Get a nice font // Get a nice font
TQFont font = KGlobalSettings::generalFont(); TQFont font = TDEGlobalSettings::generalFont();
font.setPointSize(48); font.setPointSize(48);
// Get the font info to determine text sizes // Get the font info to determine text sizes
TQFontMetrics fontMetrics(font); TQFontMetrics fontMetrics(font);
@ -367,9 +367,9 @@ void LSkatView::drawFinal(TQPainter *p)
TQString ld; TQString ld;
int ts[10]; int ts[10];
TQFont font24 = KGlobalSettings::generalFont(); TQFont font24 = TDEGlobalSettings::generalFont();
font24.setPointSize(24); font24.setPointSize(24);
TQFont font14 = KGlobalSettings::generalFont(); TQFont font14 = TDEGlobalSettings::generalFont();
font14.setPointSize(13); font14.setPointSize(13);
//p1=status_rect3.topLeft(); //p1=status_rect3.topLeft();
@ -621,7 +621,7 @@ void LSkatView::drawStatus(TQPainter *p)
srect[0]=status_rect1; srect[0]=status_rect1;
srect[1]=status_rect2; srect[1]=status_rect2;
TQFont font10 = KGlobalSettings::generalFont(); TQFont font10 = TDEGlobalSettings::generalFont();
font10.setPointSize(13); font10.setPointSize(13);
p->setFont(font10); p->setFont(font10);

@ -57,7 +57,7 @@ int main(int argc, char *argv[])
} }
args->clear(); args->clear();
TDEApplication app(argc, argv); TDEApplication app(argc, argv);
KGlobal::locale()->insertCatalogue("libtdegames"); TDEGlobal::locale()->insertCatalogue("libtdegames");
if (app.isRestored()) if (app.isRestored())
{ {

Loading…
Cancel
Save