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

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

@ -314,7 +314,7 @@ bool Amor::readConfig()
TQStringList files;
// 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();
mConfig.mTheme = (TQString)*files.at(randomTheme);
}
@ -606,7 +606,7 @@ void Amor::slotMouseClicked(const TQPoint &pos)
if (!mMenu)
{
KHelpMenu* help = new KHelpMenu(0, KGlobal::instance()->aboutData(), false);
KHelpMenu* help = new KHelpMenu(0, TDEGlobal::instance()->aboutData(), false);
KPopupMenu* helpMnu = help->menu();
mMenu = new KPopupMenu();
mMenu->insertTitle("Amor"); // I really don't want this i18n'ed

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

@ -115,7 +115,7 @@ void AmorDialog::readThemes()
// Non-recursive search for theme files, with the relative paths stored
// 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();
it != files.end();

@ -37,7 +37,7 @@
//
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)
{
KGlobal::locale()->insertCatalogue("keyesapplet");
TDEGlobal::locale()->insertCatalogue("keyesapplet");
EyesApplet *applet = new EyesApplet(configFile, KPanelApplet::Normal, 0, parent, "keyesapplet");
return applet;
}

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

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

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

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

@ -139,7 +139,7 @@ TopLevel::TopLevel() : KSystemTray()
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();
start_menu->insertSeparator();

@ -46,7 +46,7 @@ extern "C"
KSpriteSetup::KSpriteSetup( TQWidget *parent, const char *name )
: TQDialog( parent, name, TRUE )
{
KGlobal::locale()->insertCatalogue("ktux");
TDEGlobal::locale()->insertCatalogue("ktux");
saver = 0;
readSettings();
@ -99,7 +99,7 @@ KSpriteSetup::~KSpriteSetup()
// read settings from config file
void KSpriteSetup::readSettings()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup( "Settings" );
speed = config->readNumEntry( "Speed", 50 );
@ -119,7 +119,7 @@ void KSpriteSetup::slotSpeed(int s)
// Ok pressed - save settings and exit
void KSpriteSetup::slotOkPressed()
{
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("Settings");
config->writeEntry("Speed", speed);
config->sync();
@ -138,7 +138,7 @@ void KSpriteSetup::slotAbout()
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();
readSettings();
@ -171,12 +171,12 @@ void KSpriteSaver::readSettings()
{
TQString str;
KConfig *config = KGlobal::config();
KConfig *config = TDEGlobal::config();
config->setGroup("Settings");
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);

@ -33,7 +33,7 @@
dockwidget::dockwidget(const TQString &location, TQWidget *parent,
const char *name) : TQWidget(parent,name), m_locationCode( location ), m_orientation(Qt::Horizontal )
{
m_font = KGlobalSettings::generalFont();
m_font = TDEGlobalSettings::generalFont();
setBackgroundOrigin( AncestorOrigin );
initDock();
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 w;
TQFontInfo fi(KGlobalSettings::generalFont());
TQFontInfo fi(TDEGlobalSettings::generalFont());
if ( m_mode == ShowAll )
{
@ -322,7 +322,7 @@ int dockwidget::widthForHeight(int h)
{
if ( fi.pixelSize() * 3 <= (h/2) ) // half icon, half text
{
m_font = KGlobalSettings::generalFont();
m_font = TDEGlobalSettings::generalFont();
}
else
{
@ -349,7 +349,7 @@ int dockwidget::widthForHeight(int h)
{
if ( fi.pixelSize() <= (h/2) ) // half icon, half text
{
m_font = KGlobalSettings::generalFont();
m_font = TDEGlobalSettings::generalFont();
}
else
{
@ -377,14 +377,14 @@ int dockwidget::heightForWidth( int w )
if ( m_mode == ShowAll )
{
TQFontMetrics fmg(KGlobalSettings::generalFont());
TQFontMetrics fmg(TDEGlobalSettings::generalFont());
int maxWidth = fmg.width("888 km/h NNWW"); // a good approximation
if ( w <= 128 ) // top to bottom
{
if ( maxWidth <= w ) // enough space to use global font
{
m_font = KGlobalSettings::generalFont();
m_font = TDEGlobalSettings::generalFont();
}
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
{
m_font = KGlobalSettings::generalFont();
m_font = TDEGlobalSettings::generalFont();
}
else
{
@ -412,14 +412,14 @@ int dockwidget::heightForWidth( int w )
}
else if ( m_mode == ShowTempOnly )
{
TQFontMetrics fmg(KGlobalSettings::generalFont());
TQFontMetrics fmg(TDEGlobalSettings::generalFont());
int maxWidth = fmg.width("888.88 CC"); // a good approximation
if ( w <= 128 ) // top to bottom
{
if ( maxWidth <= w ) // enough space to use global font
{
m_font = KGlobalSettings::generalFont();
m_font = TDEGlobalSettings::generalFont();
}
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
{
m_font = KGlobalSettings::generalFont();
m_font = TDEGlobalSettings::generalFont();
}
else
{

@ -42,7 +42,7 @@ extern "C"
{
KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
{
KGlobal::locale()->insertCatalogue("kweather");
TDEGlobal::locale()->insertCatalogue("kweather");
kweather *theApplet = new kweather(configFile, KPanelApplet::Normal,
0, parent, "kweather");
return theApplet;
@ -144,7 +144,7 @@ void kweather::about(){
I18N_NOOP( "Improvements and more code cleanups" ), "jratke@comcast.net" );
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();
}

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

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

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

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

@ -314,7 +314,7 @@ TQString WeatherService::getTime(const TQString &stationID, TimeType timeType)
kdDebug(12006) << "station, lat, lon, time: " << upperStationID << " " <<
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)
{
KGlobal::locale()->insertCatalogue("kworldclock");
KGlobal::locale()->insertCatalogue("timezones"); // For time zone translation
TDEGlobal::locale()->insertCatalogue("kworldclock");
TDEGlobal::locale()->insertCatalogue("timezones"); // For time zone translation
return new KWWApplet(configFile, KPanelApplet::Normal,
0,
parent, "kwwapplet");
@ -58,7 +58,7 @@ KWWApplet::KWWApplet(const TQString& configFile, Type type, int actions,
: KPanelApplet(configFile, type, actions, parent, name)
{
// make use of the icons installed for ksaferppp
KGlobal::iconLoader()->addAppDir("kworldwatch");
TDEGlobal::iconLoader()->addAppDir("kworldwatch");
TQVBoxLayout *vbox = new TQVBoxLayout(this, 0,0);
@ -106,7 +106,7 @@ void KWWApplet::mousePressEvent(TQMouseEvent *e)
{
bool clicked = false;
if (KGlobalSettings::singleClick())
if (TDEGlobalSettings::singleClick())
{
clicked = e->type() == TQMouseEvent::MouseButtonPress;
}

@ -51,7 +51,7 @@ CityList::~CityList()
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)
readCityList(*it);
}

@ -51,7 +51,7 @@
WorldWideWatch::WorldWideWatch(bool restore, TQWidget *parent, const char *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);
setCentralWidget(w);

@ -49,7 +49,7 @@ TQPtrList<MapTheme> MapLoader::themes()
{
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)
{
KDesktopFile conf(*it);
@ -63,7 +63,7 @@ TQPtrList<MapTheme> MapLoader::themes()
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);
TQDateTime dt;
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)
setenv("TZ", initial_TZ, 1);
@ -453,7 +453,7 @@ void MapWidget::showIndicator(const TQPoint &pos)
int w = _cityIndicator->width();
int h = _cityIndicator->height();
TQRect desk = KGlobalSettings::desktopGeometry(pos);
TQRect desk = TDEGlobalSettings::desktopGeometry(pos);
TQPoint newPos;

@ -155,7 +155,7 @@ void ZoneClock::updateTime()
time_t t = time(NULL);
TQDateTime dt;
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)
setenv("TZ", initial_TZ, 1);

Loading…
Cancel
Save