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

pull/1/head
Timothy Pearson 11 years ago
parent f39ce36045
commit 2178da111f

@ -314,7 +314,7 @@ bool Amor::readConfig()
TQStringList files; TQStringList files;
// Store relative paths into files to avoid storing absolute pathnames. // Store relative paths into files to avoid storing absolute pathnames.
KGlobal::dirs()->findAllResources("appdata", "*rc", false, false, files); TDEGlobal::dirs()->findAllResources("appdata", "*rc", false, false, files);
int randomTheme = kapp->random() % files.count(); int randomTheme = kapp->random() % files.count();
mConfig.mTheme = (TQString)*files.at(randomTheme); mConfig.mTheme = (TQString)*files.at(randomTheme);
} }
@ -606,7 +606,7 @@ void Amor::slotMouseClicked(const TQPoint &pos)
if (!mMenu) if (!mMenu)
{ {
KHelpMenu* help = new KHelpMenu(0, KGlobal::instance()->aboutData(), false); KHelpMenu* help = new KHelpMenu(0, TDEGlobal::instance()->aboutData(), false);
KPopupMenu* helpMnu = help->menu(); KPopupMenu* helpMnu = help->menu();
mMenu = new KPopupMenu(); mMenu = new KPopupMenu();
mMenu->insertTitle("Amor"); // I really don't want this i18n'ed mMenu->insertTitle("Amor"); // I really don't want this i18n'ed

@ -64,8 +64,8 @@ AmorBubble::AmorBubble()
mBrowser->setHScrollBarMode( TQTextBrowser::AlwaysOff ); mBrowser->setHScrollBarMode( TQTextBrowser::AlwaysOff );
mBrowser->viewport()->installEventFilter( this ); mBrowser->viewport()->installEventFilter( this );
mBrowser->mimeSourceFactory()->addFilePath(KGlobal::dirs()->findResourceDir("data", "kdewizard/pics")+"kdewizard/pics/"); mBrowser->mimeSourceFactory()->addFilePath(TDEGlobal::dirs()->findResourceDir("data", "kdewizard/pics")+"kdewizard/pics/");
TQStringList icons = KGlobal::dirs()->resourceDirs("icon"); TQStringList icons = TDEGlobal::dirs()->resourceDirs("icon");
TQStringList::Iterator it; TQStringList::Iterator it;
for (it = icons.begin(); it != icons.end(); ++it) for (it = icons.begin(); it != icons.end(); ++it)
mBrowser->mimeSourceFactory()->addFilePath(*it); mBrowser->mimeSourceFactory()->addFilePath(*it);

@ -115,7 +115,7 @@ void AmorDialog::readThemes()
// Non-recursive search for theme files, with the relative paths stored // Non-recursive search for theme files, with the relative paths stored
// in files so that absolute paths are not used. // in files so that absolute paths are not used.
KGlobal::dirs()->findAllResources("appdata", "*rc", false, false, files); TDEGlobal::dirs()->findAllResources("appdata", "*rc", false, false, files);
for (TQStringList::ConstIterator it = files.begin(); for (TQStringList::ConstIterator it = files.begin();
it != files.end(); it != files.end();

@ -37,7 +37,7 @@
// //
AmorTips::AmorTips() AmorTips::AmorTips()
{ {
KGlobal::locale()->insertCatalogue("ktip"); // For ktip tip translations TDEGlobal::locale()->insertCatalogue("ktip"); // For ktip tip translations
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

@ -35,7 +35,7 @@ extern "C"
{ {
KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
{ {
KGlobal::locale()->insertCatalogue("keyesapplet"); TDEGlobal::locale()->insertCatalogue("keyesapplet");
EyesApplet *applet = new EyesApplet(configFile, KPanelApplet::Normal, 0, parent, "keyesapplet"); EyesApplet *applet = new EyesApplet(configFile, KPanelApplet::Normal, 0, parent, "keyesapplet");
return applet; return applet;
} }

@ -41,7 +41,7 @@ extern "C"
{ {
KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
{ {
KGlobal::locale()->insertCatalogue("kfifteenapplet"); TDEGlobal::locale()->insertCatalogue("kfifteenapplet");
return new FifteenApplet(configFile, KPanelApplet::Normal, return new FifteenApplet(configFile, KPanelApplet::Normal,
KPanelApplet::About, parent, "kfifteenapplet"); KPanelApplet::About, parent, "kfifteenapplet");
} }
@ -85,7 +85,7 @@ void FifteenApplet::about()
} }
KAboutApplication dialog(_aboutData); KAboutApplication dialog(_aboutData);
dialog.setProgramLogo( KGlobal::instance()->iconLoader()->iconPath( "fifteenpieces", -KIcon::SizeLarge ) ); dialog.setProgramLogo( TDEGlobal::instance()->iconLoader()->iconPath( "fifteenpieces", -KIcon::SizeLarge ) );
dialog.exec(); dialog.exec();
} }

@ -55,7 +55,7 @@ extern "C"
{ {
KDE_EXPORT KPanelApplet *init(TQWidget *parent, const TQString& configFile) KDE_EXPORT KPanelApplet *init(TQWidget *parent, const TQString& configFile)
{ {
KGlobal::locale()->insertCatalogue("kmoon"); TDEGlobal::locale()->insertCatalogue("kmoon");
return new MoonPAWidget(configFile, KPanelApplet::Normal, return new MoonPAWidget(configFile, KPanelApplet::Normal,
KPanelApplet::About|KPanelApplet::Preferences, KPanelApplet::About|KPanelApplet::Preferences,
parent, "kmoonapplet"); parent, "kmoonapplet");
@ -66,7 +66,7 @@ MoonPAWidget::MoonPAWidget(const TQString& configFile, Type type, int actions,
TQWidget *parent, const char *name) TQWidget *parent, const char *name)
: KPanelApplet(configFile, type, actions, parent, name) : KPanelApplet(configFile, type, actions, parent, name)
{ {
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("General"); config->setGroup("General");
TQVBoxLayout *vbox = new TQVBoxLayout(this, 0,0); TQVBoxLayout *vbox = new TQVBoxLayout(this, 0,0);
@ -129,7 +129,7 @@ void MoonPAWidget::settings()
moon->setAngle(dlg.getAngle()); moon->setAngle(dlg.getAngle());
moon->setNorthHemi(dlg.getNorthHemi()); moon->setNorthHemi(dlg.getNorthHemi());
moon->setMask(dlg.getMask()); moon->setMask(dlg.getMask());
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("General"); config->setGroup("General");
config->writeEntry("Rotation", moon->angle()); config->writeEntry("Rotation", moon->angle());
config->writeEntry("Northern", moon->northHemi()); config->writeEntry("Northern", moon->northHemi());

@ -57,7 +57,7 @@ MoonWidget::MoonWidget(TQWidget *parent, const char *name)
time_t clock; time_t clock;
counter = -1; counter = -1;
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("General"); config->setGroup("General");
_angle = config->readNumEntry("Rotation", 0); _angle = config->readNumEntry("Rotation", 0);
_north = config->readBoolEntry("Northern", true); _north = config->readBoolEntry("Northern", true);
@ -94,30 +94,30 @@ void MoonWidget::calcStatus( time_t time )
TQDateTime ln; TQDateTime ln;
ln.setTime_t( last_new ); ln.setTime_t( last_new );
kdDebug() << KGlobal::locale()->formatDateTime( ln ) << endl; kdDebug() << TDEGlobal::locale()->formatDateTime( ln ) << endl;
time_t first_quarter = JDtoDate( moonphasebylunation( lun, 1 ), 0 ); time_t first_quarter = JDtoDate( moonphasebylunation( lun, 1 ), 0 );
TQDateTime fq; TQDateTime fq;
fq.setTime_t( first_quarter ); fq.setTime_t( first_quarter );
kdDebug() << KGlobal::locale()->formatDateTime( fq ) << endl; kdDebug() << TDEGlobal::locale()->formatDateTime( fq ) << endl;
time_t full_moon = JDtoDate( moonphasebylunation( lun, 2 ), 0 ); time_t full_moon = JDtoDate( moonphasebylunation( lun, 2 ), 0 );
TQDateTime fm; TQDateTime fm;
fm.setTime_t( full_moon ); fm.setTime_t( full_moon );
kdDebug() << KGlobal::locale()->formatDateTime( fm ) << endl; kdDebug() << TDEGlobal::locale()->formatDateTime( fm ) << endl;
time_t third_quarter = JDtoDate( moonphasebylunation( lun, 3 ), 0 ); time_t third_quarter = JDtoDate( moonphasebylunation( lun, 3 ), 0 );
TQDateTime tq; TQDateTime tq;
tq.setTime_t( third_quarter ); tq.setTime_t( third_quarter );
kdDebug() << KGlobal::locale()->formatDateTime( tq ) << endl; kdDebug() << TDEGlobal::locale()->formatDateTime( tq ) << endl;
TQDateTime nn; TQDateTime nn;
nn.setTime_t( next_new ); nn.setTime_t( next_new );
kdDebug() << KGlobal::locale()->formatDateTime( nn ) << endl; kdDebug() << TDEGlobal::locale()->formatDateTime( nn ) << endl;
TQDateTime now; TQDateTime now;
now.setTime_t( time ); now.setTime_t( time );
kdDebug() << KGlobal::locale()->formatDateTime( now ) << endl; kdDebug() << TDEGlobal::locale()->formatDateTime( now ) << endl;
counter = ln.daysTo( now ); counter = ln.daysTo( now );
kdDebug() << "counter " << counter << " " << fm.daysTo( now ) << endl; kdDebug() << "counter " << counter << " " << fm.daysTo( now ) << endl;

@ -80,13 +80,13 @@ Kodometer::Kodometer(TQWidget* parent, const char* name)
tripLabel->installEventFilter(this); tripLabel->installEventFilter(this);
// setup help menu // setup help menu
help = new KHelpMenu(this, KGlobal::instance()->aboutData(), false); help = new KHelpMenu(this, TDEGlobal::instance()->aboutData(), false);
KPopupMenu* helpMnu = help->menu(); KPopupMenu* helpMnu = help->menu();
// Make the popup menu // Make the popup menu
menu = new KPopupMenu(); menu = new KPopupMenu();
menu->insertTitle(kapp->miniIcon(), KGlobal::instance()->aboutData()->programName()); menu->insertTitle(kapp->miniIcon(), TDEGlobal::instance()->aboutData()->programName());
enabledID = menu->insertItem(i18n("&Enable"), this, TQT_SLOT(toggleEnabled())); enabledID = menu->insertItem(i18n("&Enable"), this, TQT_SLOT(toggleEnabled()));
metricID = menu->insertItem(i18n("&Metric Display"), this, metricID = menu->insertItem(i18n("&Metric Display"), this,
@ -556,7 +556,7 @@ TQString Kodometer::FormatDistance(double &dist, Units unit)
*/ */
void Kodometer::readSettings(void) void Kodometer::readSettings(void)
{ {
KConfig* config = KGlobal::config(); KConfig* config = TDEGlobal::config();
config->setGroup("Settings"); config->setGroup("Settings");
UseMetric = config->readNumEntry("UseMetric", false); UseMetric = config->readNumEntry("UseMetric", false);
@ -575,7 +575,7 @@ void Kodometer::readSettings(void)
*/ */
void Kodometer::saveSettings(void) void Kodometer::saveSettings(void)
{ {
KConfig* config = KGlobal::config(); KConfig* config = TDEGlobal::config();
config->setGroup("Settings"); config->setGroup("Settings");
config->writeEntry("UseMetric", UseMetric); config->writeEntry("UseMetric", UseMetric);

@ -139,7 +139,7 @@ TopLevel::TopLevel() : KSystemTray()
rebuildTeaMenus(); // populate tops of menus with tea-entries from config rebuildTeaMenus(); // populate tops of menus with tea-entries from config
KHelpMenu* help = new KHelpMenu(this, KGlobal::instance()->aboutData(), false); KHelpMenu* help = new KHelpMenu(this, TDEGlobal::instance()->aboutData(), false);
KPopupMenu* helpMnu = help->menu(); KPopupMenu* helpMnu = help->menu();
start_menu->insertSeparator(); start_menu->insertSeparator();

@ -46,7 +46,7 @@ extern "C"
KSpriteSetup::KSpriteSetup( TQWidget *parent, const char *name ) KSpriteSetup::KSpriteSetup( TQWidget *parent, const char *name )
: TQDialog( parent, name, TRUE ) : TQDialog( parent, name, TRUE )
{ {
KGlobal::locale()->insertCatalogue("ktux"); TDEGlobal::locale()->insertCatalogue("ktux");
saver = 0; saver = 0;
readSettings(); readSettings();
@ -99,7 +99,7 @@ KSpriteSetup::~KSpriteSetup()
// read settings from config file // read settings from config file
void KSpriteSetup::readSettings() void KSpriteSetup::readSettings()
{ {
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup( "Settings" ); config->setGroup( "Settings" );
speed = config->readNumEntry( "Speed", 50 ); speed = config->readNumEntry( "Speed", 50 );
@ -119,7 +119,7 @@ void KSpriteSetup::slotSpeed(int s)
// Ok pressed - save settings and exit // Ok pressed - save settings and exit
void KSpriteSetup::slotOkPressed() void KSpriteSetup::slotOkPressed()
{ {
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("Settings"); config->setGroup("Settings");
config->writeEntry("Speed", speed); config->writeEntry("Speed", speed);
config->sync(); config->sync();
@ -138,7 +138,7 @@ void KSpriteSetup::slotAbout()
KSpriteSaver::KSpriteSaver( WId id ) : KScreenSaver( id ) KSpriteSaver::KSpriteSaver( WId id ) : KScreenSaver( id )
{ {
KGlobal::dirs()->addResourceType("sprite", KStandardDirs::kde_default("data") + "ktux/sprites/"); TDEGlobal::dirs()->addResourceType("sprite", KStandardDirs::kde_default("data") + "ktux/sprites/");
initialise(); initialise();
readSettings(); readSettings();
@ -171,12 +171,12 @@ void KSpriteSaver::readSettings()
{ {
TQString str; TQString str;
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("Settings"); config->setGroup("Settings");
mSpeed = config->readNumEntry("Speed", 50); mSpeed = config->readNumEntry("Speed", 50);
TQString path = KGlobal::dirs()->findResourceDir( "sprite", "bg.png" ); TQString path = TDEGlobal::dirs()->findResourceDir( "sprite", "bg.png" );
SpritePixmapManager::manager()->setPixmapDir(path); SpritePixmapManager::manager()->setPixmapDir(path);

@ -33,7 +33,7 @@
dockwidget::dockwidget(const TQString &location, TQWidget *parent, dockwidget::dockwidget(const TQString &location, TQWidget *parent,
const char *name) : TQWidget(parent,name), m_locationCode( location ), m_orientation(Qt::Horizontal ) const char *name) : TQWidget(parent,name), m_locationCode( location ), m_orientation(Qt::Horizontal )
{ {
m_font = KGlobalSettings::generalFont(); m_font = TDEGlobalSettings::generalFont();
setBackgroundOrigin( AncestorOrigin ); setBackgroundOrigin( AncestorOrigin );
initDock(); initDock();
connect(m_button, TQT_SIGNAL( clicked() ), TQT_SIGNAL( buttonClicked() )); connect(m_button, TQT_SIGNAL( clicked() ), TQT_SIGNAL( buttonClicked() ));
@ -306,7 +306,7 @@ void dockwidget::resizeView( const TQSize &size )
int dockwidget::widthForHeight(int h) int dockwidget::widthForHeight(int h)
{ {
int w; int w;
TQFontInfo fi(KGlobalSettings::generalFont()); TQFontInfo fi(TDEGlobalSettings::generalFont());
if ( m_mode == ShowAll ) if ( m_mode == ShowAll )
{ {
@ -322,7 +322,7 @@ int dockwidget::widthForHeight(int h)
{ {
if ( fi.pixelSize() * 3 <= (h/2) ) // half icon, half text if ( fi.pixelSize() * 3 <= (h/2) ) // half icon, half text
{ {
m_font = KGlobalSettings::generalFont(); m_font = TDEGlobalSettings::generalFont();
} }
else else
{ {
@ -349,7 +349,7 @@ int dockwidget::widthForHeight(int h)
{ {
if ( fi.pixelSize() <= (h/2) ) // half icon, half text if ( fi.pixelSize() <= (h/2) ) // half icon, half text
{ {
m_font = KGlobalSettings::generalFont(); m_font = TDEGlobalSettings::generalFont();
} }
else else
{ {
@ -377,14 +377,14 @@ int dockwidget::heightForWidth( int w )
if ( m_mode == ShowAll ) if ( m_mode == ShowAll )
{ {
TQFontMetrics fmg(KGlobalSettings::generalFont()); TQFontMetrics fmg(TDEGlobalSettings::generalFont());
int maxWidth = fmg.width("888 km/h NNWW"); // a good approximation int maxWidth = fmg.width("888 km/h NNWW"); // a good approximation
if ( w <= 128 ) // top to bottom if ( w <= 128 ) // top to bottom
{ {
if ( maxWidth <= w ) // enough space to use global font if ( maxWidth <= w ) // enough space to use global font
{ {
m_font = KGlobalSettings::generalFont(); m_font = TDEGlobalSettings::generalFont();
} }
else // we have to reduce the fontsize else // we have to reduce the fontsize
{ {
@ -398,7 +398,7 @@ int dockwidget::heightForWidth( int w )
{ {
if ( w >= (maxWidth * 1.5) ) // half of text width shall be icon if ( w >= (maxWidth * 1.5) ) // half of text width shall be icon
{ {
m_font = KGlobalSettings::generalFont(); m_font = TDEGlobalSettings::generalFont();
} }
else else
{ {
@ -412,14 +412,14 @@ int dockwidget::heightForWidth( int w )
} }
else if ( m_mode == ShowTempOnly ) else if ( m_mode == ShowTempOnly )
{ {
TQFontMetrics fmg(KGlobalSettings::generalFont()); TQFontMetrics fmg(TDEGlobalSettings::generalFont());
int maxWidth = fmg.width("888.88 CC"); // a good approximation int maxWidth = fmg.width("888.88 CC"); // a good approximation
if ( w <= 128 ) // top to bottom if ( w <= 128 ) // top to bottom
{ {
if ( maxWidth <= w ) // enough space to use global font if ( maxWidth <= w ) // enough space to use global font
{ {
m_font = KGlobalSettings::generalFont(); m_font = TDEGlobalSettings::generalFont();
} }
else // we have to reduce the fontsize else // we have to reduce the fontsize
{ {
@ -433,7 +433,7 @@ int dockwidget::heightForWidth( int w )
{ {
if ( w >= (maxWidth * 1.5) ) // half of text width shall be icon if ( w >= (maxWidth * 1.5) ) // half of text width shall be icon
{ {
m_font = KGlobalSettings::generalFont(); m_font = TDEGlobalSettings::generalFont();
} }
else else
{ {

@ -42,7 +42,7 @@ extern "C"
{ {
KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
{ {
KGlobal::locale()->insertCatalogue("kweather"); TDEGlobal::locale()->insertCatalogue("kweather");
kweather *theApplet = new kweather(configFile, KPanelApplet::Normal, kweather *theApplet = new kweather(configFile, KPanelApplet::Normal,
0, parent, "kweather"); 0, parent, "kweather");
return theApplet; return theApplet;
@ -144,7 +144,7 @@ void kweather::about(){
I18N_NOOP( "Improvements and more code cleanups" ), "jratke@comcast.net" ); I18N_NOOP( "Improvements and more code cleanups" ), "jratke@comcast.net" );
KAboutApplication about(&aboutData, this, 0); KAboutApplication about(&aboutData, this, 0);
about.setProgramLogo( KGlobal::instance()->iconLoader()->iconPath( "kweather", -KIcon::SizeLarge ) ); about.setProgramLogo( TDEGlobal::instance()->iconLoader()->iconPath( "kweather", -KIcon::SizeLarge ) );
about.exec(); about.exec();
} }

@ -25,7 +25,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
aboutData.addAuthor("Nadeem Hasan", I18N_NOOP("Developer"), aboutData.addAuthor("Nadeem Hasan", I18N_NOOP("Developer"),
"nhasan@kde.org"); "nhasan@kde.org");
KGlobal::locale()->setMainCatalogue( "kweather" ); TDEGlobal::locale()->setMainCatalogue( "kweather" );
TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); TDECmdLineArgs::addCmdLineOptions( options );

@ -64,14 +64,14 @@ reportView::~reportView(){
/** Render the document */ /** Render the document */
void reportView::render(){ void reportView::render(){
TQFont generalFont = KGlobalSettings::generalFont(); TQFont generalFont = TDEGlobalSettings::generalFont();
TQString fntFamily = generalFont.family(); TQString fntFamily = generalFont.family();
int fntSize = generalFont.pointSize(); int fntSize = generalFont.pointSize();
if (fntSize == -1) if (fntSize == -1)
fntSize = TQFontInfo(generalFont).pointSize(); fntSize = TQFontInfo(generalFont).pointSize();
TQString textColor = KGlobalSettings::textColor().name(); TQString textColor = TDEGlobalSettings::textColor().name();
TQString baseColor = KGlobalSettings::baseColor().name(); TQString baseColor = TDEGlobalSettings::baseColor().name();
TQColorGroup cg = palette().active(); TQColorGroup cg = palette().active();
TQString bgColor = cg.background().name(); TQString bgColor = cg.background().name();
TQString hlColor = cg.highlight().name(); TQString hlColor = cg.highlight().name();

@ -110,7 +110,7 @@ void WeatherButton::slotSettingsChanged( int category )
{ {
if ( category != TDEApplication::SETTINGS_MOUSE ) return; if ( category != TDEApplication::SETTINGS_MOUSE ) return;
bool changeCursor = KGlobalSettings::changeCursorOverIcon(); bool changeCursor = TDEGlobalSettings::changeCursorOverIcon();
if ( changeCursor ) if ( changeCursor )
setCursor( KCursor::handCursor() ); setCursor( KCursor::handCursor() );

@ -83,7 +83,7 @@ void WeatherLib::Data::clear()
WeatherLib::WeatherLib(StationDatabase *stationDB, TQObject *parent, const char *name) WeatherLib::WeatherLib(StationDatabase *stationDB, TQObject *parent, const char *name)
: TQObject (parent, name) : TQObject (parent, name)
{ {
KGlobal::locale()->insertCatalogue("kweather"); TDEGlobal::locale()->insertCatalogue("kweather");
m_StationDb = stationDB; m_StationDb = stationDB;
@ -136,7 +136,7 @@ void WeatherLib::slotCopyDone(KIO::Job* job)
if ( !s.isEmpty() ) if ( !s.isEmpty() )
{ {
kdDebug( 12006 ) << "Parse: " << s << endl; kdDebug( 12006 ) << "Parse: " << s << endl;
MetarParser parser(m_StationDb, KGlobal::locale()->measureSystem()); MetarParser parser(m_StationDb, TDEGlobal::locale()->measureSystem());
d->wi = parser.processData(d->wi.reportLocation, s); d->wi = parser.processData(d->wi.reportLocation, s);
d->age = TQDateTime::currentDateTime().addSecs(1800); d->age = TQDateTime::currentDateTime().addSecs(1800);
emit fileUpdate(d->wi.reportLocation); emit fileUpdate(d->wi.reportLocation);
@ -292,7 +292,7 @@ TQString WeatherLib::date(const TQString &stationID){
{ {
TQDateTime gmtDateTime(d->wi.qsDate, d->wi.qsTime); TQDateTime gmtDateTime(d->wi.qsDate, d->wi.qsTime);
TQDateTime localDateTime = gmtDateTime.addSecs(KRFCDate::localUTCOffset() * 60); TQDateTime localDateTime = gmtDateTime.addSecs(KRFCDate::localUTCOffset() * 60);
return KGlobal::locale()->formatDateTime(localDateTime, false, false); return TDEGlobal::locale()->formatDateTime(localDateTime, false, false);
} }
} }
@ -327,8 +327,8 @@ void WeatherLib::update(const TQString &stationID)
TQDateTime timeout = TQDateTime::currentDateTime(); TQDateTime timeout = TQDateTime::currentDateTime();
kdDebug (12006) << "Current Time: " << KGlobal::locale()->formatDateTime(timeout, false, false) << kdDebug (12006) << "Current Time: " << TDEGlobal::locale()->formatDateTime(timeout, false, false) <<
" Update at: " << KGlobal::locale()->formatDateTime(d->age, false, false) << endl; " Update at: " << TDEGlobal::locale()->formatDateTime(d->age, false, false) << endl;
if( timeout >= d->age || !d->updated) if( timeout >= d->age || !d->updated)
getData(d, true /* try even if host was down last time */); getData(d, true /* try even if host was down last time */);
else else

@ -314,7 +314,7 @@ TQString WeatherService::getTime(const TQString &stationID, TimeType timeType)
kdDebug(12006) << "station, lat, lon, time: " << upperStationID << " " << kdDebug(12006) << "station, lat, lon, time: " << upperStationID << " " <<
latitude << " " << longitude << " " << time << endl; latitude << " " << longitude << " " << time << endl;
return KGlobal::locale()->formatTime(time); return TDEGlobal::locale()->formatTime(time);
} }
} }

@ -44,8 +44,8 @@ extern "C"
{ {
KDE_EXPORT KPanelApplet *init(TQWidget *parent, const TQString& configFile) KDE_EXPORT KPanelApplet *init(TQWidget *parent, const TQString& configFile)
{ {
KGlobal::locale()->insertCatalogue("kworldclock"); TDEGlobal::locale()->insertCatalogue("kworldclock");
KGlobal::locale()->insertCatalogue("timezones"); // For time zone translation TDEGlobal::locale()->insertCatalogue("timezones"); // For time zone translation
return new KWWApplet(configFile, KPanelApplet::Normal, return new KWWApplet(configFile, KPanelApplet::Normal,
0, 0,
parent, "kwwapplet"); parent, "kwwapplet");
@ -58,7 +58,7 @@ KWWApplet::KWWApplet(const TQString& configFile, Type type, int actions,
: KPanelApplet(configFile, type, actions, parent, name) : KPanelApplet(configFile, type, actions, parent, name)
{ {
// make use of the icons installed for ksaferppp // make use of the icons installed for ksaferppp
KGlobal::iconLoader()->addAppDir("kworldwatch"); TDEGlobal::iconLoader()->addAppDir("kworldwatch");
TQVBoxLayout *vbox = new TQVBoxLayout(this, 0,0); TQVBoxLayout *vbox = new TQVBoxLayout(this, 0,0);
@ -106,7 +106,7 @@ void KWWApplet::mousePressEvent(TQMouseEvent *e)
{ {
bool clicked = false; bool clicked = false;
if (KGlobalSettings::singleClick()) if (TDEGlobalSettings::singleClick())
{ {
clicked = e->type() == TQMouseEvent::MouseButtonPress; clicked = e->type() == TQMouseEvent::MouseButtonPress;
} }

@ -51,7 +51,7 @@ CityList::~CityList()
void CityList::readCityLists() void CityList::readCityLists()
{ {
TQStringList lists = KGlobal::dirs()->findAllResources("data", "kworldclock/*.tab"); TQStringList lists = TDEGlobal::dirs()->findAllResources("data", "kworldclock/*.tab");
for (TQStringList::Iterator it = lists.begin(); it != lists.end(); ++it) for (TQStringList::Iterator it = lists.begin(); it != lists.end(); ++it)
readCityList(*it); readCityList(*it);
} }

@ -51,7 +51,7 @@
WorldWideWatch::WorldWideWatch(bool restore, TQWidget *parent, const char *name) WorldWideWatch::WorldWideWatch(bool restore, TQWidget *parent, const char *name)
: KMainWindow(parent, name) : KMainWindow(parent, name)
{ {
KGlobal::locale()->insertCatalogue("timezones"); // For time zone translation TDEGlobal::locale()->insertCatalogue("timezones"); // For time zone translation
TQWidget *w = new TQWidget(this); TQWidget *w = new TQWidget(this);
setCentralWidget(w); setCentralWidget(w);

@ -49,7 +49,7 @@ TQPtrList<MapTheme> MapLoader::themes()
{ {
TQPtrList<MapTheme> result; TQPtrList<MapTheme> result;
TQStringList files = KGlobal::dirs()->findAllResources("data", "kworldclock/maps/*/*.desktop"); TQStringList files = TDEGlobal::dirs()->findAllResources("data", "kworldclock/maps/*/*.desktop");
for (TQStringList::Iterator it=files.begin(); it != files.end(); ++it) for (TQStringList::Iterator it=files.begin(); it != files.end(); ++it)
{ {
KDesktopFile conf(*it); KDesktopFile conf(*it);
@ -63,7 +63,7 @@ TQPtrList<MapTheme> MapLoader::themes()
TQStringList MapLoader::maps(const TQString &theme) TQStringList MapLoader::maps(const TQString &theme)
{ {
return KGlobal::dirs()->findAllResources("data", TQString("kworldclock/maps/%1/*.jpg").arg(theme)); return TDEGlobal::dirs()->findAllResources("data", TQString("kworldclock/maps/%1/*.jpg").arg(theme));
} }

@ -369,7 +369,7 @@ TQString MapWidget::cityTime(const TQString &city)
time_t t = time(NULL); time_t t = time(NULL);
TQDateTime dt; TQDateTime dt;
dt.setTime_t(t); dt.setTime_t(t);
result.append(TQString("%1, %2").arg(KGlobal::locale()->formatTime(dt.time(), true)).arg(KGlobal::locale()->formatDate(dt.date(), true))); result.append(TQString("%1, %2").arg(TDEGlobal::locale()->formatTime(dt.time(), true)).arg(TDEGlobal::locale()->formatDate(dt.date(), true)));
if (initial_TZ != 0) if (initial_TZ != 0)
setenv("TZ", initial_TZ, 1); setenv("TZ", initial_TZ, 1);
@ -453,7 +453,7 @@ void MapWidget::showIndicator(const TQPoint &pos)
int w = _cityIndicator->width(); int w = _cityIndicator->width();
int h = _cityIndicator->height(); int h = _cityIndicator->height();
TQRect desk = KGlobalSettings::desktopGeometry(pos); TQRect desk = TDEGlobalSettings::desktopGeometry(pos);
TQPoint newPos; TQPoint newPos;

@ -155,7 +155,7 @@ void ZoneClock::updateTime()
time_t t = time(NULL); time_t t = time(NULL);
TQDateTime dt; TQDateTime dt;
dt.setTime_t(t); dt.setTime_t(t);
_timeLabel->setText(TQString("%1, %2").arg(KGlobal::locale()->formatTime(dt.time(), true)).arg(KGlobal::locale()->formatDate(dt.date(), true))); _timeLabel->setText(TQString("%1, %2").arg(TDEGlobal::locale()->formatTime(dt.time(), true)).arg(TDEGlobal::locale()->formatDate(dt.date(), true)));
if (initial_TZ != 0) if (initial_TZ != 0)
setenv("TZ", initial_TZ, 1); setenv("TZ", initial_TZ, 1);

Loading…
Cancel
Save