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

pull/1/head
Timothy Pearson 11 years ago
parent fe33d391dd
commit 5b8ab14946

@ -719,7 +719,7 @@ cmsHTRANSFORM KisAbstractColorSpace::createTransform(KisColorSpace * dstColorSpa
KisProfile * dstProfile, KisProfile * dstProfile,
TQ_INT32 renderingIntent) TQ_INT32 renderingIntent)
{ {
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
bool bpCompensation = cfg->readBoolEntry("useBlackPointCompensation", false); bool bpCompensation = cfg->readBoolEntry("useBlackPointCompensation", false);
int flags = 0; int flags = 0;

@ -33,20 +33,20 @@ KisMetaRegistry::KisMetaRegistry()
{ {
// Create the colorspaces and load the profiles // Create the colorspaces and load the profiles
KGlobal::instance()->dirs()->addResourceType("kis_profiles", TDEGlobal::instance()->dirs()->addResourceType("kis_profiles",
KStandardDirs::kde_default("data") + "chalk/profiles/"); KStandardDirs::kde_default("data") + "chalk/profiles/");
// Add those things here as well, since we are not yet using KisDoc's KisFactory instance (which inits these as well) // Add those things here as well, since we are not yet using KisDoc's KisFactory instance (which inits these as well)
KGlobal::instance()->dirs()->addResourceType("kis_profiles", KStandardDirs::kde_default("data") + "chalk/profiles/"); TDEGlobal::instance()->dirs()->addResourceType("kis_profiles", KStandardDirs::kde_default("data") + "chalk/profiles/");
KGlobal::instance()->dirs()->addResourceDir("kis_profiles", "/usr/share/color/icc"); TDEGlobal::instance()->dirs()->addResourceDir("kis_profiles", "/usr/share/color/icc");
KGlobal::instance()->dirs()->addResourceDir("kis_profiles", TQDir::homeDirPath() + TQString("/.icc/")); TDEGlobal::instance()->dirs()->addResourceDir("kis_profiles", TQDir::homeDirPath() + TQString("/.icc/"));
KGlobal::instance()->dirs()->addResourceDir("kis_profiles", TQDir::homeDirPath() + TQString("/.color/icc/")); TDEGlobal::instance()->dirs()->addResourceDir("kis_profiles", TQDir::homeDirPath() + TQString("/.color/icc/"));
TQStringList profileFilenames; TQStringList profileFilenames;
profileFilenames += KGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.icm", true /* recursive */); profileFilenames += TDEGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.icm", true /* recursive */);
profileFilenames += KGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.ICM", true); profileFilenames += TDEGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.ICM", true);
profileFilenames += KGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.ICC", true); profileFilenames += TDEGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.ICC", true);
profileFilenames += KGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.icc", true); profileFilenames += TDEGlobal::instance()->dirs()->findAllResources("kis_profiles", "*.icc", true);
// Set lcms to return NUll/false etc from failing calls, rather than aborting the app. // Set lcms to return NUll/false etc from failing calls, rather than aborting the app.
cmsErrorAction(LCMS_ERROR_SHOW); cmsErrorAction(LCMS_ERROR_SHOW);

@ -29,7 +29,7 @@ KisThreadPool::KisThreadPool()
KisThreadPool::m_singleton = this; KisThreadPool::m_singleton = this;
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
cfg->setGroup(""); cfg->setGroup("");
m_maxThreads = cfg->readNumEntry("maxthreads", 10); m_maxThreads = cfg->readNumEntry("maxthreads", 10);
m_numberOfRunningThreads = 0; m_numberOfRunningThreads = 0;

@ -64,7 +64,7 @@ KisTileManager::KisTileManager() {
} }
m_currentInMem = 0; m_currentInMem = 0;
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
cfg->setGroup(""); cfg->setGroup("");
m_maxInMem = cfg->readNumEntry("maxtilesinmem", 4000); m_maxInMem = cfg->readNumEntry("maxtilesinmem", 4000);
m_swappiness = cfg->readNumEntry("swappiness", 100); m_swappiness = cfg->readNumEntry("swappiness", 100);
@ -533,7 +533,7 @@ void KisTileManager::reclaimTileToPool(TQ_UINT8* data, TQ_INT32 pixelSize) {
} }
void KisTileManager::configChanged() { void KisTileManager::configChanged() {
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
cfg->setGroup(""); cfg->setGroup("");
m_maxInMem = cfg->readNumEntry("maxtilesinmem", 4000); m_maxInMem = cfg->readNumEntry("maxtilesinmem", 4000);
m_swappiness = cfg->readNumEntry("swappiness", 100); m_swappiness = cfg->readNumEntry("swappiness", 100);

@ -48,7 +48,7 @@ DlgDropshadow::DlgDropshadow( const TQString & /*imageCS*/,
setMainWidget(m_page); setMainWidget(m_page);
resize(m_page->sizeHint()); resize(m_page->sizeHint());
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
m_page->xOffsetSpinBox->setValue( cfg->readNumEntry("dropshadow_x", 8) ); m_page->xOffsetSpinBox->setValue( cfg->readNumEntry("dropshadow_x", 8) );
m_page->yOffsetSpinBox->setValue( cfg->readNumEntry("dropshadow_y", 8) ); m_page->yOffsetSpinBox->setValue( cfg->readNumEntry("dropshadow_y", 8) );
m_page->blurRadiusSpinBox->setValue( cfg->readNumEntry("dropshadow_blurRadius", 5) ); m_page->blurRadiusSpinBox->setValue( cfg->readNumEntry("dropshadow_blurRadius", 5) );
@ -103,7 +103,7 @@ bool DlgDropshadow::allowResizingChecked()
void DlgDropshadow::okClicked() void DlgDropshadow::okClicked()
{ {
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
cfg->writeEntry("dropshadow_x", m_page->xOffsetSpinBox->value()); cfg->writeEntry("dropshadow_x", m_page->xOffsetSpinBox->value());
cfg->writeEntry("dropshadow_y", m_page->yOffsetSpinBox->value()); cfg->writeEntry("dropshadow_y", m_page->yOffsetSpinBox->value());
cfg->writeEntry("dropshadow_blurRadius", m_page->blurRadiusSpinBox->value()); cfg->writeEntry("dropshadow_blurRadius", m_page->blurRadiusSpinBox->value());

@ -91,7 +91,7 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name)
grabber->releaseMouse(); grabber->releaseMouse();
grabber->hide(); grabber->hide();
KConfig *conf=KGlobal::config(); KConfig *conf=TDEGlobal::config();
conf->setGroup("GENERAL"); conf->setGroup("GENERAL");
mainWidget->setDelay(conf->readNumEntry("delay",0)); mainWidget->setDelay(conf->readNumEntry("delay",0));
mainWidget->setMode( conf->readNumEntry( "mode", 0 ) ); mainWidget->setMode( conf->readNumEntry( "mode", 0 ) );
@ -467,7 +467,7 @@ void KSnapshot::slotMovePointer(int x, int y)
void KSnapshot::exit() void KSnapshot::exit()
{ {
KConfig *conf=KGlobal::config(); KConfig *conf=TDEGlobal::config();
conf->setGroup("GENERAL"); conf->setGroup("GENERAL");
conf->writeEntry("delay",mainWidget->delay()); conf->writeEntry("delay",mainWidget->delay());
conf->writeEntry("mode",mainWidget->mode()); conf->writeEntry("mode",mainWidget->mode());
@ -482,7 +482,7 @@ void KSnapshot::exit()
void KSnapshot::slotOk() void KSnapshot::slotOk()
{ {
KConfig *conf=KGlobal::config(); KConfig *conf=TDEGlobal::config();
conf->setGroup("GENERAL"); conf->setGroup("GENERAL");
conf->writeEntry("delay",mainWidget->delay()); conf->writeEntry("delay",mainWidget->delay());
conf->writeEntry("mode",mainWidget->mode()); conf->writeEntry("mode",mainWidget->mode());

@ -60,7 +60,7 @@ protected:
void mouseMoveEvent(TQMouseEvent * e) void mouseMoveEvent(TQMouseEvent * e)
{ {
if (mClickPt != TQPoint(0, 0) && if (mClickPt != TQPoint(0, 0) &&
(e->pos() - mClickPt).manhattanLength() > KGlobalSettings::dndEventDelay()) (e->pos() - mClickPt).manhattanLength() > TDEGlobalSettings::dndEventDelay())
{ {
mClickPt = TQPoint(0, 0); mClickPt = TQPoint(0, 0);
emit startDrag(); emit startDrag();

@ -57,7 +57,7 @@ void SizeTip::positionTip( const TQRect &rect )
if ( rect.intersects( tipRect ) ) if ( rect.intersects( tipRect ) )
{ {
TQRect deskR = KGlobalSettings::desktopGeometry( TQPoint( 0, 0 ) ); TQRect deskR = TDEGlobalSettings::desktopGeometry( TQPoint( 0, 0 ) );
tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) ); tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) );
if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) ) if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) )

@ -44,7 +44,7 @@ K_EXPORT_COMPONENT_FACTORY( chalkscreenshot, KGenericFactory<Screenshot>( "chalk
Screenshot::Screenshot(TQObject *parent, const char *name, const TQStringList &) Screenshot::Screenshot(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name) : KParts::Plugin(parent, name)
{ {
KGlobal::locale()->insertCatalogue("kscreenshot_plugin"); TDEGlobal::locale()->insertCatalogue("kscreenshot_plugin");
setInstance(KGenericFactory<Screenshot>::instance()); setInstance(KGenericFactory<Screenshot>::instance());
setXMLFile(locate("data","chalkplugins/screenshot-chalk.rc"), true); setXMLFile(locate("data","chalkplugins/screenshot-chalk.rc"), true);
KImageIO::registerFormats(); KImageIO::registerFormats();

@ -44,7 +44,7 @@ namespace {
KisConfig::KisConfig() KisConfig::KisConfig()
{ {
m_cfg = KGlobal::config(); m_cfg = TDEGlobal::config();
if (!m_cfg) { if (!m_cfg) {
// Allow unit tests to test parts of the code without having to run the // Allow unit tests to test parts of the code without having to run the
// full application. // full application.
@ -330,7 +330,7 @@ float KisConfig::dockerFontSize()
float KisConfig::getDefaultDockerFontSize() float KisConfig::getDefaultDockerFontSize()
{ {
float ps = TQMIN(9, KGlobalSettings::generalFont().pointSize() * 0.8); float ps = TQMIN(9, TDEGlobalSettings::generalFont().pointSize() * 0.8);
if (ps < 6) ps = 6; if (ps < 6) ps = 6;
return ps; return ps;
} }

@ -96,7 +96,7 @@ KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, cons
{ {
KisConfig cfg; KisConfig cfg;
m_font = KGlobalSettings::generalFont(); m_font = TDEGlobalSettings::generalFont();
m_font.setPointSize((int)cfg.dockerFontSize()); m_font.setPointSize((int)cfg.dockerFontSize());
m_brushWidget = new KisIconWidget(view, "brushes"); m_brushWidget = new KisIconWidget(view, "brushes");

@ -82,7 +82,7 @@ void KisCustomBrush::slotExport() {
void KisCustomBrush::slotAddPredefined() { void KisCustomBrush::slotAddPredefined() {
// Save in the directory that is likely to be: ~/.trinity/share/apps/chalk/brushes // Save in the directory that is likely to be: ~/.trinity/share/apps/chalk/brushes
// a unique file with this brushname // a unique file with this brushname
TQString dir = KGlobal::dirs()->saveLocation("data", "chalk/brushes"); TQString dir = TDEGlobal::dirs()->saveLocation("data", "chalk/brushes");
TQString extension; TQString extension;
if (style->currentItem() == 0) { if (style->currentItem() == 0) {

@ -121,7 +121,7 @@ void KisCustomPalette::slotAddPredefined() {
if (!m_editMode) { if (!m_editMode) {
// Save in the directory that is likely to be: ~/.trinity/share/apps/chalk/palettes // Save in the directory that is likely to be: ~/.trinity/share/apps/chalk/palettes
// a unique file with this palettename // a unique file with this palettename
TQString dir = KGlobal::dirs()->saveLocation("data", "chalk/palettes"); TQString dir = TDEGlobal::dirs()->saveLocation("data", "chalk/palettes");
TQString extension; TQString extension;
extension = ".gpl"; extension = ".gpl";

@ -80,7 +80,7 @@ void KisCustomPattern::slotAddPredefined() {
// Save in the directory that is likely to be: ~/.trinity/share/apps/chalk/patterns // Save in the directory that is likely to be: ~/.trinity/share/apps/chalk/patterns
// a unique file with this pattern name // a unique file with this pattern name
TQString dir = KGlobal::dirs()->saveLocation("data", "chalk/patterns"); TQString dir = TDEGlobal::dirs()->saveLocation("data", "chalk/patterns");
TQString extension; TQString extension;
KTempFile file(dir, ".pat"); KTempFile file(dir, ".pat");

@ -85,17 +85,17 @@ KisPreviewWidget::KisPreviewWidget( TQWidget* parent, const char* name )
, m_firstFilter(true) , m_firstFilter(true)
, m_firstZoom(true) , m_firstZoom(true)
{ {
btnZoomIn->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "viewmag+", KIcon::MainToolbar, 16 )); btnZoomIn->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "viewmag+", KIcon::MainToolbar, 16 ));
connect(btnZoomIn, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomIn())); connect(btnZoomIn, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomIn()));
btnZoomOut->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "viewmag-", KIcon::MainToolbar, 16 )); btnZoomOut->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "viewmag-", KIcon::MainToolbar, 16 ));
connect(btnZoomOut, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomOut())); connect(btnZoomOut, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomOut()));
btnUpdate->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "reload", KIcon::MainToolbar, 16 )); btnUpdate->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "reload", KIcon::MainToolbar, 16 ));
connect(btnUpdate, TQT_SIGNAL(clicked()), this, TQT_SLOT(forceUpdate())); connect(btnUpdate, TQT_SIGNAL(clicked()), this, TQT_SLOT(forceUpdate()));
connect(radioBtnPreview, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setPreviewDisplayed(bool))); connect(radioBtnPreview, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setPreviewDisplayed(bool)));
connect(checkBoxAutoUpdate, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetAutoUpdate(bool))); connect(checkBoxAutoUpdate, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetAutoUpdate(bool)));
btnZoomOneToOne->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "viewmag1", KIcon::MainToolbar, 16 )); btnZoomOneToOne->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "viewmag1", KIcon::MainToolbar, 16 ));
connect(btnZoomOneToOne, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomOneToOne())); connect(btnZoomOneToOne, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomOneToOne()));
m_progress = new KisLabelProgress(frmProgress); m_progress = new KisLabelProgress(frmProgress);

@ -868,7 +868,7 @@ void KisView::resizeEvent(TQResizeEvent *)
} }
} }
int fontheight = TQFontMetrics(KGlobalSettings::generalFont()).height() * 3; int fontheight = TQFontMetrics(TDEGlobalSettings::generalFont()).height() * 3;
m_vScroll->setPageStep(drawH); m_vScroll->setPageStep(drawH);
m_vScroll->setLineStep(fontheight); m_vScroll->setLineStep(fontheight);
m_hScroll->setPageStep(drawW); m_hScroll->setPageStep(drawW);

@ -134,7 +134,7 @@ KoFilter::ConversionStatus KisRawImport::convert(const TQCString& from, const TQ
m_dialog->setCursor(TQt::ArrowCursor); m_dialog->setCursor(TQt::ArrowCursor);
TQApplication::setOverrideCursor(TQt::ArrowCursor); TQApplication::setOverrideCursor(TQt::ArrowCursor);
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
cfg->setGroup("rawimport"); cfg->setGroup("rawimport");
m_page->radioGray->setChecked(cfg->readBoolEntry("gray", false)); m_page->radioGray->setChecked(cfg->readBoolEntry("gray", false));
@ -413,7 +413,7 @@ void KisRawImport::getImageData( TQStringList arguments )
delete m_data; delete m_data;
kdDebug(41008) << "getImageData " << arguments.join(" ") << "\n"; kdDebug(41008) << "getImageData " << arguments.join(" ") << "\n";
KProcess process (this); TDEProcess process (this);
m_data = new TQByteArray(0); m_data = new TQByteArray(0);
for (TQStringList::iterator it = arguments.begin(); it != arguments.end(); ++it) { for (TQStringList::iterator it = arguments.begin(); it != arguments.end(); ++it) {
@ -421,14 +421,14 @@ void KisRawImport::getImageData( TQStringList arguments )
} }
process.setUseShell(true); process.setUseShell(true);
connect(&process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedStdout(KProcess *, char *, int))); connect(&process, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), this, TQT_SLOT(slotReceivedStdout(TDEProcess *, char *, int)));
connect(&process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedStderr(KProcess *, char *, int))); connect(&process, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), this, TQT_SLOT(slotReceivedStderr(TDEProcess *, char *, int)));
connect(&process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessDone())); connect(&process, TQT_SIGNAL(processExited(TDEProcess *)), this, TQT_SLOT(slotProcessDone()));
kdDebug(41008) << "Starting process\n"; kdDebug(41008) << "Starting process\n";
if (!process.start(KProcess::NotifyOnExit, KProcess::AllOutput)) { if (!process.start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput)) {
KMessageBox::error( 0, i18n("Cannot convert RAW files because the dcraw executable could not be started.")); KMessageBox::error( 0, i18n("Cannot convert RAW files because the dcraw executable could not be started."));
} }
while (process.isRunning()) { while (process.isRunning()) {
@ -453,7 +453,7 @@ void KisRawImport::slotProcessDone()
kdDebug(41008) << "process done!\n"; kdDebug(41008) << "process done!\n";
} }
void KisRawImport::slotReceivedStdout(KProcess *, char *buffer, int buflen) void KisRawImport::slotReceivedStdout(TDEProcess *, char *buffer, int buflen)
{ {
//kdDebug(41008) << "stdout received " << buflen << " bytes on stdout.\n"; //kdDebug(41008) << "stdout received " << buflen << " bytes on stdout.\n";
//kdDebug(41008) << TQString::fromAscii(buffer, buflen) << "\n"; //kdDebug(41008) << TQString::fromAscii(buffer, buflen) << "\n";
@ -462,7 +462,7 @@ void KisRawImport::slotReceivedStdout(KProcess *, char *buffer, int buflen)
memcpy(m_data->data() + oldSize, buffer, buflen); memcpy(m_data->data() + oldSize, buffer, buflen);
} }
void KisRawImport::slotReceivedStderr(KProcess *, char *buffer, int buflen) void KisRawImport::slotReceivedStderr(TDEProcess *, char *buffer, int buflen)
{ {
TQByteArray b(buflen); TQByteArray b(buflen);
memcpy(b.data(), buffer, buflen); memcpy(b.data(), buffer, buflen);

@ -22,7 +22,7 @@
#include <KoFilter.h> #include <KoFilter.h>
class KProcess; class TDEProcess;
class KDialogBase; class KDialogBase;
class WdgRawImport; class WdgRawImport;
class KisProfile; class KisProfile;
@ -45,8 +45,8 @@ private slots:
void slotUpdatePreview(); void slotUpdatePreview();
void slotFillCmbProfiles(); void slotFillCmbProfiles();
void slotProcessDone(); void slotProcessDone();
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 incrementProgress(); void incrementProgress();
private: private:
@ -62,7 +62,7 @@ private:
KDialogBase * m_dialog; KDialogBase * m_dialog;
WdgRawImport * m_page; WdgRawImport * m_page;
KisProfile * m_monitorProfile; KisProfile * m_monitorProfile;
KProcess * m_process; TDEProcess * m_process;
TQProgressDialog* m_progress; TQProgressDialog* m_progress;
bool m_err; // Set to true when slotReceivedStderr is called bool m_err; // Set to true when slotReceivedStderr is called
}; };

@ -97,8 +97,8 @@ KoFilter::ConversionStatus GenericFilter::doImport()
} }
else else
{ {
TQString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " " TQString exec = m_exec + " " + TDEProcess::quote(m_chain->inputFile()) + " "
+ KProcess::quote(m_chain->outputFile()); + TDEProcess::quote(m_chain->outputFile());
system(TQFile::encodeName(exec)); system(TQFile::encodeName(exec));
kdDebug() << "Executing: " << exec << endl; kdDebug() << "Executing: " << exec << endl;

@ -41,7 +41,7 @@ public:
protected: protected:
virtual void setupTranslations( void ) virtual void setupTranslations( void )
{ {
KGlobal::locale()->insertCatalogue( "kofficefilters" ); TDEGlobal::locale()->insertCatalogue( "kofficefilters" );
} }
}; };

@ -74,7 +74,7 @@ public:
protected: protected:
virtual void setupTranslations( void ) virtual void setupTranslations( void )
{ {
KGlobal::locale()->insertCatalogue( "kofficefilters" ); TDEGlobal::locale()->insertCatalogue( "kofficefilters" );
} }
}; };

@ -42,7 +42,7 @@ public:
protected: protected:
virtual void setupTranslations( void ) virtual void setupTranslations( void )
{ {
KGlobal::locale()->insertCatalogue( "kofficefilters" ); TDEGlobal::locale()->insertCatalogue( "kofficefilters" );
} }
}; };
@ -98,11 +98,11 @@ EpsImport::convert( const TQCString& from, const TQCString& to )
// Build ghostscript call to convert ps/eps -> ai: // Build ghostscript call to convert ps/eps -> ai:
TQString command( TQString command(
"gs -q -P- -dBATCH -dNOPAUSE -dSAFER -dPARANOIDSAFER -dNODISPLAY ps2ai.ps "); "gs -q -P- -dBATCH -dNOPAUSE -dSAFER -dPARANOIDSAFER -dNODISPLAY ps2ai.ps ");
command += KProcess::quote(input); command += TDEProcess::quote(input);
command += " | "; command += " | ";
command += sedFilter; command += sedFilter;
command += " > "; command += " > ";
command += KProcess::quote(m_chain->outputFile()); command += TDEProcess::quote(m_chain->outputFile());
tqDebug ("command to execute is (%s)", TQFile::encodeName(command).data()); tqDebug ("command to execute is (%s)", TQFile::encodeName(command).data());

@ -52,7 +52,7 @@ namespace Kivio
ImageExport::ImageExport(KoFilter *, const char *, const TQStringList&) ImageExport::ImageExport(KoFilter *, const char *, const TQStringList&)
: KoFilter() : KoFilter()
{ {
KGlobal::locale()->insertCatalogue("kofficefilters"); TDEGlobal::locale()->insertCatalogue("kofficefilters");
} }
KoFilter::ConversionStatus ImageExport::convert(const TQCString& from, const TQCString& to) KoFilter::ConversionStatus ImageExport::convert(const TQCString& from, const TQCString& to)

@ -62,7 +62,7 @@ CSVDialog::CSVDialog(TQWidget* parent, TQByteArray& fileArray, const TQString /*
TQStringList encodings; TQStringList encodings;
encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" );
encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() ); encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() );
encodings += KGlobal::charsets()->descriptiveEncodingNames(); encodings += TDEGlobal::charsets()->descriptiveEncodingNames();
// Add a few non-standard encodings, which might be useful for text files // Add a few non-standard encodings, which might be useful for text files
const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); const TQString description(i18n("Descriptive encoding name","Other ( %1 )"));
encodings << description.arg("Apple Roman"); // Apple encodings << description.arg("Apple Roman"); // Apple
@ -591,7 +591,7 @@ void CSVDialog::ignoreDuplicatesChanged(int)
TQTextCodec* CSVDialog::getCodec(void) const TQTextCodec* CSVDialog::getCodec(void) const
{ {
const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); const TQString strCodec( TDEGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) );
kdDebug(30502) << "Encoding: " << strCodec << endl; kdDebug(30502) << "Encoding: " << strCodec << endl;
bool ok = false; bool ok = false;
@ -604,7 +604,7 @@ TQTextCodec* CSVDialog::getCodec(void) const
} }
else else
{ {
codec = KGlobal::charsets()->codecForName( strCodec, ok ); codec = TDEGlobal::charsets()->codecForName( strCodec, ok );
} }
// Still nothing? // Still nothing?

@ -59,7 +59,7 @@ CSVExportDialog::CSVExportDialog( TQWidget * parent )
TQStringList encodings; TQStringList encodings;
encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" );
encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() ); encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() );
encodings += KGlobal::charsets()->descriptiveEncodingNames(); encodings += TDEGlobal::charsets()->descriptiveEncodingNames();
// Add a few non-standard encodings, which might be useful for text files // Add a few non-standard encodings, which might be useful for text files
const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); const TQString description(i18n("Descriptive encoding name","Other ( %1 )"));
encodings << description.arg("Apple Roman"); // Apple encodings << description.arg("Apple Roman"); // Apple
@ -284,7 +284,7 @@ bool CSVExportDialog::exportSelectionOnly() const
TQTextCodec* CSVExportDialog::getCodec(void) const TQTextCodec* CSVExportDialog::getCodec(void) const
{ {
const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); const TQString strCodec( TDEGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) );
kdDebug(30502) << "Encoding: " << strCodec << endl; kdDebug(30502) << "Encoding: " << strCodec << endl;
bool ok = false; bool ok = false;
@ -297,7 +297,7 @@ TQTextCodec* CSVExportDialog::getCodec(void) const
} }
else else
{ {
codec = KGlobal::charsets()->codecForName( strCodec, ok ); codec = TDEGlobal::charsets()->codecForName( strCodec, ok );
} }
// Still nothing? // Still nothing?

@ -997,7 +997,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert( const TQCString& from, const
addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::show_horizontal_scrollbar", ksdoc->showHorizontalScrollBar()); addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::show_horizontal_scrollbar", ksdoc->showHorizontalScrollBar());
addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::show_vertical_scrollbar", ksdoc->showVerticalScrollBar()); addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::show_vertical_scrollbar", ksdoc->showVerticalScrollBar());
addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::show_notebook_tabs", ksdoc->showTabBar()); addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::show_notebook_tabs", ksdoc->showTabBar());
if (ksdoc->completionMode() == KGlobalSettings::CompletionAuto) if (ksdoc->completionMode() == TDEGlobalSettings::CompletionAuto)
addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::do_auto_completion", "true"); addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::do_auto_completion", "true");
else else
addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::do_auto_completion", "false"); addAttributeItem(gnumeric_doc, attributes, "4", "WorkbookView::do_auto_completion", "false");

@ -277,7 +277,7 @@ void set_document_attributes( Doc * ksdoc, TQDomElement * docElem)
} }
else if ( gmr_name.toElement().text() == "WorkbookView::do_auto_completion") else if ( gmr_name.toElement().text() == "WorkbookView::do_auto_completion")
{ {
ksdoc->setCompletionMode( KGlobalSettings::CompletionAuto); ksdoc->setCompletionMode( TDEGlobalSettings::CompletionAuto);
} }
else if ( gmr_name.toElement().text() == "WorkbookView::is_protected") else if ( gmr_name.toElement().text() == "WorkbookView::is_protected")
{ {

@ -44,7 +44,7 @@ ExportDialog::ExportDialog( TQWidget *parent, const char *name )
m_mainwidget->mSheets, TQT_SLOT( clearSelection() ) ); m_mainwidget->mSheets, TQT_SLOT( clearSelection() ) );
m_mainwidget->mEncodingBox->insertItem( i18n( "Recommended: UTF-8" ) ); m_mainwidget->mEncodingBox->insertItem( i18n( "Recommended: UTF-8" ) );
m_mainwidget->mEncodingBox->insertItem( i18n( "Locale (%1)" ).arg( KGlobal::locale()->codecForEncoding()->name() ) ); m_mainwidget->mEncodingBox->insertItem( i18n( "Locale (%1)" ).arg( TDEGlobal::locale()->codecForEncoding()->name() ) );
m_mainwidget->mCustomURL->setMode( KFile::ExistingOnly ); m_mainwidget->mCustomURL->setMode( KFile::ExistingOnly );
@ -64,7 +64,7 @@ ExportDialog::~ExportDialog()
TQTextCodec *ExportDialog::encoding() const TQTextCodec *ExportDialog::encoding() const
{ {
if( m_mainwidget->mEncodingBox->currentItem() == 1 ) // locale selected if( m_mainwidget->mEncodingBox->currentItem() == 1 ) // locale selected
return KGlobal::locale()->codecForEncoding(); return TDEGlobal::locale()->codecForEncoding();
return TQTextCodec::codecForName( "utf8" ); // utf8 is default return TQTextCodec::codecForName( "utf8" ); // utf8 is default
} }

@ -65,7 +65,7 @@ public:
protected: protected:
virtual void setupTranslations( void ) virtual void setupTranslations( void )
{ {
KGlobal::locale()->insertCatalogue( "kofficefilters" ); TDEGlobal::locale()->insertCatalogue( "kofficefilters" );
} }
}; };

@ -65,7 +65,7 @@ public:
protected: protected:
virtual void setupTranslations( void ) virtual void setupTranslations( void )
{ {
KGlobal::locale()->insertCatalogue( "kofficefilters" ); TDEGlobal::locale()->insertCatalogue( "kofficefilters" );
} }
}; };

@ -119,7 +119,7 @@ void StyleDataMap::defineDefaultStyles(void)
defineNewStyle("Heading 2",2,strHeading+"font-size: 14pt"); defineNewStyle("Heading 2",2,strHeading+"font-size: 14pt");
defineNewStyle("Heading 3",3,strHeading+"font-size: 12pt"); defineNewStyle("Heading 3",3,strHeading+"font-size: 12pt");
defineNewStyle("Block Text",-1,"margin-left: 1in; margin-right: 1in; margin-bottom: 6pt"); defineNewStyle("Block Text",-1,"margin-left: 1in; margin-right: 1in; margin-bottom: 6pt");
TQFontInfo fixedInfo(KGlobalSettings::fixedFont()); TQFontInfo fixedInfo(TDEGlobalSettings::fixedFont());
TQString strPlainText=TQString("font-family: %1") TQString strPlainText=TQString("font-family: %1")
.arg(fixedInfo.family()); // TODO: should be "Courier New" .arg(fixedInfo.family()); // TODO: should be "Courier New"
kdDebug(30506) << "Plain Text: " << strPlainText << endl; kdDebug(30506) << "Plain Text: " << strPlainText << endl;

@ -61,7 +61,7 @@ public:
protected: protected:
virtual void setupTranslations( void ) virtual void setupTranslations( void )
{ {
KGlobal::locale()->insertCatalogue( "kofficefilters" ); TDEGlobal::locale()->insertCatalogue( "kofficefilters" );
} }
}; };

@ -55,7 +55,7 @@ public:
protected: protected:
virtual void setupTranslations( void ) virtual void setupTranslations( void )
{ {
KGlobal::locale()->insertCatalogue( "kofficefilters" ); TDEGlobal::locale()->insertCatalogue( "kofficefilters" );
} }
}; };

@ -43,7 +43,7 @@ AsciiExportDialog :: AsciiExportDialog(TQWidget* parent)
TQStringList encodings; TQStringList encodings;
encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" );
encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() ); encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() );
encodings += KGlobal::charsets()->descriptiveEncodingNames(); encodings += TDEGlobal::charsets()->descriptiveEncodingNames();
// Add a few non-standard encodings, which might be useful for text files // Add a few non-standard encodings, which might be useful for text files
const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); const TQString description(i18n("Descriptive encoding name","Other ( %1 )"));
encodings << description.arg("Apple Roman"); // Apple encodings << description.arg("Apple Roman"); // Apple
@ -63,7 +63,7 @@ AsciiExportDialog :: ~AsciiExportDialog(void)
TQTextCodec* AsciiExportDialog::getCodec(void) const TQTextCodec* AsciiExportDialog::getCodec(void) const
{ {
const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); const TQString strCodec( TDEGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) );
kdDebug(30502) << "Encoding: " << strCodec << endl; kdDebug(30502) << "Encoding: " << strCodec << endl;
bool ok = false; bool ok = false;
@ -76,7 +76,7 @@ TQTextCodec* AsciiExportDialog::getCodec(void) const
} }
else else
{ {
codec = KGlobal::charsets()->codecForName( strCodec, ok ); codec = TDEGlobal::charsets()->codecForName( strCodec, ok );
} }
// Still nothing? // Still nothing?

@ -43,7 +43,7 @@ AsciiImportDialog :: AsciiImportDialog(TQWidget* parent)
TQStringList encodings; TQStringList encodings;
encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" );
encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() ); encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() );
encodings += KGlobal::charsets()->descriptiveEncodingNames(); encodings += TDEGlobal::charsets()->descriptiveEncodingNames();
// Add a few non-standard encodings, which might be useful for text files // Add a few non-standard encodings, which might be useful for text files
const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); const TQString description(i18n("Descriptive encoding name","Other ( %1 )"));
encodings << description.arg("Apple Roman"); // Apple encodings << description.arg("Apple Roman"); // Apple
@ -62,7 +62,7 @@ AsciiImportDialog :: ~AsciiImportDialog(void)
TQTextCodec* AsciiImportDialog::getCodec(void) const TQTextCodec* AsciiImportDialog::getCodec(void) const
{ {
const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); const TQString strCodec( TDEGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) );
kdDebug(30502) << "Encoding: " << strCodec << endl; kdDebug(30502) << "Encoding: " << strCodec << endl;
bool ok = false; bool ok = false;
@ -75,7 +75,7 @@ TQTextCodec* AsciiImportDialog::getCodec(void) const
} }
else else
{ {
codec = KGlobal::charsets()->codecForName( strCodec, ok ); codec = TDEGlobal::charsets()->codecForName( strCodec, ok );
} }
// Still nothing? // Still nothing?

@ -56,7 +56,7 @@ public:
protected: protected:
virtual void setupTranslations(void) virtual void setupTranslations(void)
{ {
KGlobal::locale()->insertCatalogue("kofficefilters"); TDEGlobal::locale()->insertCatalogue("kofficefilters");
} }
}; };

@ -56,7 +56,7 @@ public:
protected: protected:
virtual void setupTranslations( void ) virtual void setupTranslations( void )
{ {
KGlobal::locale()->insertCatalogue( "kofficefilters" ); TDEGlobal::locale()->insertCatalogue( "kofficefilters" );
} }
}; };

@ -48,7 +48,7 @@ HtmlExportDialog :: HtmlExportDialog(TQWidget* parent)
encodingList += i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); encodingList += i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" );
encodingList += i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() ); encodingList += i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() );
encodingList += KGlobal::charsets()->descriptiveEncodingNames(); encodingList += TDEGlobal::charsets()->descriptiveEncodingNames();
m_dialog->comboBoxEncoding->insertStringList( encodingList ); m_dialog->comboBoxEncoding->insertStringList( encodingList );
@ -84,7 +84,7 @@ bool HtmlExportDialog::isXHtml(void) const
TQTextCodec* HtmlExportDialog::getCodec(void) const TQTextCodec* HtmlExportDialog::getCodec(void) const
{ {
const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); const TQString strCodec( TDEGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) );
kdDebug(30503) << "Encoding: " << strCodec << endl; kdDebug(30503) << "Encoding: " << strCodec << endl;
bool ok = false; bool ok = false;
@ -97,7 +97,7 @@ TQTextCodec* HtmlExportDialog::getCodec(void) const
} }
else else
{ {
codec = KGlobal::charsets()->codecForName( strCodec, ok ); codec = TDEGlobal::charsets()->codecForName( strCodec, ok );
} }
// Still nothing? // Still nothing?

@ -41,8 +41,8 @@ MSWriteImportDialog :: MSWriteImportDialog(TQWidget* parent)
{ {
kapp->restoreOverrideCursor(); kapp->restoreOverrideCursor();
m_dialog->comboBoxEncoding->insertStringList(KGlobal::charsets()->availableEncodingNames()); m_dialog->comboBoxEncoding->insertStringList(TDEGlobal::charsets()->availableEncodingNames());
//m_dialog->comboBoxEncoding->insertStringList(KGlobal::charsets()->descriptiveEncodingNames()); //m_dialog->comboBoxEncoding->insertStringList(TDEGlobal::charsets()->descriptiveEncodingNames());
resize(size()); // Is this right? resize(size()); // Is this right?
@ -83,7 +83,7 @@ TQTextCodec* MSWriteImportDialog::getCodec(void) const
{ {
// We do not use TQTextCodec::codecForName here // We do not use TQTextCodec::codecForName here
// because we fear subtle problems // because we fear subtle problems
codec=KGlobal::charsets()->codecForName(strCodec); codec=TDEGlobal::charsets()->codecForName(strCodec);
} }
} }

@ -55,7 +55,7 @@ public:
protected: protected:
virtual void setupTranslations (void) virtual void setupTranslations (void)
{ {
KGlobal::locale()->insertCatalogue ("kofficefilters"); TDEGlobal::locale()->insertCatalogue ("kofficefilters");
} }
}; };

@ -53,7 +53,7 @@ public:
protected: protected:
virtual void setupTranslations (void) virtual void setupTranslations (void)
{ {
KGlobal::locale()->insertCatalogue ("kofficefilters"); TDEGlobal::locale()->insertCatalogue ("kofficefilters");
} }
}; };

@ -45,7 +45,7 @@ class PdfImportFactory : KGenericFactory<PdfImport, KoFilter>
protected: protected:
virtual void setupTranslations() { virtual void setupTranslations() {
KGlobal::locale()->insertCatalogue("kofficefilters"); TDEGlobal::locale()->insertCatalogue("kofficefilters");
} }
}; };

@ -585,23 +585,23 @@ TQString RTFWorker::ProcessParagraphData ( const TQString &paraText,
if (key == "locale" ) if (key == "locale" )
{ {
if (0==(*paraFormatDataIt).variable.m_type) if (0==(*paraFormatDataIt).variable.m_type)
key = KGlobal::locale()->dateFormat(); key = TDEGlobal::locale()->dateFormat();
else else
key = KGlobal::locale()->timeFormat(); key = TDEGlobal::locale()->timeFormat();
} }
else if ( key == "localeshort" ) else if ( key == "localeshort" )
key = KGlobal::locale()->dateFormatShort(); key = TDEGlobal::locale()->dateFormatShort();
else if ( key == "localedatetime" ) else if ( key == "localedatetime" )
{ {
key = KGlobal::locale()->dateFormat(); key = TDEGlobal::locale()->dateFormat();
key += ' '; key += ' ';
key += KGlobal::locale()->timeFormat(); key += TDEGlobal::locale()->timeFormat();
} }
else if ( key == "localedatetimeshort" ) else if ( key == "localedatetimeshort" )
{ {
key = KGlobal::locale()->dateFormat(); key = TDEGlobal::locale()->dateFormat();
key += ' '; key += ' ';
key += KGlobal::locale()->timeFormat(); key += TDEGlobal::locale()->timeFormat();
} }
kdDebug(30515) << "Locale date in KLocale format: " << key << endl; kdDebug(30515) << "Locale date in KLocale format: " << key << endl;

@ -49,7 +49,7 @@ public:
protected: protected:
virtual void setupTranslations( void ) virtual void setupTranslations( void )
{ {
KGlobal::locale()->insertCatalogue( "kofficefilters" ); TDEGlobal::locale()->insertCatalogue( "kofficefilters" );
} }
}; };

@ -77,12 +77,12 @@ XSLTExportDia::XSLTExportDia(KoStoreDevice* in, const TQCString &format, TQWidge
} }
/* Common xslt files box */ /* Common xslt files box */
TQString appName = (const char*) KGlobal::instance()->instanceName(); TQString appName = (const char*) TDEGlobal::instance()->instanceName();
kdDebug() << "app name = " << appName << endl; kdDebug() << "app name = " << appName << endl;
TQString filenames = TQString("xsltfilter") + TQDir::separator() + TQString("export") + TQString filenames = TQString("xsltfilter") + TQDir::separator() + TQString("export") +
TQDir::separator() + appName + TQDir::separator() + "*/*.xsl"; TQDir::separator() + appName + TQDir::separator() + "*/*.xsl";
TQStringList commonFilesList = KGlobal::dirs()->findAllResources("data", filenames, true); TQStringList commonFilesList = TDEGlobal::dirs()->findAllResources("data", filenames, true);
kdDebug() << "There are " << commonFilesList.size() << " entries like " << filenames << endl; kdDebug() << "There are " << commonFilesList.size() << " entries like " << filenames << endl;
TQStringList tempList; TQStringList tempList;

@ -72,12 +72,12 @@ XSLTImportDia::XSLTImportDia(KoStore* out, const TQCString &format, TQWidget* pa
} }
/* Common xslt files box */ /* Common xslt files box */
TQString appName = (const char*) KGlobal::instance()->instanceName(); TQString appName = (const char*) TDEGlobal::instance()->instanceName();
kdDebug() << "app name = " << appName << endl; kdDebug() << "app name = " << appName << endl;
TQString filenames = TQString("xsltfilter") + TQDir::separator() + TQString("import") + TQString filenames = TQString("xsltfilter") + TQDir::separator() + TQString("import") +
TQDir::separator() + appName + TQDir::separator() + "*/*.xsl"; TQDir::separator() + appName + TQDir::separator() + "*/*.xsl";
TQStringList commonFilesList = KGlobal::dirs()->findAllResources("data", filenames, true); TQStringList commonFilesList = TDEGlobal::dirs()->findAllResources("data", filenames, true);
kdDebug() << "There are " << commonFilesList.size() << " entries like " << filenames << endl; kdDebug() << "There are " << commonFilesList.size() << " entries like " << filenames << endl;
TQStringList tempList; TQStringList tempList;

@ -1164,7 +1164,7 @@ VHistoryItem::init()
char buffer[70]; char buffer[70];
sprintf( buffer, "%064ld", ++g_lastKey ); sprintf( buffer, "%064ld", ++g_lastKey );
m_key = buffer; m_key = buffer;
setPixmap( 0, TQPixmap( KGlobal::iconLoader()->iconPath( m_command->icon(), KIcon::Small ) ) ); setPixmap( 0, TQPixmap( TDEGlobal::iconLoader()->iconPath( m_command->icon(), KIcon::Small ) ) );
setText( 0, m_command->name() ); setText( 0, m_command->name() );
} // VHistoryITem::init } // VHistoryITem::init

@ -635,7 +635,7 @@ KarbonPart::initConfig()
undos = config->readNumEntry( "UndoRedo", -1 ); undos = config->readNumEntry( "UndoRedo", -1 );
TQString defaultUnit = "cm"; TQString defaultUnit = "cm";
if( KGlobal::locale()->measureSystem() == KLocale::Imperial ) if( TDEGlobal::locale()->measureSystem() == KLocale::Imperial )
defaultUnit = "in"; defaultUnit = "in";
setUnit( KoUnit::unit( config->readEntry( "Units", defaultUnit ) ) ); setUnit( KoUnit::unit( config->readEntry( "Units", defaultUnit ) ) );

@ -497,7 +497,7 @@ KarbonResourceServer::cachePixmap( const TQString &key, int group_or_size )
TQPixmap *result = 0L; TQPixmap *result = 0L;
if( !( result = m_pixmaps[ key ] ) ) if( !( result = m_pixmaps[ key ] ) )
{ {
result = new TQPixmap( KGlobal::iconLoader()->iconPath( key, group_or_size ) ); result = new TQPixmap( TDEGlobal::iconLoader()->iconPath( key, group_or_size ) );
m_pixmaps.insert( key, result ); m_pixmaps.insert( key, result );
} }
return result; return result;

@ -1171,7 +1171,7 @@ KarbonView::mouseEvent( TQMouseEvent* event, const KoPoint &p )
xy.setX(KoUnit::toUserValue(xy.x(), part()->unit())); xy.setX(KoUnit::toUserValue(xy.x(), part()->unit()));
xy.setY(KoUnit::toUserValue(xy.y(), part()->unit())); xy.setY(KoUnit::toUserValue(xy.y(), part()->unit()));
m_cursorCoords->setText( TQString( "%1, %2" ).arg(KGlobal::_locale->formatNumber(xy.x(), 2)).arg(KGlobal::_locale->formatNumber(xy.y(), 2)) ); m_cursorCoords->setText( TQString( "%1, %2" ).arg(TDEGlobal::_locale->formatNumber(xy.x(), 2)).arg(TDEGlobal::_locale->formatNumber(xy.y(), 2)) );
if( toolController() ) if( toolController() )
return toolController()->mouseEvent( event, p ); return toolController()->mouseEvent( event, p );

@ -625,7 +625,7 @@ VKoPainter::applyPattern( ArtSVP *svp, bool fill )
VPattern pat = fill ? m_fill->pattern() : m_stroke->pattern(); VPattern pat = fill ? m_fill->pattern() : m_stroke->pattern();
if( !pat.isValid() ) { if( !pat.isValid() ) {
pat.load( KGlobal::iconLoader()->iconPath( "karbon.png", -KIcon::SizeMedium ) ); } pat.load( TDEGlobal::iconLoader()->iconPath( "karbon.png", -KIcon::SizeMedium ) ); }
if( !pat.isValid() ) { if( !pat.isValid() ) {
pat = *(dynamic_cast<VPattern *>(KarbonFactory::rServer()->patterns().getFirst() )) ;} pat = *(dynamic_cast<VPattern *>(KarbonFactory::rServer()->patterns().getFirst() )) ;}

@ -325,7 +325,7 @@ VTextOptionsWidget::VTextOptionsWidget( VTextTool* tool, TQWidget *parent )
mainLayout->add( m_tabWidget = new TQTabWidget( base ) ); mainLayout->add( m_tabWidget = new TQTabWidget( base ) );
m_tabWidget->setFont( TQFont( KGlobalSettings::generalFont().family() , 8 ) ); m_tabWidget->setFont( TQFont( TDEGlobalSettings::generalFont().family() , 8 ) );
TQWidget* textWidget = new TQWidget( m_tabWidget ); TQWidget* textWidget = new TQWidget( m_tabWidget );
@ -376,7 +376,7 @@ VTextOptionsWidget::VTextOptionsWidget( VTextTool* tool, TQWidget *parent )
m_tabWidget->addTab( fxWidget, i18n( "Effects" ) ); m_tabWidget->addTab( fxWidget, i18n( "Effects" ) );
m_fontCombo->setCurrentText( KGlobalSettings::generalFont().family() ); m_fontCombo->setCurrentText( TDEGlobalSettings::generalFont().family() );
m_fontSize->setValue( 12 ); m_fontSize->setValue( 12 );
m_fontSize->setSuffix( " pt" ); m_fontSize->setSuffix( " pt" );

@ -62,7 +62,7 @@ CSVImportDialog::CSVImportDialog(TQWidget* parent, TQByteArray& fileArray)
TQStringList encodings; TQStringList encodings;
encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" ); encodings << i18n( "Descriptive encoding name", "Recommended ( %1 )" ).arg( "UTF-8" );
encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() ); encodings << i18n( "Descriptive encoding name", "Locale ( %1 )" ).arg( TQTextCodec::codecForLocale()->name() );
encodings += KGlobal::charsets()->descriptiveEncodingNames(); encodings += TDEGlobal::charsets()->descriptiveEncodingNames();
// Add a few non-standard encodings, which might be useful for text files // Add a few non-standard encodings, which might be useful for text files
const TQString description(i18n("Descriptive encoding name","Other ( %1 )")); const TQString description(i18n("Descriptive encoding name","Other ( %1 )"));
encodings << description.arg("Apple Roman"); // Apple encodings << description.arg("Apple Roman"); // Apple
@ -589,7 +589,7 @@ void CSVImportDialog::ignoreDuplicatesChanged(int)
TQTextCodec* CSVImportDialog::getCodec(void) const TQTextCodec* CSVImportDialog::getCodec(void) const
{ {
const TQString strCodec( KGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) ); const TQString strCodec( TDEGlobal::charsets()->encodingForName( m_dialog->comboBoxEncoding->currentText() ) );
kdDebug(30502) << "Encoding: " << strCodec << endl; kdDebug(30502) << "Encoding: " << strCodec << endl;
bool ok = false; bool ok = false;
@ -602,7 +602,7 @@ TQTextCodec* CSVImportDialog::getCodec(void) const
} }
else else
{ {
codec = KGlobal::charsets()->codecForName( strCodec, ok ); codec = TDEGlobal::charsets()->codecForName( strCodec, ok );
} }
// Still nothing? // Still nothing?

@ -181,7 +181,7 @@ void KChartBackgroundPixmapConfigPage::loadWallpaperFilesList()
TQMap<TQString, TQPair<TQString, TQString> > papers; TQMap<TQString, TQPair<TQString, TQString> > papers;
//search for .desktop files before searching for images without .desktop files //search for .desktop files before searching for images without .desktop files
TQStringList lst = KGlobal::dirs()->findAllResources("wallpaper", "*desktop", false, true); TQStringList lst = TDEGlobal::dirs()->findAllResources("wallpaper", "*desktop", false, true);
TQStringList files; TQStringList files;
for (TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it) for (TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it)
{ {
@ -219,7 +219,7 @@ void KChartBackgroundPixmapConfigPage::loadWallpaperFilesList()
} }
//now find any wallpapers that don't have a .desktop file //now find any wallpapers that don't have a .desktop file
lst = KGlobal::dirs()->findAllResources("wallpaper", "*", false, true); lst = TDEGlobal::dirs()->findAllResources("wallpaper", "*", false, true);
for (TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it) for (TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it)
{ {
if ( !(*it).endsWith(".desktop") && files.grep(*it).empty() ) { if ( !(*it).endsWith(".desktop") && files.grep(*it).empty() ) {

@ -724,8 +724,8 @@ void KChartPart::setChartDefaults()
yAxis = m_params->axisParams( KDChartAxisParams::AxisPosLeft ); yAxis = m_params->axisParams( KDChartAxisParams::AxisPosLeft );
// decimal symbol and thousands separator // decimal symbol and thousands separator
yAxis.setAxisLabelsRadix( KGlobal::locale()->decimalSymbol(), yAxis.setAxisLabelsRadix( TDEGlobal::locale()->decimalSymbol(),
KGlobal::locale()->thousandsSeparator() ); TDEGlobal::locale()->thousandsSeparator() );
m_params->setAxisParams( KDChartAxisParams::AxisPosLeft, yAxis ); m_params->setAxisParams( KDChartAxisParams::AxisPosLeft, yAxis );

@ -356,7 +356,7 @@ void KChartView::slotRepaint()
void KChartView::saveConfig() void KChartView::saveConfig()
{ {
kdDebug(35001) << "Save config..." << endl; kdDebug(35001) << "Save config..." << endl;
((KChartPart*)koDocument())->saveConfig( KGlobal::config() ); ((KChartPart*)koDocument())->saveConfig( TDEGlobal::config() );
} }
@ -364,8 +364,8 @@ void KChartView::loadConfig()
{ {
kdDebug(35001) << "Load config..." << endl; kdDebug(35001) << "Load config..." << endl;
KGlobal::config()->reparseConfiguration(); TDEGlobal::config()->reparseConfiguration();
((KChartPart*)koDocument())->loadConfig( KGlobal::config() ); ((KChartPart*)koDocument())->loadConfig( TDEGlobal::config() );
updateGuiTypeOfChart(); updateGuiTypeOfChart();
//refresh chart when you load config //refresh chart when you load config

@ -824,7 +824,7 @@ void KDTimeHeaderWidget::preparePopupMenu()
TQString KDTimeHeaderWidget::getToolTipText(TQPoint p) TQString KDTimeHeaderWidget::getToolTipText(TQPoint p)
{ {
return KGlobal::locale()->formatDateTime(getDateTimeForIndex(p.x())); return TDEGlobal::locale()->formatDateTime(getDateTimeForIndex(p.x()));
} }
void KDTimeHeaderWidget::addTickRight( int num ) void KDTimeHeaderWidget::addTickRight( int num )
{ {
@ -1962,7 +1962,7 @@ TQDateTime KDTimeHeaderWidget::getEvenTimeDate(TQDateTime tempdatetime ,Scale sc
break; break;
case KDGanttView::Week: case KDGanttView::Week:
tempdate = tempdatetime.date(); tempdate = tempdatetime.date();
while (tempdate.dayOfWeek ()!= KGlobal::locale()->weekStartDay()) while (tempdate.dayOfWeek ()!= TDEGlobal::locale()->weekStartDay())
tempdate = tempdate.addDays(-1); tempdate = tempdate.addDays(-1);
//tempdate = tempdate.addDays(-7); //tempdate = tempdate.addDays(-7);
tempdatetime = TQDateTime (tempdate, TQTime (0,0)); tempdatetime = TQDateTime (tempdate, TQTime (0,0));
@ -2229,7 +2229,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
TQTime tempTime = myRealStart.time(); TQTime tempTime = myRealStart.time();
TQDateTime tempDateTime; TQDateTime tempDateTime;
int i; int i;
const KCalendarSystem * calendar = KGlobal::locale()->calendar(); const KCalendarSystem * calendar = TDEGlobal::locale()->calendar();
switch (myRealScale) switch (myRealScale)
{ {
case KDGanttView::Minute: case KDGanttView::Minute:
@ -2296,7 +2296,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
tempDate = tempDate.addDays(tempMinorScaleCount); tempDate = tempDate.addDays(tempMinorScaleCount);
} }
tempDate = myRealStart.date(); tempDate = myRealStart.date();
while (tempDate.dayOfWeek() != KGlobal::locale()->weekStartDay()) while (tempDate.dayOfWeek() != TDEGlobal::locale()->weekStartDay())
tempDate = tempDate.addDays(1); tempDate = tempDate.addDays(1);
while (tempDate < myRealEnd.date()) { while (tempDate < myRealEnd.date()) {
majorTicks.append( getCoordX(tempDate)); majorTicks.append( getCoordX(tempDate));
@ -2316,7 +2316,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
tempDate = tempDate.addDays(7*tempMinorScaleCount); tempDate = tempDate.addDays(7*tempMinorScaleCount);
} }
tempDate = myRealStart.date(); tempDate = myRealStart.date();
while (tempDate.day() != KGlobal::locale()->weekStartDay()) while (tempDate.day() != TDEGlobal::locale()->weekStartDay())
tempDate = tempDate.addDays(1); tempDate = tempDate.addDays(1);
while (tempDate < myRealEnd.date()) { while (tempDate < myRealEnd.date()) {
majorTicks.append( getCoordX(tempDate)); majorTicks.append( getCoordX(tempDate));

@ -48,15 +48,15 @@ KoGlobal::KoGlobal()
: m_pointSize( -1 ), m_kofficeConfig( 0L ) : m_pointSize( -1 ), m_kofficeConfig( 0L )
{ {
// Install the libkoffice* translations // Install the libkoffice* translations
KGlobal::locale()->insertCatalogue("koffice"); TDEGlobal::locale()->insertCatalogue("koffice");
KImageIO::registerFormats(); KImageIO::registerFormats();
// Tell KStandardDirs about the koffice prefix // Tell KStandardDirs about the koffice prefix
KGlobal::dirs()->addPrefix(PREFIX); TDEGlobal::dirs()->addPrefix(PREFIX);
// Tell the iconloader about share/apps/koffice/icons // Tell the iconloader about share/apps/koffice/icons
KGlobal::iconLoader()->addAppDir("koffice"); TDEGlobal::iconLoader()->addAppDir("koffice");
// Another way to get the DPI of the display would be TQPaintDeviceMetrics, // Another way to get the DPI of the display would be TQPaintDeviceMetrics,
// but we have no widget here (and moving this to KoView wouldn't allow // but we have no widget here (and moving this to KoView wouldn't allow
@ -77,7 +77,7 @@ KoGlobal::~KoGlobal()
TQFont KoGlobal::_defaultFont() TQFont KoGlobal::_defaultFont()
{ {
TQFont font = KGlobalSettings::generalFont(); TQFont font = TDEGlobalSettings::generalFont();
// we have to use TQFontInfo, in case the font was specified with a pixel size // we have to use TQFontInfo, in case the font was specified with a pixel size
if ( font.pointSize() == -1 ) if ( font.pointSize() == -1 )
{ {
@ -132,7 +132,7 @@ void KoGlobal::createListOfLanguages()
// Many of them are already in all_languages but all_languages doesn't // Many of them are already in all_languages but all_languages doesn't
// currently have en_GB or en_US etc. // currently have en_GB or en_US etc.
const TQStringList translationList = KGlobal::dirs()->findAllResources("locale", const TQStringList translationList = TDEGlobal::dirs()->findAllResources("locale",
TQString::fromLatin1("*/entry.desktop")); TQString::fromLatin1("*/entry.desktop"));
for ( TQStringList::ConstIterator it = translationList.begin(); for ( TQStringList::ConstIterator it = translationList.begin();
it != translationList.end(); ++it ) it != translationList.end(); ++it )

@ -33,7 +33,7 @@ class KOFFICECORE_EXPORT KoGlobal
public: public:
/// For KoApplication /// For KoApplication
static void initialize() { static void initialize() {
(void)self(); // I don't want to make KGlobal instances public, so self() is private (void)self(); // I don't want to make TDEGlobal instances public, so self() is private
} }
/** /**
* Return the default font for KOffice programs. * Return the default font for KOffice programs.

@ -217,7 +217,7 @@ KoFormat KoPageFormat::formatFromString( const TQString & string )
KoFormat KoPageFormat::defaultFormat() KoFormat KoPageFormat::defaultFormat()
{ {
int kprinter = KGlobal::locale()->pageSize(); int kprinter = TDEGlobal::locale()->pageSize();
for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i )
{ {
if ( pageFormatInfo[ i ].kprinter == kprinter ) if ( pageFormatInfo[ i ].kprinter == kprinter )

@ -116,7 +116,7 @@ double KoUnit::ptToUnit( const double ptValue, const Unit unit )
TQString KoUnit::toUserStringValue( double ptValue, Unit unit ) TQString KoUnit::toUserStringValue( double ptValue, Unit unit )
{ {
return KGlobal::locale()->formatNumber( toUserValue( ptValue, unit ) ); return TDEGlobal::locale()->formatNumber( toUserValue( ptValue, unit ) );
} }
double KoUnit::fromUserValue( double value, Unit unit ) double KoUnit::fromUserValue( double value, Unit unit )
@ -144,7 +144,7 @@ double KoUnit::fromUserValue( double value, Unit unit )
double KoUnit::fromUserValue( const TQString& value, Unit unit, bool* ok ) double KoUnit::fromUserValue( const TQString& value, Unit unit, bool* ok )
{ {
return fromUserValue( KGlobal::locale()->readNumber( value, ok ), unit ); return fromUserValue( TDEGlobal::locale()->readNumber( value, ok ), unit );
} }
double KoUnit::parseValue( TQString value, double defaultVal ) double KoUnit::parseValue( TQString value, double defaultVal )

@ -89,7 +89,7 @@ KoUnitDoubleValidator::validate( TQString &s, int &pos ) const
TQString KoUnitDoubleBase::getVisibleText( double value ) const TQString KoUnitDoubleBase::getVisibleText( double value ) const
{ {
const TQString num ( TQString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); const TQString num ( TQString( "%1%2").arg( TDEGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) );
kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl; kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl;
return num; return num;
} }
@ -99,11 +99,11 @@ double KoUnitDoubleBase::toDouble( const TQString& str, bool* ok ) const
TQString str2( str ); TQString str2( str );
/* KLocale::readNumber wants the thousand separator exactly at 1000. /* KLocale::readNumber wants the thousand separator exactly at 1000.
But when editing, it might be anywhere. So we need to remove it. */ But when editing, it might be anywhere. So we need to remove it. */
const TQString sep( KGlobal::locale()->thousandsSeparator() ); const TQString sep( TDEGlobal::locale()->thousandsSeparator() );
if ( !sep.isEmpty() ) if ( !sep.isEmpty() )
str2.remove( sep ); str2.remove( sep );
str2.remove( KoUnit::unitName( m_unit ) ); str2.remove( KoUnit::unitName( m_unit ) );
const double dbl = KGlobal::locale()->readNumber( str2, ok ); const double dbl = TDEGlobal::locale()->readNumber( str2, ok );
if ( ok ) if ( ok )
kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << TQString::number( dbl, 'f', 12 ) << endl; kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << TQString::number( dbl, 'f', 12 ) << endl;
else else

@ -145,7 +145,7 @@ TQFont Kexi::smallFont(TQWidget *init)
_INIT_SHARED; _INIT_SHARED;
if (!_int->smallFont) { if (!_int->smallFont) {
_int->smallFont = new TQFont( init->font() ); _int->smallFont = new TQFont( init->font() );
const int wdth = KGlobalSettings::desktopGeometry(init).width(); const int wdth = TDEGlobalSettings::desktopGeometry(init).width();
int size = 10 + TQMAX(0, wdth - 1100) / 100; int size = 10 + TQMAX(0, wdth - 1100) / 100;
size = TQMIN( init->fontInfo().pixelSize(), size ); size = TQMIN( init->fontInfo().pixelSize(), size );
_int->smallFont->setPixelSize( size ); _int->smallFont->setPixelSize( size );

@ -68,7 +68,7 @@ bool KexiDBConnectionSet::addConnectionData(KexiDB::ConnectionData *data, const
|| !filename.isEmpty() && data==d->dataForFilenames[filename]; || !filename.isEmpty() && data==d->dataForFilenames[filename];
if (generateUniqueFilename) { if (generateUniqueFilename) {
TQString dir = KGlobal::dirs()->saveLocation("data", "kexi/connections/", false /*!create*/); TQString dir = TDEGlobal::dirs()->saveLocation("data", "kexi/connections/", false /*!create*/);
if (dir.isEmpty()) if (dir.isEmpty())
return false; return false;
TQString baseFilename( dir + (data->hostName.isEmpty() ? "localhost" : data->hostName) ); TQString baseFilename( dir + (data->hostName.isEmpty() ? "localhost" : data->hostName) );
@ -151,11 +151,11 @@ void KexiDBConnectionSet::clear()
void KexiDBConnectionSet::load() void KexiDBConnectionSet::load()
{ {
clear(); clear();
// TQStringList dirs( KGlobal::dirs()->findDirs("data", "kexi/connections") ); // TQStringList dirs( TDEGlobal::dirs()->findDirs("data", "kexi/connections") );
// kexidbg << dirs << endl; // kexidbg << dirs << endl;
TQStringList files( KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") ); TQStringList files( TDEGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") );
// //also try for capital file extension // //also try for capital file extension
// files += KGlobal::dirs()->findAllResources("data", "kexi/connections/*.KEXIC"); // files += TDEGlobal::dirs()->findAllResources("data", "kexi/connections/*.KEXIC");
// kexidbg << files << endl; // kexidbg << files << endl;
foreach(TQStringList::ConstIterator, it, files) { foreach(TQStringList::ConstIterator, it, files) {

@ -286,11 +286,11 @@ bool KexiDBConnShortcutFile::saveConnectionData(const KexiDB::ConnectionData& da
bool KexiDBConnSetShortcutFiles::loadConnectionDataSet(KexiDBConnectionSet& set) bool KexiDBConnSetShortcutFiles::loadConnectionDataSet(KexiDBConnectionSet& set)
{ {
set.clear(); set.clear();
// TQStringList dirs( KGlobal::dirs()->findDirs("data", "kexi/connections") ); // TQStringList dirs( TDEGlobal::dirs()->findDirs("data", "kexi/connections") );
// kexidbg << dirs << endl; // kexidbg << dirs << endl;
TQStringList files( KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") ); TQStringList files( TDEGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") );
// //also try for capital file extension // //also try for capital file extension
// files += KGlobal::dirs()->findAllResources("data", "kexi/connections/*.KEXIC"); // files += TDEGlobal::dirs()->findAllResources("data", "kexi/connections/*.KEXIC");
kexidbg << files << endl; kexidbg << files << endl;
foreach(TQStringList::ConstIterator, it, files) { foreach(TQStringList::ConstIterator, it, files) {

@ -105,7 +105,7 @@ class KEXICORE_EXPORT KexiDBConnShortcutFile : protected KexiDBShortcutFile
//! connection information (i.e. KexiDBConnectionSet). //! connection information (i.e. KexiDBConnectionSet).
//! This is implementation for handling .KEXIC files. //! This is implementation for handling .KEXIC files.
//! The set is loaded from files found using //! The set is loaded from files found using
//! KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic"). //! TDEGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic").
class KexiDBConnSetShortcutFiles class KexiDBConnSetShortcutFiles
{ {
public: public:

@ -34,7 +34,7 @@ KexiTemplateInfo::List KexiTemplateLoader::loadListInfo()
{ {
KexiTemplateInfo::List list; KexiTemplateInfo::List list;
const TQString subdir = TQString(kapp->instanceName()) + "/templates"; const TQString subdir = TQString(kapp->instanceName()) + "/templates";
TQString lang( KGlobal::locale()->language() ); TQString lang( TDEGlobal::locale()->language() );
TQStringList dirs( kapp->dirs()->findDirs("data", subdir) ); TQStringList dirs( kapp->dirs()->findDirs("data", subdir) );
while (true) { while (true) {
foreach( TQStringList::ConstIterator, it, dirs) { foreach( TQStringList::ConstIterator, it, dirs) {

@ -917,7 +917,7 @@ General TODO:
TODO: TODO:
- on opening detect whether a table exists (empty table view should not be displayed) - on opening detect whether a table exists (empty table view should not be displayed)
- Another Kexi instance started from KexiMainWindow using QProcess freezes after opening - Another Kexi instance started from KexiMainWindow using QProcess freezes after opening
3rd table or so. Move to KProcess on Linux. 3rd table or so. Move to TDEProcess on Linux.
TODO: TODO:
- if you place e.g. a label in a container like a tabwidget and doubleclick it to edit the content, - if you place e.g. a label in a container like a tabwidget and doubleclick it to edit the content,

@ -116,9 +116,9 @@ FormManager::FormManager(TQObject *parent, int options, const char *name)
{ {
Q_UNUSED(options); Q_UNUSED(options);
#ifdef KEXI_STANDALONE #ifdef KEXI_STANDALONE
KGlobal::locale()->insertCatalogue("standalone_kformdesigner"); TDEGlobal::locale()->insertCatalogue("standalone_kformdesigner");
#else #else
KGlobal::locale()->insertCatalogue("kformdesigner"); TDEGlobal::locale()->insertCatalogue("kformdesigner");
#endif #endif
connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) ); connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
@ -226,7 +226,7 @@ FormManager::createActions(WidgetLibrary *lib, KActionCollection* collection, KX
this, TQT_SLOT(slotStyle()), m_collection, "change_style"); this, TQT_SLOT(slotStyle()), m_collection, "change_style");
m_style->setEditable(false); m_style->setEditable(false);
KGlobal::config()->setGroup("General"); TDEGlobal::config()->setGroup("General");
TQString currentStyle = TQString::fromLatin1(kapp->style().name()).lower(); TQString currentStyle = TQString::fromLatin1(kapp->style().name()).lower();
const TQStringList styles = TQStyleFactory::keys(); const TQStringList styles = TQStyleFactory::keys();
m_style->setItems(styles); m_style->setItems(styles);
@ -1460,7 +1460,7 @@ void
FormManager::slotSettingsChanged(int category) FormManager::slotSettingsChanged(int category)
{ {
if (category==TDEApplication::SETTINGS_SHORTCUTS) { if (category==TDEApplication::SETTINGS_SHORTCUTS) {
m_contextMenuKey = KGlobalSettings::contextMenuKey(); m_contextMenuKey = TDEGlobalSettings::contextMenuKey();
} }
} }

@ -47,7 +47,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::addCmdLineOptions(options); TDECmdLineArgs::addCmdLineOptions(options);
TDEApplication app; TDEApplication app;
KGlobal::iconLoader()->addAppDir("kexi"); TDEGlobal::iconLoader()->addAppDir("kexi");
KFDMainWindow *v = new KFDMainWindow(); KFDMainWindow *v = new KFDMainWindow();
if (!v->centralWidget()) { //KFD part could be not found if (!v->centralWidget()) { //KFD part could be not found

@ -92,8 +92,8 @@ bool DriverManagerInternal::lookupDrivers()
connect(tqApp,TQT_SIGNAL(aboutToQuit()),this,TQT_SLOT(slotAppQuits())); connect(tqApp,TQT_SIGNAL(aboutToQuit()),this,TQT_SLOT(slotAppQuits()));
} }
//TODO: for QT-only version check for TDEInstance wrapper //TODO: for QT-only version check for TDEInstance wrapper
// KexiDBWarn << "DriverManagerInternal::lookupDrivers(): cannot work without TDEInstance (KGlobal::instance()==0)!" << endl; // KexiDBWarn << "DriverManagerInternal::lookupDrivers(): cannot work without TDEInstance (TDEGlobal::instance()==0)!" << endl;
// setError("Driver Manager cannot work without TDEInstance (KGlobal::instance()==0)!"); // setError("Driver Manager cannot work without TDEInstance (TDEGlobal::instance()==0)!");
lookupDriversNeeded = false; lookupDriversNeeded = false;
clearError(); clearError();

@ -613,12 +613,12 @@ TQString KexiDB::formatNumberForVisibleDecimalPlaces(double value, int decimalPl
i--; i--;
if (s[i]=='.') //remove '.' if (s[i]=='.') //remove '.'
i--; i--;
s = s.left(i+1).replace('.', KGlobal::locale()->decimalSymbol()); s = s.left(i+1).replace('.', TDEGlobal::locale()->decimalSymbol());
return s; return s;
} }
if (decimalPlaces == 0) if (decimalPlaces == 0)
return TQString::number((int)value); return TQString::number((int)value);
return KGlobal::locale()->formatNumber(value, decimalPlaces); return TDEGlobal::locale()->formatNumber(value, decimalPlaces);
} }
KexiDB::Field::Type KexiDB::intToFieldType( int type ) KexiDB::Field::Type KexiDB::intToFieldType( int type )

@ -154,11 +154,11 @@ int KexiMainWindowImpl::create(int argc, char *argv[], TDEAboutData* aboutdata)
TDEApplication* app = new TDEApplication(true, GUIenabled); TDEApplication* app = new TDEApplication(true, GUIenabled);
#ifdef KEXI_STANDALONE #ifdef KEXI_STANDALONE
KGlobal::locale()->removeCatalogue("kexi"); TDEGlobal::locale()->removeCatalogue("kexi");
KGlobal::locale()->insertCatalogue("standalone_kexi"); TDEGlobal::locale()->insertCatalogue("standalone_kexi");
#endif #endif
KGlobal::locale()->insertCatalogue("koffice"); TDEGlobal::locale()->insertCatalogue("koffice");
KGlobal::locale()->insertCatalogue("koproperty"); TDEGlobal::locale()->insertCatalogue("koproperty");
#ifdef CUSTOM_VERSION #ifdef CUSTOM_VERSION
# include "custom_exec.h" # include "custom_exec.h"
@ -255,8 +255,8 @@ KexiMainWindowImpl::KexiMainWindowImpl()
manager()->setSplitterKeepSize(true); manager()->setSplitterKeepSize(true);
setStandardMDIMenuEnabled(false); setStandardMDIMenuEnabled(false);
setAsDefaultHost(); //this is default host now. setAsDefaultHost(); //this is default host now.
KGlobal::iconLoader()->addAppDir("kexi"); TDEGlobal::iconLoader()->addAppDir("kexi");
KGlobal::iconLoader()->addAppDir("koffice"); TDEGlobal::iconLoader()->addAppDir("koffice");
//get informed //get informed
connect(&Kexi::partManager(),TQT_SIGNAL(partLoaded(KexiPart::Part*)),this,TQT_SLOT(slotPartLoaded(KexiPart::Part*))); connect(&Kexi::partManager(),TQT_SIGNAL(partLoaded(KexiPart::Part*)),this,TQT_SLOT(slotPartLoaded(KexiPart::Part*)));
@ -1360,7 +1360,7 @@ tristate KexiMainWindowImpl::createProjectFromTemplate(const KexiProjectData& pr
while (true) { while (true) {
#ifdef TQ_WS_WIN #ifdef TQ_WS_WIN
//! @todo remove //! @todo remove
TQString recentDir = KGlobalSettings::documentPath(); TQString recentDir = TDEGlobalSettings::documentPath();
if (fname.isEmpty() && !projectData.constConnectionData()->dbFileName().isEmpty()) //propose filename from db template name if (fname.isEmpty() && !projectData.constConnectionData()->dbFileName().isEmpty()) //propose filename from db template name
fname = KFileDialog::getStartURL(startDir, recentDir).path() fname = KFileDialog::getStartURL(startDir, recentDir).path()
+ '/' + projectData.constConnectionData()->dbFileName(); + '/' + projectData.constConnectionData()->dbFileName();
@ -2073,8 +2073,8 @@ KexiMainWindowImpl::restoreSettings()
int scnum = TQApplication::desktop()->screenNumber(parentWidget()); int scnum = TQApplication::desktop()->screenNumber(parentWidget());
TQRect desk = TQApplication::desktop()->screenGeometry(scnum); TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
//#if KDE_IS_VERSION(3,1,90) //#if KDE_IS_VERSION(3,1,90)
// restoredWidth = KGlobalSettings::screenGeometry(scnum).width(); // restoredWidth = TDEGlobalSettings::screenGeometry(scnum).width();
// restoredHeight = KGlobalSettings::screenGeometry(scnum).height(); // restoredHeight = TDEGlobalSettings::screenGeometry(scnum).height();
//#else //#else
// restoredWidth = TQApplication::desktop()->width(); // restoredWidth = TQApplication::desktop()->width();
// restoredHeight = TQApplication::desktop()->height(); // restoredHeight = TQApplication::desktop()->height();
@ -2563,7 +2563,7 @@ KexiMainWindowImpl::slotProjectNew()
} }
//todo: pass new_data->caption() //todo: pass new_data->caption()
//start new instance //start new instance
//! @todo use KProcess? //! @todo use TDEProcess?
TQProcess proc(args, TQT_TQOBJECT(this), "process"); TQProcess proc(args, TQT_TQOBJECT(this), "process");
proc.setCommunication((TQProcess::Communication)0); proc.setCommunication((TQProcess::Communication)0);
// proc.setWorkingDirectory( TQFileInfo(new_data->connectionData()->fileName()).dir(true) ); // proc.setWorkingDirectory( TQFileInfo(new_data->connectionData()->fileName()).dir(true) );
@ -3989,7 +3989,7 @@ void KexiMainWindowImpl::importantInfo(bool /*onStartup*/)
if (!d->config->hasKey("RunOnStart")) if (!d->config->hasKey("RunOnStart"))
d->config->writeEntry("RunOnStart",true); d->config->writeEntry("RunOnStart",true);
TQString lang = KGlobal::locale()->language(); TQString lang = TDEGlobal::locale()->language();
TQString fname = locate("data", TQString("kexi/readme_")+lang); TQString fname = locate("data", TQString("kexi/readme_")+lang);
if (fname.isEmpty())//back to default if (fname.isEmpty())//back to default
fname = locate("data", "kexi/readme_en"); fname = locate("data", "kexi/readme_en");
@ -4002,7 +4002,7 @@ void KexiMainWindowImpl::importantInfo(bool /*onStartup*/)
TQFile f(fname); TQFile f(fname);
if ( f.open( IO_ReadOnly ) ) { if ( f.open( IO_ReadOnly ) ) {
TQTextStream ts(&f); TQTextStream ts(&f);
ts.setCodec( KGlobal::locale()->codecForEncoding() ); ts.setCodec( TDEGlobal::locale()->codecForEncoding() );
TQTextBrowser *tb = KexiUtils::findFirstChild<KTextBrowser>(&tipDialog,"KTextBrowser"); TQTextBrowser *tb = KexiUtils::findFirstChild<KTextBrowser>(&tipDialog,"KTextBrowser");
if (tb) { if (tb) {
tb->setText( TQString("<qt>%1</qt>").arg(ts.read()) ); tb->setText( TQString("<qt>%1</qt>").arg(ts.read()) );

@ -41,7 +41,7 @@ KexiNewStuff::KexiNewStuff(TQWidget *parent)
// fails to download something, it still marks the thing as // fails to download something, it still marks the thing as
// successfully downloaded and therefore we arn't able to // successfully downloaded and therefore we arn't able to
// download it again :-/ // download it again :-/
KGlobal::config()->deleteGroup("KNewStuffStatus"); TDEGlobal::config()->deleteGroup("KNewStuffStatus");
} }
KexiNewStuff::~KexiNewStuff() KexiNewStuff::~KexiNewStuff()

@ -278,7 +278,7 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, TQPainter& painter, boo
} }
painter.setFont(m_mainFont); painter.setFont(m_mainFont);
m_dateTimeText = KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime(), m_dateTimeText = TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime(),
true, false); true, false);
m_dateTimeWidth = painter.fontMetrics().width(m_dateTimeText+" "); m_dateTimeWidth = painter.fontMetrics().width(m_dateTimeText+" ");
m_mainLineSpacing = painter.fontMetrics().lineSpacing(); m_mainLineSpacing = painter.fontMetrics().lineSpacing();
@ -432,23 +432,23 @@ void KexiSimplePrintingEngine::paintRecord(TQPainter& painter, KexiTableItem *it
else if (ftype==KexiDB::Field::DateTime) { else if (ftype==KexiDB::Field::DateTime) {
TQDateTime dt(v.toDateTime()); TQDateTime dt(v.toDateTime());
if (dt.isValid()) if (dt.isValid())
text = KGlobal::locale()->formatDateTime(dt); text = TDEGlobal::locale()->formatDateTime(dt);
} }
//! todo inherit format //! todo inherit format
else if (ftype==KexiDB::Field::Date) { else if (ftype==KexiDB::Field::Date) {
TQDate date(v.toDate()); TQDate date(v.toDate());
if (date.isValid()) if (date.isValid())
text = KGlobal::locale()->formatDate(date, true/*short*/); text = TDEGlobal::locale()->formatDate(date, true/*short*/);
} }
//! todo inherit format //! todo inherit format
else if (ftype==KexiDB::Field::Time) { else if (ftype==KexiDB::Field::Time) {
TQTime time(v.toTime()); TQTime time(v.toTime());
if (time.isValid()) if (time.isValid())
text = KGlobal::locale()->formatTime(time); text = TDEGlobal::locale()->formatTime(time);
} }
//! todo currency, decimal... //! todo currency, decimal...
else if (ci->field->isFPNumericType()) else if (ci->field->isFPNumericType())
text = KGlobal::locale()->formatNumber(v.toDouble()); text = TDEGlobal::locale()->formatNumber(v.toDouble());
else if (ftype==KexiDB::Field::Boolean) else if (ftype==KexiDB::Field::Boolean)
text = v.toBool() text = v.toBool()
? i18n("Boolean Yes (true)","Yes") : i18n("Boolean No (false)", "No"); ? i18n("Boolean Yes (true)","Yes") : i18n("Boolean No (false)", "No");

@ -324,7 +324,7 @@ KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWi
// settings // settings
//! @todo default? //! @todo default?
m_unit = KLocale::Metric == KGlobal::locale()->measureSystem() ? KoUnit::U_CM : KoUnit::U_INCH; m_unit = KLocale::Metric == TDEGlobal::locale()->measureSystem() ? KoUnit::U_CM : KoUnit::U_INCH;
// GUI // GUI
TQVBoxLayout *lyr = new TQVBoxLayout(this); TQVBoxLayout *lyr = new TQVBoxLayout(this);

@ -108,7 +108,7 @@ KexiConnSelectorWidget::KexiConnSelectorWidget( KexiDBConnectionSet& conn_set,
d->conn_set = &conn_set; d->conn_set = &conn_set;
d->startDirOrVariable = startDirOrVariable; d->startDirOrVariable = startDirOrVariable;
TQString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0); TQString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
const TQPixmap &icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); const TQPixmap &icon = TDEGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
setIcon( icon ); setIcon( icon );
TQVBoxLayout* globalLyr = new TQVBoxLayout( this ); TQVBoxLayout* globalLyr = new TQVBoxLayout( this );

@ -107,7 +107,7 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set,
TQString none; TQString none;
d->lvi_file = new KListViewItem( m_prjtype_sel->lv_types, i18n("New Project Stored in File") ); d->lvi_file = new KListViewItem( m_prjtype_sel->lv_types, i18n("New Project Stored in File") );
d->lvi_file->setPixmap(0, d->lvi_file->setPixmap(0,
KGlobal::iconLoader()->loadIcon( KMimeType::mimeType( TDEGlobal::iconLoader()->loadIcon( KMimeType::mimeType(
KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0), KIcon::Desktop KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0), KIcon::Desktop
) )
); );
@ -357,15 +357,15 @@ void KexiNewProjectWizard::accept()
void KexiNewProjectWizard::done(int r) void KexiNewProjectWizard::done(int r)
{ {
/* //save state (always, no matter if dialog is accepted or not) /* //save state (always, no matter if dialog is accepted or not)
KGlobal::config()->setGroup("Startup"); TDEGlobal::config()->setGroup("Startup");
if (!m_prjtype_sel->chk_always->isChecked()) if (!m_prjtype_sel->chk_always->isChecked())
KGlobal::config()->deleteEntry("DefaultStorageForNewProjects"); TDEGlobal::config()->deleteEntry("DefaultStorageForNewProjects");
else if (m_prjtype_sel->lv_types->currentItem()==d->lvi_file) else if (m_prjtype_sel->lv_types->currentItem()==d->lvi_file)
KGlobal::config()->writeEntry("DefaultStorageForNewProjects","File"); TDEGlobal::config()->writeEntry("DefaultStorageForNewProjects","File");
else else
KGlobal::config()->writeEntry("DefaultStorageForNewProjects","Server");*/ TDEGlobal::config()->writeEntry("DefaultStorageForNewProjects","Server");*/
KGlobal::config()->sync(); TDEGlobal::config()->sync();
KWizard::done(r); KWizard::done(r);
} }

@ -105,7 +105,7 @@ KexiProjectSelectorWidget::KexiProjectSelectorWidget(
d->showProjectNameColumn = showProjectNameColumn; d->showProjectNameColumn = showProjectNameColumn;
d->showConnectionColumns = showConnectionColumns; d->showConnectionColumns = showConnectionColumns;
TQString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0); TQString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
d->fileicon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); d->fileicon = TDEGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
setIcon( d->fileicon ); setIcon( d->fileicon );
d->dbicon = SmallIcon("database"); d->dbicon = SmallIcon("database");
// list->setHScrollBarMode( TQScrollView::AlwaysOn ); // list->setHScrollBarMode( TQScrollView::AlwaysOn );

@ -69,9 +69,9 @@ public:
result = 0; result = 0;
TQString none, iconname; TQString none, iconname;
iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0); iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
kexi_sqlite_icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); kexi_sqlite_icon = TDEGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
iconname = KMimeType::mimeType("application/x-kexiproject-shortcut")->icon(none,0); iconname = KMimeType::mimeType("application/x-kexiproject-shortcut")->icon(none,0);
kexi_shortcut_icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop ); kexi_shortcut_icon = TDEGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
prj_selector = 0; prj_selector = 0;
chkDoNotShow = 0; chkDoNotShow = 0;
openExistingConnWidget = 0; openExistingConnWidget = 0;
@ -208,8 +208,8 @@ KexiStartupDialog::~KexiStartupDialog()
bool KexiStartupDialog::shouldBeShown() bool KexiStartupDialog::shouldBeShown()
{ {
KGlobal::config()->setGroup("Startup"); TDEGlobal::config()->setGroup("Startup");
return KGlobal::config()->readBoolEntry("ShowStartupDialog",true); return TDEGlobal::config()->readBoolEntry("ShowStartupDialog",true);
} }
void KexiStartupDialog::show() void KexiStartupDialog::show()
@ -272,15 +272,15 @@ void KexiStartupDialog::done(int r)
} }
//save settings //save settings
KGlobal::config()->setGroup("Startup"); TDEGlobal::config()->setGroup("Startup");
if (d->openExistingConnWidget) if (d->openExistingConnWidget)
KGlobal::config()->writeEntry("OpenExistingType", TDEGlobal::config()->writeEntry("OpenExistingType",
(d->openExistingConnWidget->selectedConnectionType() == KexiConnSelectorWidget::FileBased) (d->openExistingConnWidget->selectedConnectionType() == KexiConnSelectorWidget::FileBased)
? "File" : "Server"); ? "File" : "Server");
if (d->chkDoNotShow) if (d->chkDoNotShow)
KGlobal::config()->writeEntry("ShowStartupDialog",!d->chkDoNotShow->isChecked()); TDEGlobal::config()->writeEntry("ShowStartupDialog",!d->chkDoNotShow->isChecked());
KGlobal::config()->sync(); TDEGlobal::config()->sync();
KDialogBase::done(r); KDialogBase::done(r);
} }
@ -552,7 +552,7 @@ void KexiStartupDialog::setupPageOpenExisting()
d->pageOpenExisting, "KexiConnSelectorWidget"); d->pageOpenExisting, "KexiConnSelectorWidget");
d->openExistingConnWidget->hideConnectonIcon(); d->openExistingConnWidget->hideConnectonIcon();
lyr->addWidget( d->openExistingConnWidget ); lyr->addWidget( d->openExistingConnWidget );
if (KGlobal::config()->readEntry("OpenExistingType","File")=="File") if (TDEGlobal::config()->readEntry("OpenExistingType","File")=="File")
d->openExistingConnWidget->showSimpleConn(); d->openExistingConnWidget->showSimpleConn();
else { else {
d->openExistingConnWidget->showSimpleConn(); d->openExistingConnWidget->showSimpleConn();

@ -56,7 +56,7 @@ KexiStartupFileDialogBase::KexiStartupFileDialogBase(
//make default 'My Documents' folder //make default 'My Documents' folder
//TODO: store changes in the app's config file? //TODO: store changes in the app's config file?
if (_dirName.isEmpty()) if (_dirName.isEmpty())
_dirName = KGlobalSettings::documentPath(); _dirName = TDEGlobalSettings::documentPath();
init(_dirName, filter, parent); init(_dirName, filter, parent);
@ -84,7 +84,7 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f
//TODO d->keepLocation = false; //TODO d->keepLocation = false;
//TODO d->operationMode = Opening; //TODO d->operationMode = Opening;
setMode(KFile::File | KFile::ExistingOnly); //(js) default: open action setMode(KFile::File | KFile::ExistingOnly); //(js) default: open action
setIcon( KGlobal::iconLoader()->loadIcon("fileopen", KIcon::Desktop) ); setIcon( TDEGlobal::iconLoader()->loadIcon("fileopen", KIcon::Desktop) );
setDir(TQDir(startDir)); setDir(TQDir(startDir));
//TODO d->hasDefaultFilter = false; //TODO d->hasDefaultFilter = false;
//TODO d->hasView = false; //TODO d->hasView = false;
@ -99,7 +99,7 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f
//(js) d->autoSelectExtCheckBox = 0; // delayed loading //(js) d->autoSelectExtCheckBox = 0; // delayed loading
//TODO d->autoSelectExtChecked = false; //TODO d->autoSelectExtChecked = false;
//(js) d->urlBar = 0; // delayed loading //(js) d->urlBar = 0; // delayed loading
//TODO KConfig *config = KGlobal::config(); //TODO KConfig *config = TDEGlobal::config();
//TODO KConfigGroupSaver cs( config, ConfigGroup ); //TODO KConfigGroupSaver cs( config, ConfigGroup );
//TODO d->initializeSpeedbar = config->readBoolEntry( "Set speedbar defaults", //TODO d->initializeSpeedbar = config->readBoolEntry( "Set speedbar defaults",
//TODO true ); //TODO true );
@ -131,7 +131,7 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f
text ); text );
KURL docPath; KURL docPath;
docPath.setPath( KGlobalSettings::documentPath() ); docPath.setPath( TDEGlobalSettings::documentPath() );
if ( u.path(+1) != docPath.path(+1) ) { if ( u.path(+1) != docPath.path(+1) ) {
text = i18n("Documents: %1").arg( docPath.path( +1 ) ); text = i18n("Documents: %1").arg( docPath.path( +1 ) );
d->pathCombo->addDefaultURL( u, d->pathCombo->addDefaultURL( u,
@ -139,7 +139,7 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f
text ); text );
} }
u.setPath( KGlobalSettings::desktopPath() ); u.setPath( TDEGlobalSettings::desktopPath() );
text = i18n("Desktop: %1").arg( u.path( +1 ) ); text = i18n("Desktop: %1").arg( u.path( +1 ) );
d->pathCombo->addDefaultURL( u, d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ), KMimeType::pixmapForURL( u, 0, KIcon::Small ),
@ -387,7 +387,7 @@ void KexiStartupFileDialogBase::setOperationMode( KFileDialog::OperationMode mod
// d->keepLocation = (mode == Saving); // d->keepLocation = (mode == Saving);
if (mode == KFileDialog::Saving) { if (mode == KFileDialog::Saving) {
setMode( KFile::File ); setMode( KFile::File );
setIcon( KGlobal::iconLoader()->loadIcon("filesave", KIcon::Desktop) ); setIcon( TDEGlobal::iconLoader()->loadIcon("filesave", KIcon::Desktop) );
} }
//(js) filterWidget->setEditable( !d->hasDefaultFilter || mode != Saving ); //(js) filterWidget->setEditable( !d->hasDefaultFilter || mode != Saving );
//(js) d->okButton->setGuiItem( (mode == Saving) ? KStdGuiItem::save() : KStdGuiItem::ok() ); //(js) d->okButton->setGuiItem( (mode == Saving) ? KStdGuiItem::save() : KStdGuiItem::ok() );

@ -62,13 +62,13 @@ tristate SQLite2ToSQLite3Migration::run()
//remember permissions of m_filePath //remember permissions of m_filePath
m_restoreStat = (0==stat(TQFile::encodeName(m_filePath), &m_st)); m_restoreStat = (0==stat(TQFile::encodeName(m_filePath), &m_st));
m_process = new KProcess(this, "process"); m_process = new TDEProcess(this, "process");
*m_process << ksqlite2to3_app << m_filePath; *m_process << ksqlite2to3_app << m_filePath;
m_process->setWorkingDirectory( fi.dir(true).absPath() ); m_process->setWorkingDirectory( fi.dir(true).absPath() );
connect( m_process, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), connect( m_process, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this, TQT_SLOT(receivedStderr(KProcess*,char*,int))); this, TQT_SLOT(receivedStderr(TDEProcess*,char*,int)));
connect( m_process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(processExited(KProcess*)) ); connect( m_process, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(processExited(TDEProcess*)) );
if (!m_process->start(KProcess::NotifyOnExit, KProcess::Stderr)) if (!m_process->start(TDEProcess::NotifyOnExit, TDEProcess::Stderr))
return false; return false;
m_dlg = new KProgressDialog(0, 0, TQString(), m_dlg = new KProgressDialog(0, 0, TQString(),
@ -91,12 +91,12 @@ tristate SQLite2ToSQLite3Migration::run()
extern void updateProgressBar(KProgressDialog *pd, char *buffer, int buflen); extern void updateProgressBar(KProgressDialog *pd, char *buffer, int buflen);
void SQLite2ToSQLite3Migration::receivedStderr(KProcess *, char *buffer, int buflen) void SQLite2ToSQLite3Migration::receivedStderr(TDEProcess *, char *buffer, int buflen)
{ {
updateProgressBar(m_dlg, buffer, buflen); updateProgressBar(m_dlg, buffer, buflen);
} }
void SQLite2ToSQLite3Migration::processExited(KProcess* process) void SQLite2ToSQLite3Migration::processExited(TDEProcess* process)
{ {
kdDebug() << "EXIT " << process->name() << endl; kdDebug() << "EXIT " << process->name() << endl;

@ -27,7 +27,7 @@
#include <kexiutils/tristate.h> #include <kexiutils/tristate.h>
class KProcess; class TDEProcess;
class KProgressDialog; class KProgressDialog;
class SQLite2ToSQLite3Migration : public TQObject class SQLite2ToSQLite3Migration : public TQObject
@ -41,13 +41,13 @@ class SQLite2ToSQLite3Migration : public TQObject
tristate run(); tristate run();
public slots: public slots:
void processExited(KProcess*); void processExited(TDEProcess*);
void receivedStderr(KProcess*,char*,int); void receivedStderr(TDEProcess*,char*,int);
void cancelClicked(); void cancelClicked();
protected: protected:
TQString m_filePath; TQString m_filePath;
KProcess *m_process; TDEProcess *m_process;
KProgressDialog* m_dlg; KProgressDialog* m_dlg;
struct stat m_st; struct stat m_st;

@ -110,7 +110,7 @@ ImportWizard::ImportWizard(TQWidget *parent, TQMap<TQString,TQString>* args)
} }
} }
m_sourceDBEncoding = TQString::fromLatin1(KGlobal::locale()->encoding()); //default m_sourceDBEncoding = TQString::fromLatin1(TDEGlobal::locale()->encoding()); //default
} }
//=========================================================== //===========================================================

@ -95,8 +95,8 @@ bool MigrateManagerInternal::lookupDrivers()
connect(tqApp,TQT_SIGNAL(aboutToQuit()),this,TQT_SLOT(slotAppQuits())); connect(tqApp,TQT_SIGNAL(aboutToQuit()),this,TQT_SLOT(slotAppQuits()));
} }
//TODO: for QT-only version check for TDEInstance wrapper //TODO: for QT-only version check for TDEInstance wrapper
// KexiDBWarn << "DriverManagerInternal::lookupDrivers(): cannot work without TDEInstance (KGlobal::instance()==0)!" << endl; // KexiDBWarn << "DriverManagerInternal::lookupDrivers(): cannot work without TDEInstance (TDEGlobal::instance()==0)!" << endl;
// setError("Driver Manager cannot work without TDEInstance (KGlobal::instance()==0)!"); // setError("Driver Manager cannot work without TDEInstance (TDEGlobal::instance()==0)!");
lookupDriversNeeded = false; lookupDriversNeeded = false;
clearError(); clearError();

@ -192,7 +192,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
setIcon(DesktopIcon(_IMPORT_ICON)); setIcon(DesktopIcon(_IMPORT_ICON));
setSizeGripEnabled( TRUE ); setSizeGripEnabled( TRUE );
// m_encoding = TQString::fromLatin1(KGlobal::locale()->encoding()); // m_encoding = TQString::fromLatin1(TDEGlobal::locale()->encoding());
// m_stripWhiteSpaceInTextValuesChecked = true; // m_stripWhiteSpaceInTextValuesChecked = true;
m_file = 0; m_file = 0;
m_inputStream = 0; m_inputStream = 0;
@ -308,7 +308,7 @@ if ( m_mode == Clipboard )
TQStringList mimetypes( csvMimeTypes() ); TQStringList mimetypes( csvMimeTypes() );
#ifdef TQ_WS_WIN #ifdef TQ_WS_WIN
//! @todo remove //! @todo remove
TQString recentDir = KGlobalSettings::documentPath(); TQString recentDir = TDEGlobalSettings::documentPath();
m_fname = TQFileDialog::getOpenFileName( m_fname = TQFileDialog::getOpenFileName(
KFileDialog::getStartURL(":CSVImportExport", recentDir).path(), KFileDialog::getStartURL(":CSVImportExport", recentDir).path(),
KexiUtils::fileDialogFilterStrings(mimetypes, false), KexiUtils::fileDialogFilterStrings(mimetypes, false),
@ -667,7 +667,7 @@ tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, i
m_file->at(0); //always seek at 0 because loadRows() is called many times m_file->at(0); //always seek at 0 because loadRows() is called many times
m_inputStream = new TQTextStream(m_file); m_inputStream = new TQTextStream(m_file);
if (m_options.defaultEncodingExplicitySet) { if (m_options.defaultEncodingExplicitySet) {
TQTextCodec *codec = KGlobal::charsets()->codecForName(m_options.encoding); TQTextCodec *codec = TDEGlobal::charsets()->codecForName(m_options.encoding);
if (codec) if (codec)
m_inputStream->setCodec(codec); //TQTextCodec::codecForName("CP1250")); m_inputStream->setCodec(codec); //TQTextCodec::codecForName("CP1250"));
} }

@ -37,7 +37,7 @@ KexiCSVImportOptions::KexiCSVImportOptions()
kapp->config()->setGroup("ImportExport"); kapp->config()->setGroup("ImportExport");
encoding = kapp->config()->readEntry("DefaultEncodingForImportingCSVFiles"); encoding = kapp->config()->readEntry("DefaultEncodingForImportingCSVFiles");
if (encoding.isEmpty()) { if (encoding.isEmpty()) {
encoding = TQString::fromLatin1(KGlobal::locale()->encoding()); encoding = TQString::fromLatin1(TDEGlobal::locale()->encoding());
defaultEncodingExplicitySet = false; defaultEncodingExplicitySet = false;
} }
else else

@ -52,7 +52,7 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont
KoMacro::Exception* exception = context->exception(); KoMacro::Exception* exception = context->exception();
iconlbl->setPixmap(KGlobal::instance()->iconLoader()->loadIcon("messagebox_critical", KIcon::Small, 32)); iconlbl->setPixmap(TDEGlobal::instance()->iconLoader()->loadIcon("messagebox_critical", KIcon::Small, 32));
errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").arg( context->macro()->name() ).arg( exception->errorMessage() )); errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").arg( context->macro()->name() ).arg( exception->errorMessage() ));
int i = 1; int i = 1;

@ -1372,7 +1372,7 @@ KexiQueryDesignerGuiEditor::parseExpressionString(const TQString& fullString, in
} }
else if (str[0]>='0' && str[0]<='9' || str[0]=='-' || str[0]=='+') { else if (str[0]>='0' && str[0]<='9' || str[0]=='-' || str[0]=='+') {
//number //number
TQString decimalSym = KGlobal::locale()->decimalSymbol(); TQString decimalSym = TDEGlobal::locale()->decimalSymbol();
bool ok; bool ok;
int pos = str.find('.'); int pos = str.find('.');
if (pos==-1) {//second chance: local decimal symbol if (pos==-1) {//second chance: local decimal symbol

@ -335,12 +335,12 @@ HistoryEntry::highlight(const TQColorGroup &cg)
if(!m_error.isEmpty()) if(!m_error.isEmpty())
// text += ("<br>"+i18n("Error: %1").arg(m_error)); // text += ("<br>"+i18n("Error: %1").arg(m_error));
// text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\" size=\"-1\">") + i18n("Error: %1").arg(m_error) + "</font>"; // text += TQString("<br><font face=\"") + TDEGlobalSettings::generalFont().family() + TQString("\" size=\"-1\">") + i18n("Error: %1").arg(m_error) + "</font>";
text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\">") + i18n("Error: %1").arg(m_error) + "</font>"; text += TQString("<br><font face=\"") + TDEGlobalSettings::generalFont().family() + TQString("\">") + i18n("Error: %1").arg(m_error) + "</font>";
kdDebug() << "HistoryEntry::highlight() text:" << text << endl; kdDebug() << "HistoryEntry::highlight() text:" << text << endl;
// m_formated = new TQSimpleRichText(text, TQFont("courier", 8)); // m_formated = new TQSimpleRichText(text, TQFont("courier", 8));
m_formated = new TQSimpleRichText(text, KGlobalSettings::fixedFont()); m_formated = new TQSimpleRichText(text, TDEGlobalSettings::fixedFont());
} }

@ -89,7 +89,7 @@ bool KexiScriptPart::execute(KexiPart::Item* item, TQObject* sender)
if(scriptaction) { if(scriptaction) {
const TQString dontAskAgainName = "askExecuteScript"; const TQString dontAskAgainName = "askExecuteScript";
KConfig* config = KGlobal::config(); KConfig* config = TDEGlobal::config();
TQString dontask = config->readEntry(dontAskAgainName).lower(); TQString dontask = config->readEntry(dontAskAgainName).lower();
bool exec = (dontask == "yes"); bool exec = (dontask == "yes");

@ -159,7 +159,7 @@ int main(int argc, char** argv)
if (gui) { if (gui) {
app = new TDEApplication(true, true); app = new TDEApplication(true, true);
instance = app; instance = app;
KGlobal::iconLoader()->addAppDir("kexi"); TDEGlobal::iconLoader()->addAppDir("kexi");
} }
else { else {
instance = new TDEInstance(prgname); instance = new TDEInstance(prgname);

@ -32,7 +32,7 @@
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
TDEApplication app(argc, argv, "tv_test"); TDEApplication app(argc, argv, "tv_test");
KGlobal::iconLoader()->addAppDir("kexi"); TDEGlobal::iconLoader()->addAppDir("kexi");
KexiTableView tv; KexiTableView tv;

@ -733,7 +733,7 @@ void KexiBrowser::updateItemName( KexiPart::Item& item, bool dirty )
void KexiBrowser::slotSettingsChanged(int) void KexiBrowser::slotSettingsChanged(int)
{ {
m_singleClick = KGlobalSettings::singleClick(); m_singleClick = TDEGlobalSettings::singleClick();
} }
void KexiBrowser::selectItem(KexiPart::Item& item) void KexiBrowser::selectItem(KexiPart::Item& item)

@ -31,21 +31,21 @@ KexiCharacterEncodingComboBox::KexiCharacterEncodingComboBox(
: KComboBox( parent, "KexiCharacterEncodingComboBox" ) : KComboBox( parent, "KexiCharacterEncodingComboBox" )
, m_defaultEncodingAdded(false) , m_defaultEncodingAdded(false)
{ {
TQString defaultEncoding(TQString::fromLatin1(KGlobal::locale()->encoding())); TQString defaultEncoding(TQString::fromLatin1(TDEGlobal::locale()->encoding()));
TQString defaultEncodingDescriptiveName; TQString defaultEncodingDescriptiveName;
TQString _selectedEncoding = selectedEncoding; TQString _selectedEncoding = selectedEncoding;
if (_selectedEncoding.isEmpty()) if (_selectedEncoding.isEmpty())
_selectedEncoding = TQString::fromLatin1(KGlobal::locale()->encoding()); _selectedEncoding = TQString::fromLatin1(TDEGlobal::locale()->encoding());
TQStringList descEncodings(KGlobal::charsets()->descriptiveEncodingNames()); TQStringList descEncodings(TDEGlobal::charsets()->descriptiveEncodingNames());
TQStringList::ConstIterator it = descEncodings.constBegin(); TQStringList::ConstIterator it = descEncodings.constBegin();
for (uint id = 0; it!=descEncodings.constEnd(); ++it) for (uint id = 0; it!=descEncodings.constEnd(); ++it)
{ {
bool found = false; bool found = false;
TQString name( KGlobal::charsets()->encodingForName( *it ) ); TQString name( TDEGlobal::charsets()->encodingForName( *it ) );
TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(name, found); TQTextCodec *codecForEnc = TDEGlobal::charsets()->codecForName(name, found);
if (found) { if (found) {
insertItem(*it); insertItem(*it);
if (codecForEnc->name() == defaultEncoding || name == defaultEncoding) { if (codecForEnc->name() == defaultEncoding || name == defaultEncoding) {
@ -84,10 +84,10 @@ KexiCharacterEncodingComboBox::~KexiCharacterEncodingComboBox()
TQString KexiCharacterEncodingComboBox::selectedEncoding() const TQString KexiCharacterEncodingComboBox::selectedEncoding() const
{ {
if (defaultEncodingSelected()) { if (defaultEncodingSelected()) {
return TQString::fromLatin1(KGlobal::locale()->encoding()); return TQString::fromLatin1(TDEGlobal::locale()->encoding());
} }
else { else {
return KGlobal::charsets()->encodingForName( currentText() ); return TDEGlobal::charsets()->encodingForName( currentText() );
} }
} }

@ -74,7 +74,7 @@ KexiDataSourceComboBox::KexiDataSourceComboBox(TQWidget *parent, const char *nam
, d(new Private()) , d(new Private())
{ {
setInsertionPolicy(NoInsertion); setInsertionPolicy(NoInsertion);
setCompletionMode(KGlobalSettings::CompletionPopupAuto); setCompletionMode(TDEGlobalSettings::CompletionPopupAuto);
setSizeLimit( 16 ); setSizeLimit( 16 );
connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int))); connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
connect(this, TQT_SIGNAL(returnPressed(const TQString &)), this, TQT_SLOT(slotReturnPressed(const TQString &))); connect(this, TQT_SIGNAL(returnPressed(const TQString &)), this, TQT_SLOT(slotReturnPressed(const TQString &)));

@ -58,7 +58,7 @@ void
KexiDSWelcome::setUseWizard(bool use) KexiDSWelcome::setUseWizard(bool use)
{ {
#if KDE_IS_VERSION(3,1,9) && !defined(TQ_WS_WIN) #if KDE_IS_VERSION(3,1,9) && !defined(TQ_WS_WIN)
bool useIcons = KGlobalSettings::showIconsOnPushButtons(); bool useIcons = TDEGlobalSettings::showIconsOnPushButtons();
#else #else
bool useIcons = true; bool useIcons = true;
#endif #endif

@ -75,7 +75,7 @@ KexiFieldComboBox::KexiFieldComboBox(TQWidget *parent, const char *name)
, d(new Private()) , d(new Private())
{ {
setInsertionPolicy(NoInsertion); setInsertionPolicy(NoInsertion);
setCompletionMode(KGlobalSettings::CompletionPopupAuto); setCompletionMode(TDEGlobalSettings::CompletionPopupAuto);
setSizeLimit( 16 ); setSizeLimit( 16 );
connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int))); connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
connect(this, TQT_SIGNAL(returnPressed(const TQString &)), this, TQT_SLOT(slotReturnPressed(const TQString &))); connect(this, TQT_SIGNAL(returnPressed(const TQString &)), this, TQT_SLOT(slotReturnPressed(const TQString &)));

@ -28,7 +28,7 @@ KexiPrjTypeSelector::KexiPrjTypeSelector( TQWidget* parent )
{ {
TQString none; TQString none;
icon_file->setPixmap( icon_file->setPixmap(
KGlobal::iconLoader()->loadIcon( KMimeType::mimeType( TDEGlobal::iconLoader()->loadIcon( KMimeType::mimeType(
KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0), KIcon::Desktop, 48 KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0), KIcon::Desktop, 48
) )
); );

@ -72,7 +72,7 @@ void KexiSmallToolButton::init()
{ {
setPaletteBackgroundColor(palette().active().background()); setPaletteBackgroundColor(palette().active().background());
setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
TQFont f(KGlobalSettings::toolBarFont()); TQFont f(TDEGlobalSettings::toolBarFont());
f.setPixelSize(Kexi::smallFont().pixelSize()); f.setPixelSize(Kexi::smallFont().pixelSize());
setFont(f); setFont(f);
setAutoRaise(true); setAutoRaise(true);

@ -430,7 +430,7 @@ KexiRelationView::keyPressEvent(TQKeyEvent *ev)
{ {
kdDebug() << "KexiRelationView::keyPressEvent()" << endl; kdDebug() << "KexiRelationView::keyPressEvent()" << endl;
if (ev->key()==KGlobalSettings::contextMenuKey()) { if (ev->key()==TDEGlobalSettings::contextMenuKey()) {
if (m_selectedConnection) { if (m_selectedConnection) {
emit connectionContextMenuRequest( emit connectionContextMenuRequest(
mapToGlobal(m_selectedConnection->connectionRect().center()) ); mapToGlobal(m_selectedConnection->connectionRect().center()) );

@ -135,8 +135,8 @@ void KexiRelationViewTableContainer::setFocus()
m_tableHeader->setFocus(); m_tableHeader->setFocus();
m_tableView->setFocus(); m_tableView->setFocus();
/* TQPalette p = tqApp->palette(); /* TQPalette p = tqApp->palette();
p.setColor( TQPalette::Active, TQColorGroup::Highlight, KGlobalSettings::highlightColor() ); p.setColor( TQPalette::Active, TQColorGroup::Highlight, TDEGlobalSettings::highlightColor() );
p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, KGlobalSettings::highlightedTextColor() ); p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, TDEGlobalSettings::highlightedTextColor() );
m_tableView->setPalette(p);*/ m_tableView->setPalette(p);*/
raise(); raise();
@ -156,8 +156,8 @@ void KexiRelationViewTableContainer::unsetFocus()
// m_tableView->unsetPalette(); // m_tableView->unsetPalette();
/* TQPalette p = m_tableView->palette(); /* TQPalette p = m_tableView->palette();
// p.setColor( TQPalette::Active, TQColorGroup::Highlight, KGlobalSettings::highlightColor() ); // p.setColor( TQPalette::Active, TQColorGroup::Highlight, TDEGlobalSettings::highlightColor() );
// p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, KGlobalSettings::highlightedTextColor() ); // p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, TDEGlobalSettings::highlightedTextColor() );
p.setColor( TQPalette::Active, TQColorGroup::Highlight, p.color(TQPalette::Active, TQColorGroup::Background ) ); p.setColor( TQPalette::Active, TQColorGroup::Highlight, p.color(TQPalette::Active, TQColorGroup::Background ) );
// p.setColor( TQPalette::Active, TQColorGroup::Highlight, gray ); // p.setColor( TQPalette::Active, TQColorGroup::Highlight, gray );
p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, p.color(TQPalette::Active, TQColorGroup::Foreground ) ); p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, p.color(TQPalette::Active, TQColorGroup::Foreground ) );
@ -180,10 +180,10 @@ KexiRelationViewTableContainerHeader::KexiRelationViewTableContainerHeader(
:TQLabel(text,parent),m_dragging(false) :TQLabel(text,parent),m_dragging(false)
{ {
setMargin(1); setMargin(1);
m_activeBG = KGlobalSettings::activeTitleColor(); m_activeBG = TDEGlobalSettings::activeTitleColor();
m_activeFG = KGlobalSettings::activeTextColor(); m_activeFG = TDEGlobalSettings::activeTextColor();
m_inactiveBG = KGlobalSettings::inactiveTitleColor(); m_inactiveBG = TDEGlobalSettings::inactiveTitleColor();
m_inactiveFG = KGlobalSettings::inactiveTextColor(); m_inactiveFG = TDEGlobalSettings::inactiveTextColor();
installEventFilter(this); installEventFilter(this);
} }

@ -571,7 +571,7 @@ void KexiKIconTableEdit::setupContents( TQPainter *p, bool /*focused*/, const TQ
TQPixmap *pix = 0; TQPixmap *pix = 0;
if (!key.isEmpty() && !(pix = d->pixmapCache[ key ])) { if (!key.isEmpty() && !(pix = d->pixmapCache[ key ])) {
//cache pixmap //cache pixmap
TQPixmap pm = KGlobal::iconLoader()->loadIcon( key, KIcon::Small, TQPixmap pm = TDEGlobal::iconLoader()->loadIcon( key, KIcon::Small,
0, KIcon::DefaultState, 0L, true/*canReturnNull*/ ); 0, KIcon::DefaultState, 0L, true/*canReturnNull*/ );
if (!pm.isNull()) { if (!pm.isNull()) {
pix = new TQPixmap(pm); pix = new TQPixmap(pm);

@ -30,7 +30,7 @@
#include "kexicelleditorfactory.h" #include "kexicelleditorfactory.h"
class KTempFile; class KTempFile;
class KProcess; class TDEProcess;
class TQTextEdit; class TQTextEdit;
class KexiBlobTableEdit : public KexiTableEdit class KexiBlobTableEdit : public KexiTableEdit
@ -113,7 +113,7 @@ class KexiBlobTableEdit : public KexiTableEdit
class Private; class Private;
Private *d; Private *d;
//todo KTempFile* m_tempFile; //todo KTempFile* m_tempFile;
//todo KProcess* m_proc; //todo TDEProcess* m_proc;
//todo TQTextEdit *m_content; //todo TQTextEdit *m_content;
}; };

@ -83,7 +83,7 @@ void KexiInputTableEdit::init()
m_textFormatter.setField( field() ); m_textFormatter.setField( field() );
//init settings //init settings
m_decsym = KGlobal::locale()->decimalSymbol(); m_decsym = TDEGlobal::locale()->decimalSymbol();
if (m_decsym.isEmpty()) if (m_decsym.isEmpty())
m_decsym=".";//default m_decsym=".";//default

@ -60,7 +60,7 @@
#include <kexidb/cursor.h> #include <kexidb/cursor.h>
KexiTableView::Appearance::Appearance(TQWidget *widget) KexiTableView::Appearance::Appearance(TQWidget *widget)
: alternateBackgroundColor( KGlobalSettings::alternateBackgroundColor() ) : alternateBackgroundColor( TDEGlobalSettings::alternateBackgroundColor() )
{ {
//set defaults //set defaults
if (tqApp) { if (tqApp) {
@ -207,7 +207,7 @@ KexiTableView::KexiTableView(KexiTableViewData* data, TQWidget* parent, const ch
// d->baseColor = colorGroup().base(); // d->baseColor = colorGroup().base();
// d->textColor = colorGroup().text(); // d->textColor = colorGroup().text();
// d->altColor = KGlobalSettings::alternateBackgroundColor(); // d->altColor = TDEGlobalSettings::alternateBackgroundColor();
// d->grayColor = TQColor(200,200,200); // d->grayColor = TQColor(200,200,200);
d->diagonalGrayPattern = TQBrush(d->appearance.borderColor, TQt::BDiagPattern); d->diagonalGrayPattern = TQBrush(d->appearance.borderColor, TQt::BDiagPattern);
@ -2594,7 +2594,7 @@ KexiTableItem *KexiTableView::highlightedItem() const
void KexiTableView::slotSettingsChanged(int category) void KexiTableView::slotSettingsChanged(int category)
{ {
if (category==TDEApplication::SETTINGS_SHORTCUTS) { if (category==TDEApplication::SETTINGS_SHORTCUTS) {
d->contextMenuKey = KGlobalSettings::contextMenuKey(); d->contextMenuKey = TDEGlobalSettings::contextMenuKey();
} }
} }

@ -94,7 +94,7 @@ public:
current active palette */ current active palette */
TQColor emptyAreaColor; TQColor emptyAreaColor;
/*! alternate background color, default is KGlobalSettings::alternateBackgroundColor() */ /*! alternate background color, default is TDEGlobalSettings::alternateBackgroundColor() */
TQColor alternateBackgroundColor; TQColor alternateBackgroundColor;
/*! true if background altering should be enabled, true by default */ /*! true if background altering should be enabled, true by default */

@ -168,7 +168,7 @@ TQVariant KexiTextFormatter::textToValue(const TQString& text) const
case KexiDB::Field::Double: { case KexiDB::Field::Double: {
// replace custom decimal symbol with '.' as required by to{Float|Double}() // replace custom decimal symbol with '.' as required by to{Float|Double}()
TQString fixedText( text ); TQString fixedText( text );
fixedText.replace(KGlobal::locale()->decimalSymbol(), "."); fixedText.replace(TDEGlobal::locale()->decimalSymbol(), ".");
if (t == KexiDB::Field::Double) if (t == KexiDB::Field::Double)
return fixedText.toDouble(); return fixedText.toDouble();
return fixedText.toFloat(); return fixedText.toFloat();

@ -32,7 +32,7 @@ KexiDateFormatter::KexiDateFormatter()
{ {
// use "short date" format system settings // use "short date" format system settings
//! @todo allow to override the format using column property and/or global app settings //! @todo allow to override the format using column property and/or global app settings
TQString df( KGlobal::locale()->dateFormatShort() ); TQString df( TDEGlobal::locale()->dateFormatShort() );
if (df.length()>2) if (df.length()>2)
m_separator = df.mid(2,1); m_separator = df.mid(2,1);
else else
@ -171,7 +171,7 @@ KexiTimeFormatter::KexiTimeFormatter()
: m_hmsRegExp( new TQRegExp("(\\d*):(\\d*):(\\d*).*( am| pm){,1}", false/*!CS*/) ) : m_hmsRegExp( new TQRegExp("(\\d*):(\\d*):(\\d*).*( am| pm){,1}", false/*!CS*/) )
, m_hmRegExp( new TQRegExp("(\\d*):(\\d*).*( am| pm){,1}", false/*!CS*/) ) , m_hmRegExp( new TQRegExp("(\\d*):(\\d*).*( am| pm){,1}", false/*!CS*/) )
{ {
TQString tf( KGlobal::locale()->timeFormat() ); TQString tf( TDEGlobal::locale()->timeFormat() );
//m_hourpos, m_minpos, m_secpos; are result of tf.find() //m_hourpos, m_minpos, m_secpos; are result of tf.find()
TQString hourVariable, minVariable, secVariable; TQString hourVariable, minVariable, secVariable;
@ -309,7 +309,7 @@ TQString KexiTimeFormatter::timeToString( const TQTime& time ) const
if (m_secpos>=0) if (m_secpos>=0)
s.replace( "%S", TQString::fromLatin1(time.second()<10 ? "0" : "") + TQString::number(time.second()) ); s.replace( "%S", TQString::fromLatin1(time.second()<10 ? "0" : "") + TQString::number(time.second()) );
if (m_ampmpos>=0) if (m_ampmpos>=0)
s.replace( "%p", KGlobal::locale()->translate( time.hour()>=12 ? "pm" : "am") ); s.replace( "%p", TDEGlobal::locale()->translate( time.hour()>=12 ? "pm" : "am") );
return s; return s;
} }

@ -28,7 +28,7 @@ TDEAboutData* KFormulaFactory::aboutData()
KFormulaFactory::KFormulaFactory( TQObject* parent, const char* name ) KFormulaFactory::KFormulaFactory( TQObject* parent, const char* name )
: KoFactory( parent, name ) : KoFactory( parent, name )
{ {
// Create our instance, so that it becomes KGlobal::instance if the // Create our instance, so that it becomes TDEGlobal::instance if the
// main app is KFormula. // main app is KFormula.
(void)global(); (void)global();
} }

@ -14,7 +14,7 @@
<group name="DefaultPageLayout"> <group name="DefaultPageLayout">
<entry name="Format" type="String"> <entry name="Format" type="String">
<label>The default page layout.</label> <label>The default page layout.</label>
<default code="true">Kivio::pageSizeString(KGlobal::locale()->pageSize())</default> <default code="true">Kivio::pageSizeString(TDEGlobal::locale()->pageSize())</default>
</entry> </entry>
<entry name="Orientation" type="String"> <entry name="Orientation" type="String">
<label>The orientation of the page.</label> <label>The orientation of the page.</label>

@ -552,7 +552,7 @@ bool KivioDoc::loadXML( TQIODevice *, const TQDomDocument& doc )
bool KivioDoc::loadStencilSpawnerSet(const TQString &id, bool hidden) bool KivioDoc::loadStencilSpawnerSet(const TQString &id, bool hidden)
{ {
KStandardDirs *dirs = KGlobal::dirs(); KStandardDirs *dirs = TDEGlobal::dirs();
TQStringList dirList = dirs->findDirs("data", "kivio/stencils"); TQStringList dirList = dirs->findDirs("data", "kivio/stencils");
TQString rootDir; TQString rootDir;

@ -163,8 +163,8 @@ KivioView::KivioView( TQWidget *_parent, const char *_name, KivioDoc* doc )
TQString unit = KoUnit::unitName(m_pDoc->unit()); TQString unit = KoUnit::unitName(m_pDoc->unit());
KoPoint xy(0, 0); KoPoint xy(0, 0);
TQString text = i18n("%1 x coord, %2 y coord, %3 and %4 the unit", TQString text = i18n("%1 x coord, %2 y coord, %3 and %4 the unit",
"X: %1 %3 Y: %2 %4").arg(KGlobal::_locale->formatNumber(xy.x(), 2)) "X: %1 %3 Y: %2 %4").arg(TDEGlobal::_locale->formatNumber(xy.x(), 2))
.arg(KGlobal::_locale->formatNumber(xy.y(), 2)).arg(unit).arg(unit); .arg(TDEGlobal::_locale->formatNumber(xy.y(), 2)).arg(unit).arg(unit);
m_coordSLbl = new KStatusBarLabel(text, MOUSEPOS_TEXT, sb); m_coordSLbl = new KStatusBarLabel(text, MOUSEPOS_TEXT, sb);
addStatusBarItem(m_coordSLbl, 0, true); addStatusBarItem(m_coordSLbl, 0, true);
} }
@ -1842,8 +1842,8 @@ void KivioView::setMousePos( int mx, int my )
KoPoint xy = m_pCanvas->mapFromScreen(TQPoint(mx, my)); KoPoint xy = m_pCanvas->mapFromScreen(TQPoint(mx, my));
xy.setX(KoUnit::toUserValue(xy.x(), m_pDoc->unit())); xy.setX(KoUnit::toUserValue(xy.x(), m_pDoc->unit()));
xy.setY(KoUnit::toUserValue(xy.y(), m_pDoc->unit())); xy.setY(KoUnit::toUserValue(xy.y(), m_pDoc->unit()));
TQString text = i18n("X: %1 %3 Y: %2 %4").arg(KGlobal::_locale->formatNumber(xy.x(), 2)) TQString text = i18n("X: %1 %3 Y: %2 %4").arg(TDEGlobal::_locale->formatNumber(xy.x(), 2))
.arg(KGlobal::_locale->formatNumber(xy.y(), 2)).arg(unit).arg(unit); .arg(TDEGlobal::_locale->formatNumber(xy.y(), 2)).arg(unit).arg(unit);
m_coordSLbl->setText(text); m_coordSLbl->setText(text);
} }
} }

@ -121,7 +121,7 @@ int KivioArrowHeadAction::plug( TQWidget* widget, int index)
if ( m_parentCollection ) if ( m_parentCollection )
instance = m_parentCollection->instance(); instance = m_parentCollection->instance();
else else
instance = KGlobal::instance(); instance = TDEGlobal::instance();
bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
TQT_SLOT( slotActivated() ), isEnabled(), plainText(), TQT_SLOT( slotActivated() ), isEnabled(), plainText(),

@ -85,7 +85,7 @@ KoPageLayout Kivio::loadPageLayout(const TQDomElement& e)
layout.ptRight = XmlReadFloat(e, "marginRight", 0.0); layout.ptRight = XmlReadFloat(e, "marginRight", 0.0);
layout.ptTop = XmlReadFloat(e, "marginTop", 0.0); layout.ptTop = XmlReadFloat(e, "marginTop", 0.0);
layout.ptBottom = XmlReadFloat(e, "marginBottom", 0.0); layout.ptBottom = XmlReadFloat(e, "marginBottom", 0.0);
layout.format = KoPageFormat::formatFromString(XmlReadString(e, "format", pageSizeString(KGlobal::locale()->pageSize()))); layout.format = KoPageFormat::formatFromString(XmlReadString(e, "format", pageSizeString(TDEGlobal::locale()->pageSize())));
layout.orientation = Kivio::orientationFromString(XmlReadString(e, "orientation", "Portrait")); layout.orientation = Kivio::orientationFromString(XmlReadString(e, "orientation", "Portrait"));
} }
@ -1285,7 +1285,7 @@ TQString Kivio::systemDefaultUnit()
{ {
TQString defMS = "cm"; TQString defMS = "cm";
if(KGlobal::locale()->measureSystem() == KLocale::Imperial) { if(TDEGlobal::locale()->measureSystem() == KLocale::Imperial) {
defMS = "in"; defMS = "in";
} }

@ -197,7 +197,7 @@ class KIVIO_EXPORT KivioStencil
virtual TQColor textColor() { return TQColor(0,0,0); } virtual TQColor textColor() { return TQColor(0,0,0); }
virtual void setTextColor( TQColor ) {;} virtual void setTextColor( TQColor ) {;}
virtual TQFont textFont() { return KGlobalSettings::generalFont(); } virtual TQFont textFont() { return TDEGlobalSettings::generalFont(); }
virtual void setTextFont( const TQFont & ) {;} virtual void setTextFont( const TQFont & ) {;}
virtual int hTextAlign() { return -1; } virtual int hTextAlign() { return -1; }
@ -272,7 +272,7 @@ class KIVIO_EXPORT KivioStencil
virtual TQColor textColor(const TQString& /*textBoxName*/) { return TQColor(); } virtual TQColor textColor(const TQString& /*textBoxName*/) { return TQColor(); }
virtual void setTextColor(const TQString& /*textBoxName*/, const TQColor& /*color*/) {} virtual void setTextColor(const TQString& /*textBoxName*/, const TQColor& /*color*/) {}
virtual TQFont textFont(const TQString& /*textBoxName*/) { return KGlobalSettings::generalFont(); } virtual TQFont textFont(const TQString& /*textBoxName*/) { return TDEGlobalSettings::generalFont(); }
virtual void setTextFont(const TQString& /*textBoxName*/, const TQFont& /*font*/) {} virtual void setTextFont(const TQString& /*textBoxName*/, const TQFont& /*font*/) {}
virtual int hTextAlign(const TQString& /*textBoxName*/) { return -1; } virtual int hTextAlign(const TQString& /*textBoxName*/) { return -1; }

@ -72,7 +72,7 @@ bool KivioStencilSpawnerInfo::loadXML( const TQDomElement &e )
} }
else if((nodeName.compare("Title")==0) && nodeElement.hasAttribute("lang")) else if((nodeName.compare("Title")==0) && nodeElement.hasAttribute("lang"))
{ {
if(nodeElement.attribute("lang") == KGlobal::locale()->language()) { if(nodeElement.attribute("lang") == TDEGlobal::locale()->language()) {
m_title = nodeElement.attribute("data"); m_title = nodeElement.attribute("data");
} }
} }
@ -86,7 +86,7 @@ bool KivioStencilSpawnerInfo::loadXML( const TQDomElement &e )
} }
else if((nodeName.compare("Description")==0) && nodeElement.hasAttribute("lang")) else if((nodeName.compare("Description")==0) && nodeElement.hasAttribute("lang"))
{ {
if(nodeElement.attribute("lang") == KGlobal::locale()->language()) { if(nodeElement.attribute("lang") == TDEGlobal::locale()->language()) {
m_desc = nodeElement.attribute("data"); m_desc = nodeElement.attribute("data");
} }
} }

@ -182,7 +182,7 @@ TQString KivioStencilSpawnerSet::readTitle( const TQString &dir )
if( nodeName.compare("Title")==0 && nodeElement.hasAttribute("lang")) if( nodeName.compare("Title")==0 && nodeElement.hasAttribute("lang"))
{ {
if(nodeElement.attribute("lang") == KGlobal::locale()->language()) { if(nodeElement.attribute("lang") == TDEGlobal::locale()->language()) {
title = XmlReadString( nodeElement, "data", dir ); title = XmlReadString( nodeElement, "data", dir );
} }
} }
@ -269,7 +269,7 @@ TQString KivioStencilSpawnerSet::readDescription(const TQString& dir)
if( nodeName.compare("Description")==0 && nodeElement.hasAttribute("lang")) if( nodeName.compare("Description")==0 && nodeElement.hasAttribute("lang"))
{ {
if(nodeElement.attribute("lang") == KGlobal::locale()->language()) { if(nodeElement.attribute("lang") == TDEGlobal::locale()->language()) {
description = nodeElement.text(); description = nodeElement.text();
} }
} }

@ -134,7 +134,7 @@ int KivioStencilSetAction::plug( TQWidget* widget, int index)
if ( m_parentCollection ) if ( m_parentCollection )
instance = m_parentCollection->instance(); instance = m_parentCollection->instance();
else else
instance = KGlobal::instance(); instance = TDEGlobal::instance();
bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,
TQT_SLOT( slotActivated() ), isEnabled(), plainText(), TQT_SLOT( slotActivated() ), isEnabled(), plainText(),
@ -184,7 +184,7 @@ void KivioStencilSetAction::updateMenu()
m_collectionIdList.clear(); m_collectionIdList.clear();
clearCollectionMenuList(); clearCollectionMenuList();
KStandardDirs *dirs = KGlobal::dirs(); KStandardDirs *dirs = TDEGlobal::dirs();
TQStringList dirList = dirs->findDirs("data", "kivio/stencils"); TQStringList dirList = dirs->findDirs("data", "kivio/stencils");
dirList.sort(); dirList.sort();

@ -72,7 +72,7 @@ namespace Kivio {
void AddStencilSetPanel::updateList() void AddStencilSetPanel::updateList()
{ {
KStandardDirs *dirs = KGlobal::dirs(); KStandardDirs *dirs = TDEGlobal::dirs();
TQStringList dirList = dirs->findDirs("data", "kivio/stencils"); TQStringList dirList = dirs->findDirs("data", "kivio/stencils");
dirList.sort(); dirList.sort();
m_stencilSetLView->clear(); m_stencilSetLView->clear();

@ -53,7 +53,7 @@
// { // {
// setPixmap(0, BarIcon(m_data->orientation() == Qt::Vertical ? // setPixmap(0, BarIcon(m_data->orientation() == Qt::Vertical ?
// "guides_vertical":"guides_horizontal")); // "guides_vertical":"guides_horizontal"));
// TQString s = KGlobal::_locale->formatNumber(KoUnit::toUserValue(m_data->position(), u), 2); // TQString s = TDEGlobal::_locale->formatNumber(KoUnit::toUserValue(m_data->position(), u), 2);
// s += " " + KoUnit::unitName(u); // s += " " + KoUnit::unitName(u);
// setText(1, s); // setText(1, s);
// } // }
@ -65,7 +65,7 @@
// //
// void GuidesListViewItem::setUnit(KoUnit::Unit u) // void GuidesListViewItem::setUnit(KoUnit::Unit u)
// { // {
// TQString s = KGlobal::_locale->formatNumber(KoUnit::toUserValue(m_data->position(), u), 2); // TQString s = TDEGlobal::_locale->formatNumber(KoUnit::toUserValue(m_data->position(), u), 2);
// s += " " + KoUnit::unitName(u); // s += " " + KoUnit::unitName(u);
// setText(1, s); // setText(1, s);
// } // }
@ -73,7 +73,7 @@
// void GuidesListViewItem::setPosition(double p, KoUnit::Unit u) // void GuidesListViewItem::setPosition(double p, KoUnit::Unit u)
// { // {
// m_data->setPosition(KoUnit::fromUserValue(p, u)); // m_data->setPosition(KoUnit::fromUserValue(p, u));
// TQString s = KGlobal::_locale->formatNumber(p, 2); // TQString s = TDEGlobal::_locale->formatNumber(p, 2);
// s += " " + KoUnit::unitName(u); // s += " " + KoUnit::unitName(u);
// setText(1, s); // setText(1, s);
// } // }

@ -69,7 +69,7 @@ void EntryItem::reloadPixmap()
{ {
int size = (int)navigator()->viewMode(); int size = (int)navigator()->viewMode();
if ( size != 0 ) if ( size != 0 )
mPixmap = KGlobal::iconLoader()->loadIcon( mPixmapName, KIcon::Desktop, size ); mPixmap = TDEGlobal::iconLoader()->loadIcon( mPixmapName, KIcon::Desktop, size );
else else
mPixmap = TQPixmap(); mPixmap = TQPixmap();
} }

@ -58,7 +58,7 @@
#include <kiconloader.h> #include <kiconloader.h>
KoShellWindow::KoShellWindow() KoShellWindow::KoShellWindow()
: KoMainWindow( KGlobal::instance() ) : KoMainWindow( TDEGlobal::instance() )
{ {
m_activePage = m_lstPages.end(); m_activePage = m_lstPages.end();
@ -345,7 +345,7 @@ void KoShellWindow::setRootDocument( KoDocument * doc )
v->setGeometry( 0, 0, m_pFrame->width(), m_pFrame->height() ); v->setGeometry( 0, 0, m_pFrame->width(), m_pFrame->height() );
v->setPartManager( partManager() ); v->setPartManager( partManager() );
m_pFrame->addTab( v, KGlobal::iconLoader()->loadIcon( m_documentEntry.service()->icon(), KIcon::Small ), i18n("Untitled") ); m_pFrame->addTab( v, TDEGlobal::iconLoader()->loadIcon( m_documentEntry.service()->icon(), KIcon::Small ), i18n("Untitled") );
// Create a new page for this doc // Create a new page for this doc
Page page; Page page;

@ -97,7 +97,7 @@ void KoUnavailPart::paintContent( TQPainter& painter, const TQRect& rect, bool /
for( int y = left; y < right; ++y ) for( int y = left; y < right; ++y )
painter.drawLine( left * 20, y * 20, right * 20, y * 20 ); painter.drawLine( left * 20, y * 20, right * 20, y * 20 );
TQFont defaultFont = KGlobalSettings::generalFont(); TQFont defaultFont = TDEGlobalSettings::generalFont();
defaultFont.setPointSize( 16 ); // ### defaultFont.setPointSize( 16 ); // ###
painter.setFont( defaultFont ); painter.setFont( defaultFont );
//painter.drawText( 20, 20, m_reason ); //painter.drawText( 20, 20, m_reason );

@ -90,7 +90,7 @@ AccountsView::AccountItem::AccountItem(TQString text, Account *a, TQListViewItem
void AccountsView::AccountItem::add(int col, const TQDate &date, const EffortCost &ec) { void AccountsView::AccountItem::add(int col, const TQDate &date, const EffortCost &ec) {
EffortCost &cm = costMap.add(date, ec); EffortCost &cm = costMap.add(date, ec);
if (m_slaveItem) if (m_slaveItem)
m_slaveItem->setText(col, KGlobal::locale()->formatMoney(cm.cost(), "", 0)); m_slaveItem->setText(col, TDEGlobal::locale()->formatMoney(cm.cost(), "", 0));
} }
AccountsView::AccountsView(Project &project, View *view, TQWidget *parent) AccountsView::AccountsView(Project &project, View *view, TQWidget *parent)
@ -209,7 +209,7 @@ void AccountsView::slotUpdate() {
//kdDebug()<<k_funcinfo<<endl; //kdDebug()<<k_funcinfo<<endl;
TQApplication::setOverrideCursor(TQt::waitCursor); TQApplication::setOverrideCursor(TQt::waitCursor);
createPeriods(); createPeriods();
KLocale *locale = KGlobal::locale(); KLocale *locale = TDEGlobal::locale();
const KCalendarSystem *cal = locale->calendar(); const KCalendarSystem *cal = locale->calendar();
TQString t; TQString t;

@ -208,9 +208,9 @@ void
CalendarPanel::dateChangedSlot(TQDate date) CalendarPanel::dateChangedSlot(TQDate date)
{ {
//kdDebug() << "CalendarPanel::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl; //kdDebug() << "CalendarPanel::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl;
line->setText(KGlobal::locale()->formatDate(date, true)); line->setText(TDEGlobal::locale()->formatDate(date, true));
d->selectWeek->setText(i18n("Week %1").arg(weekOfYear(date))); d->selectWeek->setText(i18n("Week %1").arg(weekOfYear(date)));
selectMonth->setText(KGlobal::locale()->calendar()->monthName(date.month(), false)); selectMonth->setText(TDEGlobal::locale()->calendar()->monthName(date.month(), false));
selectYear->setText(date.toString("yyyy")); selectYear->setText(date.toString("yyyy"));
emit(dateChanged(date)); emit(dateChanged(date));
} }
@ -243,10 +243,10 @@ CalendarPanel::setDate(const TQDate& date)
// ----- // -----
table->setDate(date); table->setDate(date);
d->selectWeek->setText(i18n("Week %1").arg(weekOfYear(date))); d->selectWeek->setText(i18n("Week %1").arg(weekOfYear(date)));
selectMonth->setText(KGlobal::locale()->calendar()->monthName(date.month(), false)); selectMonth->setText(TDEGlobal::locale()->calendar()->monthName(date.month(), false));
temp.setNum(date.year()); temp.setNum(date.year());
selectYear->setText(temp); selectYear->setText(temp);
line->setText(KGlobal::locale()->formatDate(date, true)); line->setText(TDEGlobal::locale()->formatDate(date, true));
return true; return true;
} else { } else {
kdDebug() << "CalendarPanel::setDate: refusing to set invalid date." << endl; kdDebug() << "CalendarPanel::setDate: refusing to set invalid date." << endl;
@ -472,7 +472,7 @@ CalendarPanel::setFontSize(int s)
TQFontMetrics metrics(selectMonth->fontMetrics()); TQFontMetrics metrics(selectMonth->fontMetrics());
for(int i=1; i <= 12; ++i) for(int i=1; i <= 12; ++i)
{ // maxMonthRect is used by sizeHint() { // maxMonthRect is used by sizeHint()
r=metrics.boundingRect(KGlobal::locale()->calendar()->monthName(i, false)); r=metrics.boundingRect(TDEGlobal::locale()->calendar()->monthName(i, false));
maxMonthRect.setWidth(TQMAX(r.width(), maxMonthRect.width())); maxMonthRect.setWidth(TQMAX(r.width(), maxMonthRect.width()));
maxMonthRect.setHeight(TQMAX(r.height(), maxMonthRect.height())); maxMonthRect.setHeight(TQMAX(r.height(), maxMonthRect.height()));
} }

@ -40,7 +40,7 @@ namespace KPlato
// little helper stolen from kmail/kword // little helper stolen from kmail/kword
static inline TQPixmap loadIcon( const char * name ) { static inline TQPixmap loadIcon( const char * name ) {
return KGlobal::instance()->iconLoader() return TDEGlobal::instance()->iconLoader()
->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); ->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium );
} }

@ -57,7 +57,7 @@ DateValidator::validate(TQString& text, int&) const
TQValidator::State TQValidator::State
DateValidator::date(const TQString& text, TQDate& d) const DateValidator::date(const TQString& text, TQDate& d) const
{ {
TQDate tmp = KGlobal::locale()->readDate(text); TQDate tmp = TDEGlobal::locale()->readDate(text);
if (!tmp.isNull()) if (!tmp.isNull())
{ {
d = tmp; d = tmp;
@ -96,7 +96,7 @@ DateTable::DateTable(TQWidget *parent, TQDate date_, const char* name, WFlags f)
setHScrollBarMode(AlwaysOff); setHScrollBarMode(AlwaysOff);
setVScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff);
viewport()->setEraseColor(KGlobalSettings::baseColor()); viewport()->setEraseColor(TDEGlobalSettings::baseColor());
setDate(date_); // this initializes firstday, numdays, numDaysPrevMonth setDate(date_); // this initializes firstday, numdays, numDaysPrevMonth
colorBackgroundHoliday = TQColor(0, 245, 255, TQColor::Hsv); colorBackgroundHoliday = TQColor(0, 245, 255, TQColor::Hsv);
@ -106,8 +106,8 @@ DateTable::DateTable(TQWidget *parent, TQDate date_, const char* name, WFlags f)
colorTextHoliday = black; colorTextHoliday = black;
colorTextWorkday = black; colorTextWorkday = black;
colorLine = black; colorLine = black;
backgroundSelectColor = KGlobalSettings::highlightColor(); backgroundSelectColor = TDEGlobalSettings::highlightColor();
penSelectColor=KGlobalSettings::baseColor(); penSelectColor=TDEGlobalSettings::baseColor();
} }
@ -116,7 +116,7 @@ void DateTable::paintWeekday(TQPainter *painter, int col) {
int w=cellWidth(); int w=cellWidth();
int h=cellHeight(); int h=cellHeight();
TQFont font = KGlobalSettings::generalFont(); TQFont font = TDEGlobalSettings::generalFont();
font.setBold(true); font.setBold(true);
if (!m_enabled) if (!m_enabled)
font.setItalic(true); font.setItalic(true);
@ -126,10 +126,10 @@ void DateTable::paintWeekday(TQPainter *painter, int col) {
//kdDebug()<<k_funcinfo<<" col="<<col<<" day="<<day<<" name="<<daystr<<endl; //kdDebug()<<k_funcinfo<<" col="<<col<<" day="<<day<<" name="<<daystr<<endl;
painter->setBrush(KGlobalSettings::baseColor()); painter->setBrush(TDEGlobalSettings::baseColor());
painter->setPen(KGlobalSettings::baseColor()); painter->setPen(TDEGlobalSettings::baseColor());
painter->drawRect(0, 0, w, h); painter->drawRect(0, 0, w, h);
painter->setPen(KGlobalSettings::textColor()); painter->setPen(TDEGlobalSettings::textColor());
if (m_markedWeekdays.state(day) == Map::Working) { if (m_markedWeekdays.state(day) == Map::Working) {
painter->setPen(colorBackgroundWorkday); painter->setPen(colorBackgroundWorkday);
@ -148,7 +148,7 @@ void DateTable::paintWeekday(TQPainter *painter, int col) {
painter->drawRect(2, 2, w-4, h-4); painter->drawRect(2, 2, w-4, h-4);
painter->setPen(penSelectColor); painter->setPen(penSelectColor);
} }
painter->drawText(0, 0, w, h-1, AlignCenter, KGlobal::locale()->calendar()->weekDayName(day, true), -1, &rect); painter->drawText(0, 0, w, h-1, AlignCenter, TDEGlobal::locale()->calendar()->weekDayName(day, true), -1, &rect);
painter->setPen(colorLine); painter->setPen(colorLine);
painter->moveTo(0, h-1); painter->moveTo(0, h-1);
painter->lineTo(w-1, h-1); painter->lineTo(w-1, h-1);
@ -164,16 +164,16 @@ void DateTable::paintWeekNumber(TQPainter *painter, int row) {
int w=cellWidth(); int w=cellWidth();
int h=cellHeight(); int h=cellHeight();
TQFont font=KGlobalSettings::generalFont(); TQFont font=TDEGlobalSettings::generalFont();
font.setBold(true); font.setBold(true);
if (!m_enabled) if (!m_enabled)
font.setItalic(true); font.setItalic(true);
painter->setFont(font); painter->setFont(font);
painter->setBrush(KGlobalSettings::baseColor()); painter->setBrush(TDEGlobalSettings::baseColor());
painter->setPen(KGlobalSettings::baseColor()); painter->setPen(TDEGlobalSettings::baseColor());
painter->drawRect(0, 0, w, h); painter->drawRect(0, 0, w, h);
painter->setPen(KGlobalSettings::textColor()); painter->setPen(TDEGlobalSettings::textColor());
painter->drawText(0, 0, w, h-1, AlignCenter, TQString("%1").arg(m_weeks[row].first), -1, &rect); painter->drawText(0, 0, w, h-1, AlignCenter, TQString("%1").arg(m_weeks[row].first), -1, &rect);
painter->setPen(colorLine); painter->setPen(colorLine);
@ -190,7 +190,7 @@ void DateTable::paintDay(TQPainter *painter, int row, int col) {
int w=cellWidth(); int w=cellWidth();
int h=cellHeight(); int h=cellHeight();
TQFont font=KGlobalSettings::generalFont(); TQFont font=TDEGlobalSettings::generalFont();
font.setPointSize(fontsize); font.setPointSize(fontsize);
if (!m_enabled) if (!m_enabled)
font.setItalic(true); font.setItalic(true);
@ -198,8 +198,8 @@ void DateTable::paintDay(TQPainter *painter, int row, int col) {
TQDate d = getDate(position(row, col)); TQDate d = getDate(position(row, col));
painter->setBrush(KGlobalSettings::baseColor()); painter->setBrush(TDEGlobalSettings::baseColor());
painter->setPen(KGlobalSettings::baseColor()); painter->setPen(TDEGlobalSettings::baseColor());
painter->drawRect(0, 0, w, h); painter->drawRect(0, 0, w, h);
// First paint the dates background // First paint the dates background
@ -238,7 +238,7 @@ void DateTable::paintDay(TQPainter *painter, int row, int col) {
} }
// and now the day number // and now the day number
d.month() == date.month() ? painter->setPen(KGlobalSettings::textColor()) : painter->setPen(gray); d.month() == date.month() ? painter->setPen(TDEGlobalSettings::textColor()) : painter->setPen(gray);
painter->drawText(0, 0, w, h, AlignCenter, TQString().setNum(d.day()), -1, &rect); painter->drawText(0, 0, w, h, AlignCenter, TQString().setNum(d.day()), -1, &rect);
if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width()); if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width());
@ -252,7 +252,7 @@ void DateTable::paintCell(TQPainter *painter, int row, int col) {
int w=cellWidth(); int w=cellWidth();
int h=cellHeight(); int h=cellHeight();
painter->setPen(colorLine); painter->setPen(colorLine);
painter->setBrush(KGlobalSettings::baseColor()); painter->setBrush(TDEGlobalSettings::baseColor());
painter->moveTo(w-1, 0); painter->moveTo(w-1, 0);
painter->lineTo(w-1, h-1); painter->lineTo(w-1, h-1);
painter->lineTo(0, h-1); painter->lineTo(0, h-1);
@ -348,7 +348,7 @@ void DateTable::setFontSize(int size) {
maxCell.setHeight(0); maxCell.setHeight(0);
for(count=0; count<7; ++count) for(count=0; count<7; ++count)
{ {
rect=metrics.boundingRect(KGlobal::locale()->calendar()->weekDayName(count+1, true)); rect=metrics.boundingRect(TDEGlobal::locale()->calendar()->weekDayName(count+1, true));
maxCell.setWidth(TQMAX(maxCell.width(), rect.width())); maxCell.setWidth(TQMAX(maxCell.width(), rect.width()));
maxCell.setHeight(TQMAX(maxCell.height(), rect.height())); maxCell.setHeight(TQMAX(maxCell.height(), rect.height()));
} }
@ -507,7 +507,7 @@ bool DateTable::selectDate(const TQDate& date_) {
} }
temp.setYMD(date.year(), date.month(), 1); temp.setYMD(date.year(), date.month(), 1);
firstday=column(KGlobal::locale()->calendar()->dayOfWeek(temp)); firstday=column(TDEGlobal::locale()->calendar()->dayOfWeek(temp));
if(firstday==1) firstday=8; // Reserve row 1 for previous month if(firstday==1) firstday=8; // Reserve row 1 for previous month
numdays=date.daysInMonth(); numdays=date.daysInMonth();
if(date.month()==1) { // set to december of previous year if(date.month()==1) { // set to december of previous year
@ -543,9 +543,9 @@ bool DateTable::setDate(const TQDate& date_, bool repaint) {
//m_selectedDates.clear(); //m_selectedDates.clear();
temp.setYMD(date.year(), date.month(), 1); temp.setYMD(date.year(), date.month(), 1);
firstday=column(KGlobal::locale()->calendar()->dayOfWeek(temp)); firstday=column(TDEGlobal::locale()->calendar()->dayOfWeek(temp));
if(firstday==1) firstday=8; if(firstday==1) firstday=8;
//kdDebug()<<k_funcinfo<<"date="<<temp<<"day="<<(KGlobal::locale()->calendar()->dayOfWeek(temp))<<" firstday="<<firstday<<endl; //kdDebug()<<k_funcinfo<<"date="<<temp<<"day="<<(TDEGlobal::locale()->calendar()->dayOfWeek(temp))<<" firstday="<<firstday<<endl;
numdays=date.daysInMonth(); numdays=date.daysInMonth();
if(date.month()==1) { // set to december of previous year if(date.month()==1) { // set to december of previous year
temp.setYMD(date.year()-1, 12, 1); temp.setYMD(date.year()-1, 12, 1);
@ -661,16 +661,16 @@ TQDate DateTable::getDate(int pos) const {
} }
int DateTable::weekday(int col) const { int DateTable::weekday(int col) const {
int day = col - m_dateStartCol + KGlobal::locale()->weekStartDay(); int day = col - m_dateStartCol + TDEGlobal::locale()->weekStartDay();
if (day > 7) day %= 7; if (day > 7) day %= 7;
//kdDebug()<<k_funcinfo<<"col="<<col<<" day="<<day<<" StartCol="<<m_dateStartCol<<" weekStartDay="<<KGlobal::locale()->weekStartDay()<<endl; //kdDebug()<<k_funcinfo<<"col="<<col<<" day="<<day<<" StartCol="<<m_dateStartCol<<" weekStartDay="<<TDEGlobal::locale()->weekStartDay()<<endl;
return day; return day;
} }
int DateTable::column(int weekday) const { int DateTable::column(int weekday) const {
int col = weekday - KGlobal::locale()->weekStartDay(); int col = weekday - TDEGlobal::locale()->weekStartDay();
if (col < 0) col += 7; if (col < 0) col += 7;
//kdDebug()<<k_funcinfo<<"col="<<col<<" day="<<col<<" StartCol="<<m_dateStartCol<<" weekStartDay="<<KGlobal::locale()->weekStartDay()<<endl; //kdDebug()<<k_funcinfo<<"col="<<col<<" day="<<col<<" StartCol="<<m_dateStartCol<<" weekStartDay="<<TDEGlobal::locale()->weekStartDay()<<endl;
return col + m_dateStartCol; return col + m_dateStartCol;
} }
@ -720,7 +720,7 @@ DateInternalWeekSelector::DateInternalWeekSelector
{ {
TQFont font; TQFont font;
// ----- // -----
font=KGlobalSettings::generalFont(); font=TDEGlobalSettings::generalFont();
font.setPointSize(fontsize); font.setPointSize(fontsize);
setFont(font); setFont(font);
setFrameStyle(TQFrame::NoFrame); setFrameStyle(TQFrame::NoFrame);
@ -770,7 +770,7 @@ DateInternalMonthPicker::DateInternalMonthPicker
// ----- // -----
activeCol = -1; activeCol = -1;
activeRow = -1; activeRow = -1;
font=KGlobalSettings::generalFont(); font=TDEGlobalSettings::generalFont();
font.setPointSize(fontsize); font.setPointSize(fontsize);
setFont(font); setFont(font);
setHScrollBarMode(AlwaysOff); setHScrollBarMode(AlwaysOff);
@ -780,13 +780,13 @@ DateInternalMonthPicker::DateInternalMonthPicker
setNumCols(3); setNumCols(3);
// enable to find drawing failures: // enable to find drawing failures:
// setTableFlags(Tbl_clipCellPainting); // setTableFlags(Tbl_clipCellPainting);
viewport()->setEraseColor(KGlobalSettings::baseColor()); // for consistency with the datepicker viewport()->setEraseColor(TDEGlobalSettings::baseColor()); // for consistency with the datepicker
// ----- find the preferred size // ----- find the preferred size
// (this is slow, possibly, but unfortunatly it is needed here): // (this is slow, possibly, but unfortunatly it is needed here):
TQFontMetrics metrics(font); TQFontMetrics metrics(font);
for(int i=1; i <= 12; ++i) for(int i=1; i <= 12; ++i)
{ {
rect=metrics.boundingRect(KGlobal::locale()->calendar()->monthName(i, false)); rect=metrics.boundingRect(TDEGlobal::locale()->calendar()->monthName(i, false));
if(max.width()<rect.width()) max.setWidth(rect.width()); if(max.width()<rect.width()) max.setWidth(rect.width());
if(max.height()<rect.height()) max.setHeight(rect.height()); if(max.height()<rect.height()) max.setHeight(rect.height());
} }
@ -809,7 +809,7 @@ DateInternalMonthPicker::getResult() const
void void
DateInternalMonthPicker::setupPainter(TQPainter *p) DateInternalMonthPicker::setupPainter(TQPainter *p)
{ {
p->setPen(KGlobalSettings::textColor()); p->setPen(TDEGlobalSettings::textColor());
} }
void void
@ -826,7 +826,7 @@ DateInternalMonthPicker::paintCell(TQPainter* painter, int row, int col)
TQString text; TQString text;
// ----- find the number of the cell: // ----- find the number of the cell:
index=3*row+col+1; index=3*row+col+1;
text=KGlobal::locale()->calendar()->monthName(index, false); text=TDEGlobal::locale()->calendar()->monthName(index, false);
painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text); painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text);
if ( activeCol == col && activeRow == row ) if ( activeCol == col && activeRow == row )
painter->drawRect( 0, 0, cellWidth(), cellHeight() ); painter->drawRect( 0, 0, cellWidth(), cellHeight() );
@ -932,7 +932,7 @@ DateInternalYearSelector::DateInternalYearSelector
{ {
TQFont font; TQFont font;
// ----- // -----
font=KGlobalSettings::generalFont(); font=TDEGlobalSettings::generalFont();
font.setPointSize(fontsize); font.setPointSize(fontsize);
setFont(font); setFont(font);
setFrameStyle(TQFrame::NoFrame); setFrameStyle(TQFrame::NoFrame);

@ -129,7 +129,7 @@ void DoubleListViewBase::SlaveListItem::clearColumn(int col) {
void DoubleListViewBase::SlaveListItem::setColumn(int col, double value) { void DoubleListViewBase::SlaveListItem::setColumn(int col, double value) {
if (col < listView()->columns()) { if (col < listView()->columns()) {
//setText(col, TQString("%1").arg(value, m_fieldwidth, m_fmt, m_prec)); //setText(col, TQString("%1").arg(value, m_fieldwidth, m_fmt, m_prec));
setText(col, KGlobal::locale()->formatNumber(value, m_prec)); setText(col, TDEGlobal::locale()->formatNumber(value, m_prec));
m_valueMap.replace(col, value); m_valueMap.replace(col, value);
//kdDebug()<<k_funcinfo<<m_masterItem->text(0)<<": column["<<col<<"]="<<value<<endl; //kdDebug()<<k_funcinfo<<m_masterItem->text(0)<<": column["<<col<<"]="<<value<<endl;
} }
@ -241,14 +241,14 @@ void DoubleListViewBase::MasterListItem::slaveItemDeleted() {
void DoubleListViewBase::MasterListItem::setTotal(double tot) { void DoubleListViewBase::MasterListItem::setTotal(double tot) {
m_value = tot; m_value = tot;
//setText(1, TQString("%1").arg(tot, m_fieldwidth, m_fmt, m_prec)); //setText(1, TQString("%1").arg(tot, m_fieldwidth, m_fmt, m_prec));
setText(1, KGlobal::locale()->formatNumber(tot, m_prec)); setText(1, TDEGlobal::locale()->formatNumber(tot, m_prec));
//kdDebug()<<k_funcinfo<<text(0)<<"="<<tot<<endl; //kdDebug()<<k_funcinfo<<text(0)<<"="<<tot<<endl;
} }
void DoubleListViewBase::MasterListItem::addToTotal(double v) { void DoubleListViewBase::MasterListItem::addToTotal(double v) {
m_value += v; m_value += v;
//setText(1, TQString("%1").arg(m_value, m_fieldwidth, m_fmt, m_prec)); //setText(1, TQString("%1").arg(m_value, m_fieldwidth, m_fmt, m_prec));
setText(1, KGlobal::locale()->formatNumber(m_value, m_prec)); setText(1, TDEGlobal::locale()->formatNumber(m_value, m_prec));
} }
double DoubleListViewBase::MasterListItem::calcTotal() { double DoubleListViewBase::MasterListItem::calcTotal() {

@ -148,7 +148,7 @@ TQString Duration::toString(Format format) const {
result.sprintf("%u %02u:%02u:%02u.%u", (unsigned)days, hours, minutes, seconds, (unsigned)ms); result.sprintf("%u %02u:%02u:%02u.%u", (unsigned)days, hours, minutes, seconds, (unsigned)ms);
break; break;
case Format_HourFraction: case Format_HourFraction:
result = KGlobal::locale()->formatNumber(toDouble(Unit_h), 2); result = TDEGlobal::locale()->formatNumber(toDouble(Unit_h), 2);
break; break;
// i18n // i18n
case Format_i18nHour: case Format_i18nHour:
@ -159,7 +159,7 @@ TQString Duration::toString(Format format) const {
result = i18n("<hours>h:<minutes>m", "%1h:%2m").arg(hours).arg(minutes); result = i18n("<hours>h:<minutes>m", "%1h:%2m").arg(hours).arg(minutes);
break; break;
case Format_i18nDay: case Format_i18nDay:
result = KGlobal::locale()->formatNumber(toDouble(Unit_d), 2); result = TDEGlobal::locale()->formatNumber(toDouble(Unit_d), 2);
break; break;
case Format_i18nDayTime: case Format_i18nDayTime:
ms = m_ms; ms = m_ms;
@ -178,7 +178,7 @@ TQString Duration::toString(Format format) const {
} }
break; break;
case Format_i18nHourFraction: case Format_i18nHourFraction:
result = KGlobal::locale()->formatNumber(toDouble(Unit_h), 2); result = TDEGlobal::locale()->formatNumber(toDouble(Unit_h), 2);
break; break;
default: default:
kdFatal()<<k_funcinfo<<"Unknown format"<<endl; kdFatal()<<k_funcinfo<<"Unknown format"<<endl;
@ -218,7 +218,7 @@ Duration Duration::fromString(const TQString &s, Format format, bool *ok) {
case Format_HourFraction: { case Format_HourFraction: {
// should be in double format // should be in double format
bool res; bool res;
double f = KGlobal::locale()->readNumber(s, &res); double f = TDEGlobal::locale()->readNumber(s, &res);
if (ok) *ok = res; if (ok) *ok = res;
if (res) { if (res) {
return Duration((TQ_INT64)(f*3600.0)); return Duration((TQ_INT64)(f*3600.0));

@ -81,7 +81,7 @@ do \
void DurationWidget::init() void DurationWidget::init()
{ {
// Use the user's decimal point! // Use the user's decimal point!
m_decimalPoint = KGlobal::locale()->decimalSymbol(); m_decimalPoint = TDEGlobal::locale()->decimalSymbol();
//NOTE: //NOTE:
// This isn't as flexible/general as Shaheed once made it. // This isn't as flexible/general as Shaheed once made it.
@ -305,7 +305,7 @@ void DurationWidget::handleLostFocus(
// Get the text and start processing... // Get the text and start processing...
TQString newValue(current->text()); TQString newValue(current->text());
double v = KGlobal::locale()->readNumber(newValue); double v = TDEGlobal::locale()->readNumber(newValue);
unsigned currentValue = 0; unsigned currentValue = 0;
TQString tmp; TQString tmp;
//kdDebug()<<k_funcinfo<<field<<": value="<<v<<" v="<<v<<endl; //kdDebug()<<k_funcinfo<<field<<": value="<<v<<" v="<<v<<endl;
@ -319,7 +319,7 @@ void DurationWidget::handleLostFocus(
// Get remainder. // Get remainder.
v = v - (tmp.toUInt() * leftScale); v = v - (tmp.toUInt() * leftScale);
newValue = KGlobal::locale()->formatNumber(v); newValue = TDEGlobal::locale()->formatNumber(v);
} }
int point = newValue.find(m_decimalPoint); int point = newValue.find(m_decimalPoint);
if (point != -1) if (point != -1)
@ -332,11 +332,11 @@ void DurationWidget::handleLostFocus(
//kdDebug()<<k_funcinfo<<field<<": value="<<newValue<<" rightScale="<<rightScale<<" frac="<<frac<<" ("<<newValue.mid(point)<<")"<<endl; //kdDebug()<<k_funcinfo<<field<<": value="<<newValue<<" rightScale="<<rightScale<<" frac="<<frac<<" ("<<newValue.mid(point)<<")"<<endl;
// Propagate fraction // Propagate fraction
v = rightScale * (frac*power(10.0, -p)); v = rightScale * (frac*power(10.0, -p));
frac = fraction(KGlobal::locale()->formatNumber(v, 19), 0); frac = fraction(TDEGlobal::locale()->formatNumber(v, 19), 0);
//kdDebug()<<k_funcinfo<<field<<": v="<<v<<" ("<<(unsigned)v<<") rest="<<frac<<endl; //kdDebug()<<k_funcinfo<<field<<": v="<<v<<" ("<<(unsigned)v<<") rest="<<frac<<endl;
if (frac > 0.0) if (frac > 0.0)
{ {
tmp = KGlobal::locale()->formatNumber(v, 19); tmp = TDEGlobal::locale()->formatNumber(v, 19);
right->setText(tmp); right->setText(tmp);
handleLostFocus(field + 1); handleLostFocus(field + 1);
} else { } else {
@ -449,7 +449,7 @@ double DurationWidget::fraction(TQString number, int *exp) {
} else { } else {
v = number.mid(point); v = number.mid(point);
} }
return KGlobal::locale()->readNumber(v); return TDEGlobal::locale()->readNumber(v);
} }
} //KPlato namespace } //KPlato namespace

@ -482,7 +482,7 @@ void GanttView::modifyProject(KDGanttViewItem *item, Node *node)
void GanttView::modifySummaryTask(KDGanttViewItem *item, Task *task) void GanttView::modifySummaryTask(KDGanttViewItem *item, Task *task)
{ {
//kdDebug()<<k_funcinfo<<endl; //kdDebug()<<k_funcinfo<<endl;
KLocale *locale = KGlobal::locale(); KLocale *locale = TDEGlobal::locale();
//kdDebug()<<k_funcinfo<<task->name()<<": "<<task->currentSchedule()<<", "<<task->notScheduled()<<", "<<(m_project ? m_project->notScheduled() : false)<<endl; //kdDebug()<<k_funcinfo<<task->name()<<": "<<task->currentSchedule()<<", "<<task->notScheduled()<<", "<<(m_project ? m_project->notScheduled() : false)<<endl;
if (task->currentSchedule() == 0) { if (task->currentSchedule() == 0) {
item->setShowNoInformation(m_showNoInformation); item->setShowNoInformation(m_showNoInformation);
@ -530,7 +530,7 @@ void GanttView::modifySummaryTask(KDGanttViewItem *item, Task *task)
void GanttView::modifyTask(KDGanttViewItem *item, Task *task) void GanttView::modifyTask(KDGanttViewItem *item, Task *task)
{ {
//kdDebug()<<k_funcinfo<<endl; //kdDebug()<<k_funcinfo<<endl;
KLocale *locale = KGlobal::locale(); KLocale *locale = TDEGlobal::locale();
//kdDebug()<<k_funcinfo<<task->name()<<": "<<task->currentSchedule()<<", "<<task->notScheduled()<<", "<<(m_project ? m_project->notScheduled() : false)<<endl; //kdDebug()<<k_funcinfo<<task->name()<<": "<<task->currentSchedule()<<", "<<task->notScheduled()<<", "<<(m_project ? m_project->notScheduled() : false)<<endl;
item->setListViewText(task->name()); item->setListViewText(task->name());
item->setListViewText(1, task->wbs()); item->setListViewText(1, task->wbs());
@ -652,7 +652,7 @@ void GanttView::modifyTask(KDGanttViewItem *item, Task *task)
void GanttView::modifyMilestone(KDGanttViewItem *item, Task *task) void GanttView::modifyMilestone(KDGanttViewItem *item, Task *task)
{ {
//kdDebug()<<k_funcinfo<<endl; //kdDebug()<<k_funcinfo<<endl;
KLocale *locale = KGlobal::locale(); KLocale *locale = TDEGlobal::locale();
//kdDebug()<<k_funcinfo<<task->name()<<": "<<task->currentSchedule()<<", "<<task->notScheduled()<<", "<<(m_project ? m_project->notScheduled() : false)<<endl; //kdDebug()<<k_funcinfo<<task->name()<<": "<<task->currentSchedule()<<", "<<task->notScheduled()<<", "<<(m_project ? m_project->notScheduled() : false)<<endl;
if (task->currentSchedule() == 0) { if (task->currentSchedule() == 0) {
item->setShowNoInformation(m_showNoInformation); item->setShowNoInformation(m_showNoInformation);
@ -1048,7 +1048,7 @@ void GanttView::print(KPrinter &prt) {
p.drawRect(0,0,metrics.width(),metrics.height()); p.drawRect(0,0,metrics.width(),metrics.height());
TQString text; TQString text;
int hei = 0; int hei = 0;
text = KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); text = TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
TQRect r = p.boundingRect(metrics.width()-1,0,0,0, TQt::AlignRight, text ); TQRect r = p.boundingRect(metrics.width()-1,0,0,0, TQt::AlignRight, text );
p.drawText( r, TQt::AlignRight, text ); p.drawText( r, TQt::AlignRight, text );
hei = r.height(); hei = r.height();

@ -79,7 +79,7 @@ public:
TQString getData(TQString tag) const { TQString getData(TQString tag) const {
//kdDebug()<<k_funcinfo<<"tag="<<tag<<endl; //kdDebug()<<k_funcinfo<<"tag="<<tag<<endl;
KLocale *l = KGlobal::locale(); KLocale *l = TDEGlobal::locale();
if (!tag.contains('.')) { if (!tag.contains('.')) {
// global tags // global tags
if (tag == "currentdate") { if (tag == "currentdate") {

@ -360,8 +360,8 @@ bool Resource::load(TQDomElement &element) {
if (s != "") if (s != "")
m_availableUntil = DateTime::fromString(s); m_availableUntil = DateTime::fromString(s);
cost.normalRate = KGlobal::locale()->readMoney(element.attribute("normal-rate")); cost.normalRate = TDEGlobal::locale()->readMoney(element.attribute("normal-rate"));
cost.overtimeRate = KGlobal::locale()->readMoney(element.attribute("overtime-rate")); cost.overtimeRate = TDEGlobal::locale()->readMoney(element.attribute("overtime-rate"));
return true; return true;
} }
@ -380,8 +380,8 @@ void Resource::save(TQDomElement &element) const {
me.setAttribute("units", m_units); me.setAttribute("units", m_units);
me.setAttribute("available-from", m_availableFrom.toString(Qt::ISODate)); me.setAttribute("available-from", m_availableFrom.toString(Qt::ISODate));
me.setAttribute("available-until", m_availableUntil.toString(Qt::ISODate)); me.setAttribute("available-until", m_availableUntil.toString(Qt::ISODate));
me.setAttribute("normal-rate", KGlobal::locale()->formatMoney(cost.normalRate)); me.setAttribute("normal-rate", TDEGlobal::locale()->formatMoney(cost.normalRate));
me.setAttribute("overtime-rate", KGlobal::locale()->formatMoney(cost.overtimeRate)); me.setAttribute("overtime-rate", TDEGlobal::locale()->formatMoney(cost.overtimeRate));
} }
bool Resource::isAvailable(Task */*task*/) { bool Resource::isAvailable(Task */*task*/) {

@ -126,7 +126,7 @@ void ResourceAppointmentsView::slotUpdate() {
return; return;
TQApplication::setOverrideCursor(TQt::waitCursor); TQApplication::setOverrideCursor(TQt::waitCursor);
createSlaveItems(); createSlaveItems();
KLocale *locale = KGlobal::locale(); KLocale *locale = TDEGlobal::locale();
const KCalendarSystem *cal = locale->calendar(); const KCalendarSystem *cal = locale->calendar();
const Calendar *resCal = m_resource->calendar(); const Calendar *resCal = m_resource->calendar();
const TQDateTime availFrom = m_resource->availableFrom(); const TQDateTime availFrom = m_resource->availableFrom();

@ -135,8 +135,8 @@ ResourceDialog::ResourceDialog(Project &project, Resource *resource, TQWidget *p
dia->units->setValue(resource->units()); dia->units->setValue(resource->units());
dia->availableFrom->setDateTime(resource->availableFrom()); dia->availableFrom->setDateTime(resource->availableFrom());
dia->availableUntil->setDateTime(resource->availableUntil()); dia->availableUntil->setDateTime(resource->availableUntil());
dia->rateEdit->setText(KGlobal::locale()->formatMoney(resource->normalRate())); dia->rateEdit->setText(TDEGlobal::locale()->formatMoney(resource->normalRate()));
dia->overtimeEdit->setText(KGlobal::locale()->formatMoney(resource->overtimeRate())); dia->overtimeEdit->setText(TDEGlobal::locale()->formatMoney(resource->overtimeRate()));
int cal = 0; int cal = 0;
dia->calendarList->insertItem(i18n("None")); dia->calendarList->insertItem(i18n("None"));
@ -173,8 +173,8 @@ void ResourceDialog::slotOk() {
m_resource.setType((Resource::Type)(dia->type->currentItem())); m_resource.setType((Resource::Type)(dia->type->currentItem()));
m_resource.setUnits(dia->units->value()); m_resource.setUnits(dia->units->value());
m_resource.setNormalRate(KGlobal::locale()->readMoney(dia->rateEdit->text())); m_resource.setNormalRate(TDEGlobal::locale()->readMoney(dia->rateEdit->text()));
m_resource.setOvertimeRate(KGlobal::locale()->readMoney(dia->overtimeEdit->text())); m_resource.setOvertimeRate(TDEGlobal::locale()->readMoney(dia->overtimeEdit->text()));
m_resource.setCalendar(m_calendars[dia->calendarList->currentItem()]); m_resource.setCalendar(m_calendars[dia->calendarList->currentItem()]);
m_resource.setAvailableFrom(dia->availableFrom->dateTime()); m_resource.setAvailableFrom(dia->availableFrom->dateTime());
m_resource.setAvailableUntil(dia->availableUntil->dateTime()); m_resource.setAvailableUntil(dia->availableUntil->dateTime());

@ -492,11 +492,11 @@ void ResourceView::drawResources(const Project &proj, TQListViewItem *parent, Re
item->setText(2, r->initials()); item->setText(2, r->initials());
item->setText(3, r->email()); item->setText(3, r->email());
item->setText(4, r->calendar() ? r->calendar()->name() : i18n("None")); item->setText(4, r->calendar() ? r->calendar()->name() : i18n("None"));
item->setText(5, KGlobal::locale()->formatDateTime(r->availableFrom())); item->setText(5, TDEGlobal::locale()->formatDateTime(r->availableFrom()));
item->setText(6, KGlobal::locale()->formatDateTime(r->availableUntil())); item->setText(6, TDEGlobal::locale()->formatDateTime(r->availableUntil()));
item->setText(7, TQString().setNum(r->units())); item->setText(7, TQString().setNum(r->units()));
item->setText(8, KGlobal::locale()->formatMoney(r->normalRate())); item->setText(8, TDEGlobal::locale()->formatMoney(r->normalRate()));
item->setText(9, KGlobal::locale()->formatMoney(r->overtimeRate())); item->setText(9, TDEGlobal::locale()->formatMoney(r->overtimeRate()));
if (!m_selectedItem) { if (!m_selectedItem) {
m_selectedItem = item; m_selectedItem = item;
} }

@ -60,7 +60,7 @@ public:
if (day->state() == Map::NonWorking) { if (day->state() == Map::NonWorking) {
setHours(); setHours();
} else { } else {
setText(1, KGlobal::locale()->formatNumber(day->duration().toDouble(Duration::Unit_h))); setText(1, TDEGlobal::locale()->formatNumber(day->duration().toDouble(Duration::Unit_h)));
} }
} }
~WeekdayListItem() { ~WeekdayListItem() {
@ -72,7 +72,7 @@ public:
} }
void setIntervals(TQPtrList<TQPair<TQTime, TQTime> > intervals) { void setIntervals(TQPtrList<TQPair<TQTime, TQTime> > intervals) {
day->setIntervals(intervals); day->setIntervals(intervals);
setText(1, KGlobal::locale()->formatNumber(day->duration().toDouble(Duration::Unit_h))); setText(1, TDEGlobal::locale()->formatNumber(day->duration().toDouble(Duration::Unit_h)));
} }
void setState(int st) { void setState(int st) {
day->setState(st+1); day->setState(st+1);
@ -166,7 +166,7 @@ StandardWorktimeDialogImpl::StandardWorktimeDialogImpl(StandardWorktime *std, TQ
weekdayList->setSorting(-1); weekdayList->setSorting(-1);
weekdayList->header()->setStretchEnabled(true); weekdayList->header()->setStretchEnabled(true);
const KCalendarSystem * cs = KGlobal::locale()->calendar(); const KCalendarSystem * cs = TDEGlobal::locale()->calendar();
Calendar *cal = m_std->calendar(); Calendar *cal = m_std->calendar();
if (cal) { if (cal) {
WeekdayListItem *item = 0; WeekdayListItem *item = 0;

@ -108,7 +108,7 @@ void TaskAppointmentsView::slotUpdate() {
return; return;
TQApplication::setOverrideCursor(TQt::waitCursor); TQApplication::setOverrideCursor(TQt::waitCursor);
createSlaveItems(); createSlaveItems();
KLocale *locale = KGlobal::locale(); KLocale *locale = TDEGlobal::locale();
const KCalendarSystem *cal = locale->calendar(); const KCalendarSystem *cal = locale->calendar();
// Add columns for selected period/periods // Add columns for selected period/periods

@ -63,9 +63,9 @@ void TaskAppointmentsView::draw(Task *task)
item->setText(i++, it.current()->startTime().date().toString(ISODate)); item->setText(i++, it.current()->startTime().date().toString(ISODate));
item->setText(i++, it.current()->endTime().date().toString(ISODate)); item->setText(i++, it.current()->endTime().date().toString(ISODate));
item->setText(i++, it.current()->plannedEffort().toString(Duration::Format_HourFraction)); item->setText(i++, it.current()->plannedEffort().toString(Duration::Format_HourFraction));
item->setText(i++, KGlobal::locale()->formatMoney(r->normalRate())); item->setText(i++, TDEGlobal::locale()->formatMoney(r->normalRate()));
item->setText(i++, KGlobal::locale()->formatMoney(r->overtimeRate())); item->setText(i++, TDEGlobal::locale()->formatMoney(r->overtimeRate()));
item->setText(i++, KGlobal::locale()->formatMoney(r->fixedCost())); item->setText(i++, TDEGlobal::locale()->formatMoney(r->fixedCost()));
TQPtrListIterator<AppointmentInterval> ait = it.current()->intervals(); TQPtrListIterator<AppointmentInterval> ait = it.current()->intervals();
for (; ait.current(); ++ait) { for (; ait.current(); ++ait) {
TQListViewItem *sub = new TQListViewItem(item, ""); TQListViewItem *sub = new TQListViewItem(item, "");
@ -98,9 +98,9 @@ void TaskAppointmentsView::drawCostEffort()
{ {
if (m_task == 0) if (m_task == 0)
return; return;
m_actualCost->setText(KGlobal::locale()->formatMoney(m_task->actualCostTo(m_date->date()))); m_actualCost->setText(TDEGlobal::locale()->formatMoney(m_task->actualCostTo(m_date->date())));
m_plannedCost->setText(KGlobal::locale()->formatMoney(m_task->plannedCostTo(m_date->date()))); m_plannedCost->setText(TDEGlobal::locale()->formatMoney(m_task->plannedCostTo(m_date->date())));
m_plannedCostTotal->setText(KGlobal::locale()->formatMoney(m_task->plannedCost())); m_plannedCostTotal->setText(TDEGlobal::locale()->formatMoney(m_task->plannedCost()));
m_actualEffort->setText(m_task->actualEffortTo(m_date->date()).toString(Duration::Format_HourFraction)); m_actualEffort->setText(m_task->actualEffortTo(m_date->date()).toString(Duration::Format_HourFraction));
m_plannedEffort->setText(m_task->plannedEffortTo(m_date->date()).toString(Duration::Format_HourFraction)); m_plannedEffort->setText(m_task->plannedEffortTo(m_date->date()).toString(Duration::Format_HourFraction));

@ -51,14 +51,14 @@ void TaskCostPanel::setStartValues(Task &task) {
setCurrentItem(runningAccount, m_oldrunning->name()); setCurrentItem(runningAccount, m_oldrunning->name());
} }
startupCost->setText(KGlobal::locale()->formatMoney(task.startupCost())); startupCost->setText(TDEGlobal::locale()->formatMoney(task.startupCost()));
startupAccount->insertStringList(m_accountList); startupAccount->insertStringList(m_accountList);
m_oldstartup = m_accounts.findStartupAccount(task); m_oldstartup = m_accounts.findStartupAccount(task);
if (m_oldstartup) { if (m_oldstartup) {
setCurrentItem(startupAccount, m_oldstartup->name()); setCurrentItem(startupAccount, m_oldstartup->name());
} }
shutdownCost->setText(KGlobal::locale()->formatMoney(task.shutdownCost())); shutdownCost->setText(TDEGlobal::locale()->formatMoney(task.shutdownCost()));
shutdownAccount->insertStringList(m_accountList); shutdownAccount->insertStringList(m_accountList);
m_oldshutdown = m_accounts.findShutdownAccount(task); m_oldshutdown = m_accounts.findShutdownAccount(task);
if (m_oldshutdown) { if (m_oldshutdown) {
@ -95,12 +95,12 @@ KCommand *TaskCostPanel::buildCommand(Part *part) {
cmd->addCommand(new NodeModifyShutdownAccountCmd(part, m_task, m_oldshutdown, m_accounts.findAccount(shutdownAccount->currentText()))); cmd->addCommand(new NodeModifyShutdownAccountCmd(part, m_task, m_oldshutdown, m_accounts.findAccount(shutdownAccount->currentText())));
modified = true; modified = true;
} }
double money = KGlobal::locale()->readMoney(startupCost->text()); double money = TDEGlobal::locale()->readMoney(startupCost->text());
if (money != m_task.startupCost()) { if (money != m_task.startupCost()) {
cmd->addCommand(new NodeModifyStartupCostCmd(part, m_task, money)); cmd->addCommand(new NodeModifyStartupCostCmd(part, m_task, money));
modified = true; modified = true;
} }
money = KGlobal::locale()->readMoney(shutdownCost->text()); money = TDEGlobal::locale()->readMoney(shutdownCost->text());
if (money != m_task.shutdownCost()) { if (money != m_task.shutdownCost()) {
cmd->addCommand(new NodeModifyShutdownCostCmd(part, m_task, money)); cmd->addCommand(new NodeModifyShutdownCostCmd(part, m_task, money));
modified = true; modified = true;

@ -525,7 +525,7 @@ void KPrBackGround::drawBackPix( TQPainter *_painter, const TQSize& ext, const T
double w = _origSize.width(); double w = _origSize.width();
w *= ext.width(); w *= ext.width();
#if KDE_IS_VERSION(3,1,90) #if KDE_IS_VERSION(3,1,90)
TQRect desk = KGlobalSettings::desktopGeometry(TQT_TQWIDGET(kapp->activeWindow())); TQRect desk = TDEGlobalSettings::desktopGeometry(TQT_TQWIDGET(kapp->activeWindow()));
#else #else
TQRect desk = TQApplication::desktop()->screenGeometry(); TQRect desk = TQApplication::desktop()->screenGeometry();
#endif #endif

@ -227,7 +227,7 @@ bool KPrCanvas::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::KeyPress: case TQEvent::KeyPress:
{ {
TQKeyEvent * keyev = TQT_TQKEYEVENT(e); TQKeyEvent * keyev = TQT_TQKEYEVENT(e);
if ( keyev->key() == KGlobalSettings::contextMenuKey() ) { if ( keyev->key() == TDEGlobalSettings::contextMenuKey() ) {
popupContextMenu(); popupContextMenu();
return true; return true;
} }
@ -333,7 +333,7 @@ void KPrCanvas::paintEvent( TQPaintEvent* paintEvent )
#if 0 // this works but isn't enough - e.g. object effects need the same offsets #if 0 // this works but isn't enough - e.g. object effects need the same offsets
// so we should store them, but they don't work like diffx/diffy... // so we should store them, but they don't work like diffx/diffy...
// (e.g. the painter mustn't be translated when painting the background) // (e.g. the painter mustn't be translated when painting the background)
TQRect desk = KGlobalSettings::desktopGeometry(this); TQRect desk = TDEGlobalSettings::desktopGeometry(this);
TQRect pgRect = m_view->kPresenterDoc()->pageList().at(0)->getZoomPageRect(); TQRect pgRect = m_view->kPresenterDoc()->pageList().at(0)->getZoomPageRect();
int offx = 0, offy = 0; int offx = 0, offy = 0;
if ( desk.width() > pgRect.width() ) if ( desk.width() > pgRect.width() )
@ -488,7 +488,7 @@ void KPrCanvas::drawBackground( TQPainter *painter, const TQRect& rect, KPrPage
// Old code, left a black area if zoomX != zoomY // Old code, left a black area if zoomX != zoomY
//page->background()->draw( painter, m_view->zoomHandler(), rect, false ); //page->background()->draw( painter, m_view->zoomHandler(), rect, false );
TQRect desk = KGlobalSettings::desktopGeometry(getView()); TQRect desk = TDEGlobalSettings::desktopGeometry(getView());
TQRect crect = desk.intersect( rect ); TQRect crect = desk.intersect( rect );
if ( crect.isEmpty() || !page->displayBackground()) if ( crect.isEmpty() || !page->displayBackground())
return; return;
@ -2213,7 +2213,7 @@ void KPrCanvas::resizeEvent( TQResizeEvent *e )
TQWidget::resizeEvent( e ); TQWidget::resizeEvent( e );
} }
else else
TQWidget::resizeEvent( new TQResizeEvent( KGlobalSettings::desktopGeometry(this).size(), TQWidget::resizeEvent( new TQResizeEvent( TDEGlobalSettings::desktopGeometry(this).size(),
e->oldSize() ) ); e->oldSize() ) );
buffer.resize( size() ); buffer.resize( size() );
} }
@ -3075,7 +3075,7 @@ bool KPrCanvas::pNext( bool gotoNextPage )
} }
m_setPageTimer = true; m_setPageTimer = true;
TQRect desk = KGlobalSettings::desktopGeometry(this); TQRect desk = TDEGlobalSettings::desktopGeometry(this);
TQPixmap _pix1( desk.width(), desk.height() ); TQPixmap _pix1( desk.width(), desk.height() );
drawCurrentPageInPix( _pix1 ); drawCurrentPageInPix( _pix1 );
@ -3132,7 +3132,7 @@ bool KPrCanvas::pNext( bool gotoNextPage )
{ {
m_view->setPageDuration( m_step.m_pageNumber ); m_view->setPageDuration( m_step.m_pageNumber );
TQRect desk = KGlobalSettings::desktopGeometry(this); TQRect desk = TDEGlobalSettings::desktopGeometry(this);
TQPixmap lastSlide( desk.width(), desk.height() ); TQPixmap lastSlide( desk.width(), desk.height() );
TQFont font( m_view->kPresenterDoc()->defaultFont().family() ); TQFont font( m_view->kPresenterDoc()->defaultFont().family() );
TQPainter p( &lastSlide ); TQPainter p( &lastSlide );
@ -4113,7 +4113,7 @@ void KPrCanvas::gotoPage( int pg )
m_step.m_step = *m_pageEffectSteps.begin(); m_step.m_step = *m_pageEffectSteps.begin();
m_step.m_subStep = 0; m_step.m_subStep = 0;
#if 0 #if 0
TQRect desk = KGlobalSettings::desktopGeometry(this); TQRect desk = TDEGlobalSettings::desktopGeometry(this);
resize( desk.width(), desk.height() ); resize( desk.width(), desk.height() );
#endif #endif
doObjEffects(); doObjEffects();
@ -4452,7 +4452,7 @@ void KPrCanvas::picViewOrigFactor()
void KPrCanvas::scalePixmapToBeOrigIn( const KoSize &currentSize, const KoSize &pgSize, void KPrCanvas::scalePixmapToBeOrigIn( const KoSize &currentSize, const KoSize &pgSize,
const TQSize &presSize, KPrPixmapObject *obj ) const TQSize &presSize, KPrPixmapObject *obj )
{ {
TQRect desk = KGlobalSettings::desktopGeometry(this); TQRect desk = TDEGlobalSettings::desktopGeometry(this);
double faktX = (double)presSize.width() / (double)desk.width(); double faktX = (double)presSize.width() / (double)desk.width();
double faktY = (double)presSize.height() / (double)desk.height(); double faktY = (double)presSize.height() / (double)desk.height();
double w = pgSize.width() * faktX; double w = pgSize.width() * faktX;

@ -792,7 +792,7 @@ void KPrConfigureDefaultDocPage::slotDefault()
m_tabStopWidth->setValue( MM_TO_POINT(15)); m_tabStopWidth->setValue( MM_TO_POINT(15));
m_createBackupFile->setChecked( true ); m_createBackupFile->setChecked( true );
m_directInsertCursor->setChecked( false ); m_directInsertCursor->setChecked( false );
m_globalLanguage->setCurrentText( KoGlobal::languageFromTag( KGlobal::locale()->language() ) ); m_globalLanguage->setCurrentText( KoGlobal::languageFromTag( TDEGlobal::locale()->language() ) );
m_autoHyphenation->setChecked( false ); m_autoHyphenation->setChecked( false );
} }
@ -994,7 +994,7 @@ void KPrConfigurePathPage::slotDefault()
{ {
TQListViewItem * item = m_pPathView->findItem(i18n("Picture Path"), 0); TQListViewItem * item = m_pPathView->findItem(i18n("Picture Path"), 0);
if ( item ) if ( item )
item->setText(1, KGlobalSettings::documentPath()); item->setText(1, TDEGlobalSettings::documentPath());
item = m_pPathView->findItem(i18n("Backup Path"), 0); item = m_pPathView->findItem(i18n("Backup Path"), 0);
if ( item ) if ( item )
item->setText(1, TQString() ); item->setText(1, TQString() );

@ -150,8 +150,8 @@ KPrDocument::KPrDocument( TQWidget *parentWidget, const char *widgetName, TQObje
m_tabStop = MM_TO_POINT( 15.0 ); m_tabStop = MM_TO_POINT( 15.0 );
m_styleColl=new KoStyleCollection(); m_styleColl=new KoStyleCollection();
m_insertFilePage = 0; m_insertFilePage = 0;
m_picturePath= KGlobalSettings::documentPath(); m_picturePath= TDEGlobalSettings::documentPath();
m_globalLanguage = KGlobal::locale()->language(); m_globalLanguage = TDEGlobal::locale()->language();
m_bGlobalHyphenation = false; m_bGlobalHyphenation = false;
_duplicatePage=false; _duplicatePage=false;
@ -184,7 +184,7 @@ KPrDocument::KPrDocument( TQWidget *parentWidget, const char *widgetName, TQObje
if( config->hasGroup("Interface") ) { if( config->hasGroup("Interface") ) {
config->setGroup( "Interface" ); config->setGroup( "Interface" );
m_globalLanguage=config->readEntry("language", KGlobal::locale()->language()); m_globalLanguage=config->readEntry("language", TDEGlobal::locale()->language());
m_bGlobalHyphenation=config->readBoolEntry("hyphenation", false); m_bGlobalHyphenation=config->readBoolEntry("hyphenation", false);
} }
@ -344,7 +344,7 @@ void KPrDocument::initConfig()
setGridY( config->readDoubleNumEntry( "ResolutionY", MM_TO_POINT( 5.0 ) )); setGridY( config->readDoubleNumEntry( "ResolutionY", MM_TO_POINT( 5.0 ) ));
m_bInsertDirectCursor= config->readBoolEntry( "InsertDirectCursor", false ); m_bInsertDirectCursor= config->readBoolEntry( "InsertDirectCursor", false );
m_globalLanguage=config->readEntry("language", KGlobal::locale()->language()); m_globalLanguage=config->readEntry("language", TDEGlobal::locale()->language());
} }
else else
@ -382,7 +382,7 @@ void KPrDocument::initConfig()
if(config->hasGroup("Kpresenter Path" ) ) if(config->hasGroup("Kpresenter Path" ) )
{ {
config->setGroup( "Kpresenter Path" ); config->setGroup( "Kpresenter Path" );
m_picturePath=config->readPathEntry( "picture path",KGlobalSettings::documentPath()); m_picturePath=config->readPathEntry( "picture path",TDEGlobalSettings::documentPath());
setBackupPath(config->readPathEntry( "backup path" )); setBackupPath(config->readPathEntry( "backup path" ));
} }
@ -2221,7 +2221,7 @@ bool KPrDocument::loadXML( TQIODevice * dev, const TQDomDocument& doc )
// Launch the perl script on it // Launch the perl script on it
KTempFile tmpFileOut; KTempFile tmpFileOut;
tmpFileOut.setAutoDelete( true ); tmpFileOut.setAutoDelete( true );
TQString cmd = KGlobal::dirs()->findExe("perl"); TQString cmd = TDEGlobal::dirs()->findExe("perl");
if (cmd.isEmpty()) if (cmd.isEmpty())
{ {
setErrorMessage( i18n("You don't appear to have PERL installed.\nIt is needed to convert this document.\nPlease install PERL and try again.")); setErrorMessage( i18n("You don't appear to have PERL installed.\nIt is needed to convert this document.\nPlease install PERL and try again."));
@ -2230,9 +2230,9 @@ bool KPrDocument::loadXML( TQIODevice * dev, const TQDomDocument& doc )
cmd += " "; cmd += " ";
cmd += locate( "exe", "kprconverter.pl" ); cmd += locate( "exe", "kprconverter.pl" );
cmd += " "; cmd += " ";
cmd += KProcess::quote( tmpFileIn.name() ); cmd += TDEProcess::quote( tmpFileIn.name() );
cmd += " "; cmd += " ";
cmd += KProcess::quote( tmpFileOut.name() ); cmd += TDEProcess::quote( tmpFileOut.name() );
system( TQFile::encodeName(cmd) ); system( TQFile::encodeName(cmd) );
// Build a new TQDomDocument from the result // Build a new TQDomDocument from the result

@ -427,7 +427,7 @@ void KPrEffectDia::slotRequesterClicked( KURLRequester *requester )
requester->fileDialog()->setFilter( filter ); requester->fileDialog()->setFilter( filter );
// find the first "sound"-resource that contains files // find the first "sound"-resource that contains files
TQStringList soundDirs = KGlobal::dirs()->resourceDirs( "sound" ); TQStringList soundDirs = TDEGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) { if ( !soundDirs.isEmpty() ) {
KURL soundURL; KURL soundURL;
TQDir dir; TQDir dir;

@ -287,7 +287,7 @@ void KPrMSPresentation::init()
backColour = TQt::black; backColour = TQt::black;
textColour = TQt::white; textColour = TQt::white;
path = KGlobalSettings::documentPath(); path = TDEGlobalSettings::documentPath();
} }
KPrMSPresentationSetup::KPrMSPresentationSetup( KPrDocument *_doc, KPrView *_view ) KPrMSPresentationSetup::KPrMSPresentationSetup( KPrDocument *_doc, KPrView *_view )

@ -50,36 +50,36 @@
#include <KoDom.h> #include <KoDom.h>
#include <kdebug.h> #include <kdebug.h>
const TQString &KPrObject::tagORIG=KGlobal::staticQString("ORIG"); const TQString &KPrObject::tagORIG=TDEGlobal::staticQString("ORIG");
const TQString &KPrObject::attrX=KGlobal::staticQString("x"); const TQString &KPrObject::attrX=TDEGlobal::staticQString("x");
const TQString &KPrObject::attrY=KGlobal::staticQString("y"); const TQString &KPrObject::attrY=TDEGlobal::staticQString("y");
const TQString &KPrObject::tagSIZE=KGlobal::staticQString("SIZE"); const TQString &KPrObject::tagSIZE=TDEGlobal::staticQString("SIZE");
const TQString &KPrObject::attrWidth=KGlobal::staticQString("width"); const TQString &KPrObject::attrWidth=TDEGlobal::staticQString("width");
const TQString &KPrObject::attrHeight=KGlobal::staticQString("height"); const TQString &KPrObject::attrHeight=TDEGlobal::staticQString("height");
const TQString &KPrObject::tagSHADOW=KGlobal::staticQString("SHADOW"); const TQString &KPrObject::tagSHADOW=TDEGlobal::staticQString("SHADOW");
const TQString &KPrObject::attrDistance=KGlobal::staticQString("distance"); const TQString &KPrObject::attrDistance=TDEGlobal::staticQString("distance");
const TQString &KPrObject::attrDirection=KGlobal::staticQString("direction"); const TQString &KPrObject::attrDirection=TDEGlobal::staticQString("direction");
const TQString &KPrObject::attrColor=KGlobal::staticQString("color"); const TQString &KPrObject::attrColor=TDEGlobal::staticQString("color");
const TQString &KPrObject::tagEFFECTS=KGlobal::staticQString("EFFECTS"); const TQString &KPrObject::tagEFFECTS=TDEGlobal::staticQString("EFFECTS");
const TQString &KPrObject::attrEffect=KGlobal::staticQString("effect"); const TQString &KPrObject::attrEffect=TDEGlobal::staticQString("effect");
const TQString &KPrObject::attrEffect2=KGlobal::staticQString("effect2"); const TQString &KPrObject::attrEffect2=TDEGlobal::staticQString("effect2");
const TQString &KPrObject::tagPRESNUM=KGlobal::staticQString("PRESNUM"); const TQString &KPrObject::tagPRESNUM=TDEGlobal::staticQString("PRESNUM");
const TQString &KPrObject::tagANGLE=KGlobal::staticQString("ANGLE"); const TQString &KPrObject::tagANGLE=TDEGlobal::staticQString("ANGLE");
const TQString &KPrObject::tagDISAPPEAR=KGlobal::staticQString("DISAPPEAR"); const TQString &KPrObject::tagDISAPPEAR=TDEGlobal::staticQString("DISAPPEAR");
const TQString &KPrObject::attrDoit=KGlobal::staticQString("doit"); const TQString &KPrObject::attrDoit=TDEGlobal::staticQString("doit");
const TQString &KPrObject::attrNum=KGlobal::staticQString("num"); const TQString &KPrObject::attrNum=TDEGlobal::staticQString("num");
const TQString &KPrObject::tagFILLTYPE=KGlobal::staticQString("FILLTYPE"); const TQString &KPrObject::tagFILLTYPE=TDEGlobal::staticQString("FILLTYPE");
const TQString &KPrObject::tagGRADIENT=KGlobal::staticQString("GRADIENT"); const TQString &KPrObject::tagGRADIENT=TDEGlobal::staticQString("GRADIENT");
const TQString &KPrObject::tagPEN=KGlobal::staticQString("PEN"); const TQString &KPrObject::tagPEN=TDEGlobal::staticQString("PEN");
const TQString &KPrObject::tagBRUSH=KGlobal::staticQString("BRUSH"); const TQString &KPrObject::tagBRUSH=TDEGlobal::staticQString("BRUSH");
const TQString &KPrObject::attrValue=KGlobal::staticQString("value"); const TQString &KPrObject::attrValue=TDEGlobal::staticQString("value");
const TQString &KPrObject::attrC1=KGlobal::staticQString("color1"); const TQString &KPrObject::attrC1=TDEGlobal::staticQString("color1");
const TQString &KPrObject::attrC2=KGlobal::staticQString("color2"); const TQString &KPrObject::attrC2=TDEGlobal::staticQString("color2");
const TQString &KPrObject::attrType=KGlobal::staticQString("type"); const TQString &KPrObject::attrType=TDEGlobal::staticQString("type");
const TQString &KPrObject::attrUnbalanced=KGlobal::staticQString("unbalanced"); const TQString &KPrObject::attrUnbalanced=TDEGlobal::staticQString("unbalanced");
const TQString &KPrObject::attrXFactor=KGlobal::staticQString("xfactor"); const TQString &KPrObject::attrXFactor=TDEGlobal::staticQString("xfactor");
const TQString &KPrObject::attrYFactor=KGlobal::staticQString("yfactor"); const TQString &KPrObject::attrYFactor=TDEGlobal::staticQString("yfactor");
const TQString &KPrObject::attrStyle=KGlobal::staticQString("style"); const TQString &KPrObject::attrStyle=TDEGlobal::staticQString("style");
KPrStartEndLine::KPrStartEndLine( LineEnd _start, LineEnd _end ) KPrStartEndLine::KPrStartEndLine( LineEnd _start, LineEnd _end )
: lineBegin( _start ), lineEnd( _end ) : lineBegin( _start ), lineEnd( _end )

@ -239,7 +239,7 @@ void KPrSlideTransitionDia::slotRequesterClicked( KURLRequester * )
m_dialog->soundRequester->fileDialog()->setFilter( filter ); m_dialog->soundRequester->fileDialog()->setFilter( filter );
// find the first "sound"-resource that contains files // find the first "sound"-resource that contains files
TQStringList soundDirs = KGlobal::dirs()->resourceDirs( "sound" ); TQStringList soundDirs = TDEGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) { if ( !soundDirs.isEmpty() ) {
KURL soundURL; KURL soundURL;
TQDir dir; TQDir dir;

@ -77,33 +77,33 @@ using namespace std;
#undef S_NONE // Solaris defines it in sys/signal.h #undef S_NONE // Solaris defines it in sys/signal.h
const TQString &KPrTextObject::tagTEXTOBJ=KGlobal::staticQString("TEXTOBJ"); const TQString &KPrTextObject::tagTEXTOBJ=TDEGlobal::staticQString("TEXTOBJ");
const TQString &KPrTextObject::attrLineSpacing=KGlobal::staticQString("lineSpacing"); const TQString &KPrTextObject::attrLineSpacing=TDEGlobal::staticQString("lineSpacing");
const TQString &KPrTextObject::attrParagSpacing=KGlobal::staticQString("paragSpacing"); const TQString &KPrTextObject::attrParagSpacing=TDEGlobal::staticQString("paragSpacing");
const TQString &KPrTextObject::attrMargin=KGlobal::staticQString("margin"); const TQString &KPrTextObject::attrMargin=TDEGlobal::staticQString("margin");
const TQString &KPrTextObject::attrBulletType1=KGlobal::staticQString("bulletType1"); const TQString &KPrTextObject::attrBulletType1=TDEGlobal::staticQString("bulletType1");
const TQString &KPrTextObject::attrBulletType2=KGlobal::staticQString("bulletType2"); const TQString &KPrTextObject::attrBulletType2=TDEGlobal::staticQString("bulletType2");
const TQString &KPrTextObject::attrBulletType3=KGlobal::staticQString("bulletType3"); const TQString &KPrTextObject::attrBulletType3=TDEGlobal::staticQString("bulletType3");
const TQString &KPrTextObject::attrBulletType4=KGlobal::staticQString("bulletType4"); const TQString &KPrTextObject::attrBulletType4=TDEGlobal::staticQString("bulletType4");
const TQString &KPrTextObject::attrBulletColor1=KGlobal::staticQString("bulletColor1"); const TQString &KPrTextObject::attrBulletColor1=TDEGlobal::staticQString("bulletColor1");
const TQString &KPrTextObject::attrBulletColor2=KGlobal::staticQString("bulletColor2"); const TQString &KPrTextObject::attrBulletColor2=TDEGlobal::staticQString("bulletColor2");
const TQString &KPrTextObject::attrBulletColor3=KGlobal::staticQString("bulletColor3"); const TQString &KPrTextObject::attrBulletColor3=TDEGlobal::staticQString("bulletColor3");
const TQString &KPrTextObject::attrBulletColor4=KGlobal::staticQString("bulletColor4"); const TQString &KPrTextObject::attrBulletColor4=TDEGlobal::staticQString("bulletColor4");
const TQString &KPrTextObject::tagP=KGlobal::staticQString("P"); const TQString &KPrTextObject::tagP=TDEGlobal::staticQString("P");
const TQString &KPrTextObject::attrAlign=KGlobal::staticQString("align"); const TQString &KPrTextObject::attrAlign=TDEGlobal::staticQString("align");
const TQString &KPrTextObject::attrType=KGlobal::staticQString("type"); const TQString &KPrTextObject::attrType=TDEGlobal::staticQString("type");
const TQString &KPrTextObject::attrDepth=KGlobal::staticQString("depth"); const TQString &KPrTextObject::attrDepth=TDEGlobal::staticQString("depth");
const TQString &KPrTextObject::tagTEXT=KGlobal::staticQString("TEXT"); const TQString &KPrTextObject::tagTEXT=TDEGlobal::staticQString("TEXT");
const TQString &KPrTextObject::attrFamily=KGlobal::staticQString("family"); const TQString &KPrTextObject::attrFamily=TDEGlobal::staticQString("family");
const TQString &KPrTextObject::attrPointSize=KGlobal::staticQString("pointSize"); const TQString &KPrTextObject::attrPointSize=TDEGlobal::staticQString("pointSize");
const TQString &KPrTextObject::attrBold=KGlobal::staticQString("bold"); const TQString &KPrTextObject::attrBold=TDEGlobal::staticQString("bold");
const TQString &KPrTextObject::attrItalic=KGlobal::staticQString("italic"); const TQString &KPrTextObject::attrItalic=TDEGlobal::staticQString("italic");
const TQString &KPrTextObject::attrUnderline=KGlobal::staticQString("underline"); const TQString &KPrTextObject::attrUnderline=TDEGlobal::staticQString("underline");
const TQString &KPrTextObject::attrStrikeOut=KGlobal::staticQString("strikeOut"); const TQString &KPrTextObject::attrStrikeOut=TDEGlobal::staticQString("strikeOut");
const TQString &KPrTextObject::attrColor=KGlobal::staticQString("color"); const TQString &KPrTextObject::attrColor=TDEGlobal::staticQString("color");
const TQString &KPrTextObject::attrWhitespace=KGlobal::staticQString("whitespace"); const TQString &KPrTextObject::attrWhitespace=TDEGlobal::staticQString("whitespace");
const TQString &KPrTextObject::attrTextBackColor=KGlobal::staticQString("textbackcolor"); const TQString &KPrTextObject::attrTextBackColor=TDEGlobal::staticQString("textbackcolor");
const TQString &KPrTextObject::attrVertAlign=KGlobal::staticQString("VERTALIGN"); const TQString &KPrTextObject::attrVertAlign=TDEGlobal::staticQString("VERTALIGN");
KPrTextObject::KPrTextObject( KPrDocument *doc ) KPrTextObject::KPrTextObject( KPrDocument *doc )

@ -403,7 +403,7 @@ void KPrTransEffectDia::slotRequesterClicked( KURLRequester * )
requester->fileDialog()->setFilter( filter ); requester->fileDialog()->setFilter( filter );
// find the first "sound"-resource that contains files // find the first "sound"-resource that contains files
TQStringList soundDirs = KGlobal::dirs()->resourceDirs( "sound" ); TQStringList soundDirs = TDEGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) { if ( !soundDirs.isEmpty() ) {
KURL soundURL; KURL soundURL;
TQDir dir; TQDir dir;

@ -457,12 +457,12 @@ KPrView::~KPrView()
delete m_findReplace; delete m_findReplace;
m_findReplace = 0L; m_findReplace = 0L;
if(sidebar) { if(sidebar) {
KConfig *config=KGlobal::config(); KConfig *config=TDEGlobal::config();
config->setGroup("Global"); config->setGroup("Global");
config->writeEntry("Sidebar", sidebar->isVisible()); config->writeEntry("Sidebar", sidebar->isVisible());
} }
if(notebar) { if(notebar) {
KConfig *config=KGlobal::config(); KConfig *config=TDEGlobal::config();
config->setGroup("Global"); config->setGroup("Global");
config->writeEntry("Notebar", notebar->isVisible()); config->writeEntry("Notebar", notebar->isVisible());
} }
@ -1506,12 +1506,12 @@ void KPrView::startScreenPres( int pgNum /*1-based*/ )
if ( m_canvas && !presStarted ) { if ( m_canvas && !presStarted ) {
const TQString xdgScreenSaver = KStandardDirs::findExe("xdg-screensaver"); const TQString xdgScreenSaver = KStandardDirs::findExe("xdg-screensaver");
if (!xdgScreenSaver.isEmpty()) { if (!xdgScreenSaver.isEmpty()) {
KProcess proc; TDEProcess proc;
proc << xdgScreenSaver; proc << xdgScreenSaver;
proc << "suspend"; proc << "suspend";
proc << TQString::number( topLevelWidget()->winId() ); proc << TQString::number( topLevelWidget()->winId() );
kdDebug() << k_funcinfo << proc.args() << endl; kdDebug() << k_funcinfo << proc.args() << endl;
proc.start( KProcess::DontCare ); proc.start( TDEProcess::DontCare );
} else { } else {
TQByteArray data; TQByteArray data;
TQByteArray replyData; TQByteArray replyData;
@ -1548,7 +1548,7 @@ void KPrView::startScreenPres( int pgNum /*1-based*/ )
deSelectAllObjects(); deSelectAllObjects();
presStarted = true; presStarted = true;
m_autoPresRestart = false; m_autoPresRestart = false;
TQRect desk = KGlobalSettings::desktopGeometry(this); TQRect desk = TDEGlobalSettings::desktopGeometry(this);
kdDebug(33001) << "KPrView::startScreenPres desk=" << desk << endl; kdDebug(33001) << "KPrView::startScreenPres desk=" << desk << endl;
TQRect pgRect = kPresenterDoc()->pageList().at(0)->getZoomPageRect(); TQRect pgRect = kPresenterDoc()->pageList().at(0)->getZoomPageRect();
kdDebug(33001) << "KPrView::startScreenPres pgRect=" << pgRect << endl; kdDebug(33001) << "KPrView::startScreenPres pgRect=" << pgRect << endl;
@ -1630,12 +1630,12 @@ void KPrView::screenStop()
const TQString xdgScreenSaver = KStandardDirs::findExe("xdg-screensaver"); const TQString xdgScreenSaver = KStandardDirs::findExe("xdg-screensaver");
if (!xdgScreenSaver.isEmpty()) { if (!xdgScreenSaver.isEmpty()) {
KProcess proc; TDEProcess proc;
proc << xdgScreenSaver; proc << xdgScreenSaver;
proc << "resume"; proc << "resume";
proc << TQString::number( topLevelWidget()->winId() ); proc << TQString::number( topLevelWidget()->winId() );
kdDebug() << k_funcinfo << proc.args() << endl; kdDebug() << k_funcinfo << proc.args() << endl;
proc.start( KProcess::DontCare ); proc.start( TDEProcess::DontCare );
} else { } else {
if ( m_screenSaverWasEnabled ) if ( m_screenSaverWasEnabled )
{ {
@ -2231,7 +2231,7 @@ void KPrView::createGUI()
{ {
sidebar->outline()->setCurrentItem( sidebar->outline()->firstChild() ); sidebar->outline()->setCurrentItem( sidebar->outline()->firstChild() );
sidebar->outline()->setSelected( sidebar->outline()->firstChild(), TRUE ); sidebar->outline()->setSelected( sidebar->outline()->firstChild(), TRUE );
KConfig *config=KGlobal::config(); KConfig *config=TDEGlobal::config();
config->setGroup("Global"); config->setGroup("Global");
if(!config->readBoolEntry("Sidebar", true)) { if(!config->readBoolEntry("Sidebar", true)) {
sidebar->hide(); sidebar->hide();
@ -2242,7 +2242,7 @@ void KPrView::createGUI()
if ( notebar ) if ( notebar )
{ {
KConfig *config=KGlobal::config(); KConfig *config=TDEGlobal::config();
config->setGroup("Global"); config->setGroup("Global");
if(!config->readBoolEntry("Notebar", true)) { if(!config->readBoolEntry("Notebar", true)) {
notebar->hide(); notebar->hide();
@ -5414,7 +5414,7 @@ void KPrView::pddClosed()
TQString KPrView::presentationDurationDataFormatChange( int _time ) TQString KPrView::presentationDurationDataFormatChange( int _time )
{ {
TQTime time( 0, 0, 0 ); TQTime time( 0, 0, 0 );
return KGlobal::locale()->formatTime( time.addMSecs( _time ), true, true ); return TDEGlobal::locale()->formatTime( time.addMSecs( _time ), true, true );
} }
@ -6463,7 +6463,7 @@ void KPrView::documentModified( bool b )
return; return;
if ( b ) if ( b )
m_sbModifiedLabel->setPixmap( KGlobal::iconLoader()->loadIcon( "action-modified", KIcon::Small ) ); m_sbModifiedLabel->setPixmap( TDEGlobal::iconLoader()->loadIcon( "action-modified", KIcon::Small ) );
else else
m_sbModifiedLabel->setText( " " ); m_sbModifiedLabel->setText( " " );
} }

@ -387,7 +387,7 @@ void KPrWebPresentation::writeStartOfHeader(TQTextStream& streamOut, TQTextCodec
void KPrWebPresentation::createSlidesHTML( KProgress *progressBar ) void KPrWebPresentation::createSlidesHTML( KProgress *progressBar )
{ {
TQTextCodec *codec = KGlobal::charsets()->codecForName( m_encoding ); TQTextCodec *codec = TDEGlobal::charsets()->codecForName( m_encoding );
const TQString brtag ( "<br" + TQString(isXML()?" /":"") + ">" ); const TQString brtag ( "<br" + TQString(isXML()?" /":"") + ">" );
@ -511,7 +511,7 @@ void KPrWebPresentation::createSlidesHTML( KProgress *progressBar )
else else
htmlAuthor=TQString("<a href=\"mailto:%1\">%2</a>").arg( escapeHtmlText( codec, email )).arg( escapeHtmlText( codec, author )); htmlAuthor=TQString("<a href=\"mailto:%1\">%2</a>").arg( escapeHtmlText( codec, email )).arg( escapeHtmlText( codec, author ));
streamOut << EscapeEncodingOnly ( codec, i18n( "Created on %1 by <i>%2</i> with <a href=\"http://www.koffice.org/kpresenter\">KPresenter</a>" ) streamOut << EscapeEncodingOnly ( codec, i18n( "Created on %1 by <i>%2</i> with <a href=\"http://www.koffice.org/kpresenter\">KPresenter</a>" )
.arg( KGlobal::locale()->formatDate ( TQDate::currentDate() ) ).arg( htmlAuthor ) ); .arg( TDEGlobal::locale()->formatDate ( TQDate::currentDate() ) ).arg( htmlAuthor ) );
streamOut << " </center><hr noshade=\"noshade\"" << ( isXML() ?" /":"") << ">\n"; streamOut << " </center><hr noshade=\"noshade\"" << ( isXML() ?" /":"") << ">\n";
} }
@ -530,7 +530,7 @@ void KPrWebPresentation::createSlidesHTML( KProgress *progressBar )
void KPrWebPresentation::createMainPage( KProgress *progressBar ) void KPrWebPresentation::createMainPage( KProgress *progressBar )
{ {
TQTextCodec *codec = KGlobal::charsets()->codecForName( m_encoding ); TQTextCodec *codec = TDEGlobal::charsets()->codecForName( m_encoding );
KTempFile tmp; KTempFile tmp;
TQString dest = TQString( "%1/index.html" ).arg( path ); TQString dest = TQString( "%1/index.html" ).arg( path );
TQFile file( tmp.name() ); TQFile file( tmp.name() );
@ -562,7 +562,7 @@ void KPrWebPresentation::createMainPage( KProgress *progressBar )
TQString htmlAuthor = email.isEmpty() ? escapeHtmlText( codec, author ) : TQString htmlAuthor = email.isEmpty() ? escapeHtmlText( codec, author ) :
TQString("<a href=\"mailto:%1\">%2</a>").arg( escapeHtmlText( codec, email )).arg( escapeHtmlText( codec, author )); TQString("<a href=\"mailto:%1\">%2</a>").arg( escapeHtmlText( codec, email )).arg( escapeHtmlText( codec, author ));
streamOut << EscapeEncodingOnly ( codec, i18n( "Created on %1 by <i>%2</i> with <a href=\"http://www.koffice.org/kpresenter\">KPresenter</a>" ) streamOut << EscapeEncodingOnly ( codec, i18n( "Created on %1 by <i>%2</i> with <a href=\"http://www.koffice.org/kpresenter\">KPresenter</a>" )
.arg( KGlobal::locale()->formatDate ( TQDate::currentDate() ) ).arg( htmlAuthor ) ); .arg( TDEGlobal::locale()->formatDate ( TQDate::currentDate() ) ).arg( htmlAuthor ) );
streamOut << "</body>\n</html>\n"; streamOut << "</body>\n</html>\n";
file.close(); file.close();
@ -605,7 +605,7 @@ void KPrWebPresentation::init()
textColor = TQt::black; textColor = TQt::black;
titleColor = TQt::red; titleColor = TQt::red;
path = KGlobalSettings::documentPath() + "www"; path = TDEGlobalSettings::documentPath() + "www";
zoom = 100; zoom = 100;
@ -802,12 +802,12 @@ void KPrWebPresentationWizard::setupPage2()
// Fill encoding combo // Fill encoding combo
// Stolen from tdelibs/kate/part/katedialogs.cpp // Stolen from tdelibs/kate/part/katedialogs.cpp
TQStringList encodings(KGlobal::charsets()->descriptiveEncodingNames()); TQStringList encodings(TDEGlobal::charsets()->descriptiveEncodingNames());
int idx = 0; int idx = 0;
for (uint i = 0; i < encodings.count(); i++) for (uint i = 0; i < encodings.count(); i++)
{ {
bool found = false; bool found = false;
TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(encodings[i]), found); TQTextCodec *codecForEnc = TDEGlobal::charsets()->codecForName(TDEGlobal::charsets()->encodingForName(encodings[i]), found);
if (found) if (found)
{ {
encoding->insertItem(encodings[i]); encoding->insertItem(encodings[i]);
@ -1060,7 +1060,7 @@ void KPrWebPresentationWizard::finish()
webPres.setLoopSlides( loopSlides->isChecked() ); webPres.setLoopSlides( loopSlides->isChecked() );
webPres.setXML( doctype->currentItem() != 0 ); webPres.setXML( doctype->currentItem() != 0 );
bool found = false; bool found = false;
TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(KGlobal::charsets()->encodingForName(encoding->currentText()), found); TQTextCodec *codecForEnc = TDEGlobal::charsets()->codecForName(TDEGlobal::charsets()->encodingForName(encoding->currentText()), found);
if ( found ) if ( found )
{ {
webPres.setEncoding( codecForEnc->name() ); webPres.setEncoding( codecForEnc->name() );

@ -234,7 +234,7 @@ FormulaDialog::FormulaDialog( View* parent, const char* name,const TQString& for
} }
// Add auto completion. // Add auto completion.
searchFunct->setCompletionMode( KGlobalSettings::CompletionAuto ); searchFunct->setCompletionMode( TDEGlobalSettings::CompletionAuto );
searchFunct->setCompletionObject( &listFunct, true ); searchFunct->setCompletionObject( &listFunct, true );
if( functions->currentItem() == -1 ) if( functions->currentItem() == -1 )

@ -504,28 +504,28 @@ void miscParameters::slotTextComboChanged(const TQString &)
void miscParameters::initComboBox() void miscParameters::initComboBox()
{ {
KGlobalSettings::Completion tmpCompletion=KGlobalSettings::CompletionAuto; TDEGlobalSettings::Completion tmpCompletion=TDEGlobalSettings::CompletionAuto;
if( config->hasGroup("Parameters" )) if( config->hasGroup("Parameters" ))
{ {
config->setGroup( "Parameters" ); config->setGroup( "Parameters" );
tmpCompletion=( KGlobalSettings::Completion)config->readNumEntry( "Completion Mode" ,KGlobalSettings::CompletionAuto) ; tmpCompletion=( TDEGlobalSettings::Completion)config->readNumEntry( "Completion Mode" ,TDEGlobalSettings::CompletionAuto) ;
config->writeEntry( "Completion Mode", (int)tmpCompletion); config->writeEntry( "Completion Mode", (int)tmpCompletion);
} }
switch(tmpCompletion ) switch(tmpCompletion )
{ {
case KGlobalSettings::CompletionNone: case TDEGlobalSettings::CompletionNone:
typeCompletion->setCurrentItem(0); typeCompletion->setCurrentItem(0);
break; break;
case KGlobalSettings::CompletionAuto: case TDEGlobalSettings::CompletionAuto:
typeCompletion->setCurrentItem(3); typeCompletion->setCurrentItem(3);
break; break;
case KGlobalSettings::CompletionMan: case TDEGlobalSettings::CompletionMan:
typeCompletion->setCurrentItem(4); typeCompletion->setCurrentItem(4);
break; break;
case KGlobalSettings::CompletionShell: case TDEGlobalSettings::CompletionShell:
typeCompletion->setCurrentItem(1); typeCompletion->setCurrentItem(1);
break; break;
case KGlobalSettings::CompletionPopup: case TDEGlobalSettings::CompletionPopup:
typeCompletion->setCurrentItem(2); typeCompletion->setCurrentItem(2);
break; break;
default : default :
@ -609,24 +609,24 @@ void miscParameters::apply()
} }
config->setGroup( "Parameters" ); config->setGroup( "Parameters" );
KGlobalSettings::Completion tmpCompletion=KGlobalSettings::CompletionNone; TDEGlobalSettings::Completion tmpCompletion=TDEGlobalSettings::CompletionNone;
switch(typeCompletion->currentItem()) switch(typeCompletion->currentItem())
{ {
case 0: case 0:
tmpCompletion=KGlobalSettings::CompletionNone; tmpCompletion=TDEGlobalSettings::CompletionNone;
break; break;
case 1: case 1:
tmpCompletion=KGlobalSettings::CompletionShell; tmpCompletion=TDEGlobalSettings::CompletionShell;
break; break;
case 2: case 2:
tmpCompletion=KGlobalSettings::CompletionPopup; tmpCompletion=TDEGlobalSettings::CompletionPopup;
break; break;
case 3: case 3:
tmpCompletion=KGlobalSettings::CompletionAuto; tmpCompletion=TDEGlobalSettings::CompletionAuto;
break; break;
case 4: case 4:
tmpCompletion=KGlobalSettings::CompletionMan; tmpCompletion=TDEGlobalSettings::CompletionMan;
break; break;
} }

@ -1191,7 +1191,7 @@ Value Formula::eval() const
} }
else else
{ {
parser = new ValueParser( KGlobal::locale() ); parser = new ValueParser( TDEGlobal::locale() );
converter = new ValueConverter( parser ); converter = new ValueConverter( parser );
calc = new ValueCalc( converter ); calc = new ValueCalc( converter );
} }

@ -2762,7 +2762,7 @@ void Canvas::keyPressEvent ( TQKeyEvent * _ev )
(_ev->key() != Key_Home) && (_ev->key() != Key_Home) &&
(_ev->key() != Key_Enter) && (_ev->key() != Key_Enter) &&
(_ev->key() != Key_Return) && (_ev->key() != Key_Return) &&
(_ev->key() != KGlobalSettings::contextMenuKey())) (_ev->key() != TDEGlobalSettings::contextMenuKey()))
{ {
TQWidget::keyPressEvent( _ev ); TQWidget::keyPressEvent( _ev );
return; return;
@ -2773,7 +2773,7 @@ void Canvas::keyPressEvent ( TQKeyEvent * _ev )
_ev->accept(); _ev->accept();
d->view->doc()->emitBeginOperation(false); d->view->doc()->emitBeginOperation(false);
if ( _ev->key() == KGlobalSettings::contextMenuKey() ) { if ( _ev->key() == TDEGlobalSettings::contextMenuKey() ) {
int row = markerRow(); int row = markerRow();
int col = markerColumn(); int col = markerColumn();
KoPoint kop(sheet->columnPos(col, this), sheet->rowPos(row, this)); KoPoint kop(sheet->columnPos(col, this), sheet->rowPos(row, this));
@ -5738,7 +5738,7 @@ void HBorder::paintSizeIndicator( int mouseX, bool firstTime )
TQString tmpSize; TQString tmpSize;
if ( m_iResizePos != x ) if ( m_iResizePos != x )
tmpSize = i18n("Width: %1 %2") tmpSize = i18n("Width: %1 %2")
.arg( KGlobal::locale()->formatNumber( KoUnit::toUserValue( m_pCanvas->doc()->unzoomItX( (sheet->layoutDirection()==Sheet::RightToLeft) ? x - m_iResizePos : m_iResizePos - x ), .arg( TDEGlobal::locale()->formatNumber( KoUnit::toUserValue( m_pCanvas->doc()->unzoomItX( (sheet->layoutDirection()==Sheet::RightToLeft) ? x - m_iResizePos : m_iResizePos - x ),
m_pView->doc()->unit() ))) m_pView->doc()->unit() )))
.arg( m_pView->doc()->unitName() ); .arg( m_pView->doc()->unitName() );
else else

@ -144,7 +144,7 @@ public:
bool showTabBar:1; bool showTabBar:1;
bool showFormulaBar:1; bool showFormulaBar:1;
bool showError:1; bool showError:1;
KGlobalSettings::Completion completionMode; TDEGlobalSettings::Completion completionMode;
KSpread::MoveTo moveTo; KSpread::MoveTo moveTo;
MethodOfCalc calcMethod; MethodOfCalc calcMethod;
bool delayCalculation:1; bool delayCalculation:1;
@ -239,7 +239,7 @@ Doc::Doc( TQWidget *parentWidget, const char *widgetName, TQObject* parent, cons
d->showError = false; d->showError = false;
d->calcMethod = SumOfNumber; d->calcMethod = SumOfNumber;
d->moveTo = KSpread::Bottom; d->moveTo = KSpread::Bottom;
d->completionMode = KGlobalSettings::CompletionAuto; d->completionMode = TDEGlobalSettings::CompletionAuto;
d->spellConfig = 0; d->spellConfig = 0;
d->dontCheckUpperWord = false; d->dontCheckUpperWord = false;
d->dontCheckTitleCase = false; d->dontCheckTitleCase = false;
@ -1349,7 +1349,7 @@ bool Doc::showHorizontalScrollBar()const
return d->horizontalScrollBar; return d->horizontalScrollBar;
} }
KGlobalSettings::Completion Doc::completionMode( ) const TDEGlobalSettings::Completion Doc::completionMode( ) const
{ {
return d->completionMode; return d->completionMode;
} }
@ -1384,7 +1384,7 @@ TQColor Doc::gridColor() const
return d->gridColor; return d->gridColor;
} }
void Doc::setCompletionMode( KGlobalSettings::Completion complMode) void Doc::setCompletionMode( TDEGlobalSettings::Completion complMode)
{ {
d->completionMode= complMode; d->completionMode= complMode;
} }

@ -377,8 +377,8 @@ public:
* completion mode * completion mode
*/ */
KGlobalSettings::Completion completionMode( )const ; TDEGlobalSettings::Completion completionMode( )const ;
void setCompletionMode( KGlobalSettings::Completion _complMode); void setCompletionMode( TDEGlobalSettings::Completion _complMode);
KSpread::MoveTo getMoveToValue()const; KSpread::MoveTo getMoveToValue()const;
void setMoveToValue(KSpread::MoveTo _moveTo) ; void setMoveToValue(KSpread::MoveTo _moveTo) ;

@ -531,7 +531,7 @@ CellEditor::CellEditor( Cell* _cell, Canvas* _parent, bool captureAllKeyEvents,
//TODO - Custom KTextEdit class which supports text completion //TODO - Custom KTextEdit class which supports text completion
/* /*
d->textEdit->setFrame( false ); d->textEdit->setFrame( false );
d->textEdit->setCompletionMode((KGlobalSettings::Completion)canvas()->view()->doc()->completionMode() ); d->textEdit->setCompletionMode((TDEGlobalSettings::Completion)canvas()->view()->doc()->completionMode() );
d->textEdit->setCompletionObject( &canvas()->view()->doc()->completion(),true ); d->textEdit->setCompletionObject( &canvas()->view()->doc()->completion(),true );
*/ */
setFocusProxy( d->textEdit ); setFocusProxy( d->textEdit );
@ -540,7 +540,7 @@ CellEditor::CellEditor( Cell* _cell, Canvas* _parent, bool captureAllKeyEvents,
connect( d->textEdit, TQT_SIGNAL( cursorPositionChanged(TQTextCursor*) ), this, TQT_SLOT (slotTextCursorChanged(TQTextCursor*))); connect( d->textEdit, TQT_SIGNAL( cursorPositionChanged(TQTextCursor*) ), this, TQT_SLOT (slotTextCursorChanged(TQTextCursor*)));
connect( d->textEdit, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( slotTextChanged() ) ); connect( d->textEdit, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( slotTextChanged() ) );
// connect( d->textEdit, TQT_SIGNAL(completionModeChanged( KGlobalSettings::Completion )),this,TQT_SLOT (slotCompletionModeChanged(KGlobalSettings::Completion))); // connect( d->textEdit, TQT_SIGNAL(completionModeChanged( TDEGlobalSettings::Completion )),this,TQT_SLOT (slotCompletionModeChanged(TDEGlobalSettings::Completion)));
// A choose should always start at the edited cell // A choose should always start at the edited cell
// canvas()->setChooseMarkerRow( canvas()->markerRow() ); // canvas()->setChooseMarkerRow( canvas()->markerRow() );
@ -840,7 +840,7 @@ void CellEditor::setEditorFont(TQFont const & font, bool updateSize)
} }
} }
void CellEditor::slotCompletionModeChanged(KGlobalSettings::Completion _completion) void CellEditor::slotCompletionModeChanged(TDEGlobalSettings::Completion _completion)
{ {
canvas()->view()->doc()->setCompletionMode( _completion ); canvas()->view()->doc()->setCompletionMode( _completion );
} }
@ -1304,7 +1304,7 @@ LocationEditWidget::LocationEditWidget( TQWidget * _parent,
m_pView(_view) m_pView(_view)
{ {
setCompletionObject( &completionList,true ); setCompletionObject( &completionList,true );
setCompletionMode(KGlobalSettings::CompletionAuto ); setCompletionMode(TDEGlobalSettings::CompletionAuto );
} }
void LocationEditWidget::addCompletionItem( const TQString &_item ) void LocationEditWidget::addCompletionItem( const TQString &_item )

@ -214,7 +214,7 @@ public:
private slots: private slots:
void slotTextChanged(); void slotTextChanged();
void slotCompletionModeChanged(KGlobalSettings::Completion _completion); void slotCompletionModeChanged(TDEGlobalSettings::Completion _completion);
void slotCursorPositionChanged(int para,int pos); void slotCursorPositionChanged(int para,int pos);
void slotTextCursorChanged(TQTextCursor*); void slotTextCursorChanged(TQTextCursor*);

@ -36,7 +36,7 @@ Factory::Factory( TQObject* parent, const char* name )
: KoFactory( parent, name ) : KoFactory( parent, name )
{ {
//kdDebug(36001) << "Factory::Factory()" << endl; //kdDebug(36001) << "Factory::Factory()" << endl;
// Create our instance, so that it becomes KGlobal::instance if the // Create our instance, so that it becomes TDEGlobal::instance if the
// main app is KSpread. // main app is KSpread.
(void)global(); (void)global();
(void)dcopObject(); (void)dcopObject();

@ -718,16 +718,16 @@ static TQString func_create_complex( double real,double imag )
TQString tmp,tmp2; TQString tmp,tmp2;
if(imag ==0) if(imag ==0)
{ {
return KGlobal::locale()->formatNumber( real); return TDEGlobal::locale()->formatNumber( real);
} }
if(real!=0) if(real!=0)
tmp=KGlobal::locale()->formatNumber(real); tmp=TDEGlobal::locale()->formatNumber(real);
else else
return KGlobal::locale()->formatNumber(imag)+"i"; return TDEGlobal::locale()->formatNumber(imag)+"i";
if (imag >0) if (imag >0)
tmp=tmp+"+"+KGlobal::locale()->formatNumber(imag)+"i"; tmp=tmp+"+"+TDEGlobal::locale()->formatNumber(imag)+"i";
else else
tmp=tmp+KGlobal::locale()->formatNumber(imag)+"i"; tmp=tmp+TDEGlobal::locale()->formatNumber(imag)+"i";
return tmp; return tmp;
} }
@ -741,7 +741,7 @@ Value func_complex (valVector args, ValueCalc *calc, FuncExtra *)
double im = calc->conv()->asFloat (args[1]).asFloat (); double im = calc->conv()->asFloat (args[1]).asFloat ();
TQString tmp=func_create_complex (re, im); TQString tmp=func_create_complex (re, im);
bool ok; bool ok;
double result = KGlobal::locale()->readNumber(tmp, &ok); double result = TDEGlobal::locale()->readNumber(tmp, &ok);
if (ok) if (ok)
return Value (result); return Value (result);
return Value (tmp); return Value (tmp);
@ -779,7 +779,7 @@ else if( tmp.length()==2 )
else if(tmp[0].isDigit()) else if(tmp[0].isDigit())
{ //5i { //5i
ok=true; ok=true;
return KGlobal::locale()->readNumber(tmp.left(1)); return TDEGlobal::locale()->readNumber(tmp.left(1));
} }
else else
{ {
@ -805,7 +805,7 @@ else
else else
{ {
tmpStr=tmp.mid(pos2,(pos1-pos2)); tmpStr=tmp.mid(pos2,(pos1-pos2));
val=KGlobal::locale()->readNumber(tmpStr, &ok); val=TDEGlobal::locale()->readNumber(tmpStr, &ok);
if(!ok) if(!ok)
val=0; val=0;
return val; return val;
@ -821,7 +821,7 @@ else
else else
{ {
tmpStr=tmp.mid(pos2,(pos1-pos2)); tmpStr=tmp.mid(pos2,(pos1-pos2));
val=KGlobal::locale()->readNumber(tmpStr, &ok); val=TDEGlobal::locale()->readNumber(tmpStr, &ok);
if(!ok) if(!ok)
val=0; val=0;
return val; return val;
@ -830,7 +830,7 @@ else
else else
{//15.55i {//15.55i
tmpStr=tmp.left(pos1); tmpStr=tmp.left(pos1);
val=KGlobal::locale()->readNumber(tmpStr, &ok); val=TDEGlobal::locale()->readNumber(tmpStr, &ok);
if(!ok) if(!ok)
val=0; val=0;
return val; return val;
@ -861,7 +861,7 @@ TQString tmp=str;
TQString tmpStr; TQString tmpStr;
if((pos1=tmp.find('i'))==-1) if((pos1=tmp.find('i'))==-1)
{ //12.5 { //12.5
val=KGlobal::locale()->readNumber(tmp, &ok); val=TDEGlobal::locale()->readNumber(tmp, &ok);
if(!ok) if(!ok)
val=0; val=0;
return val; return val;
@ -871,7 +871,7 @@ else
if((pos2=tmp.findRev('-'))!=-1 && pos2!=0) if((pos2=tmp.findRev('-'))!=-1 && pos2!=0)
{ {
tmpStr=tmp.left(pos2); tmpStr=tmp.left(pos2);
val=KGlobal::locale()->readNumber(tmpStr, &ok); val=TDEGlobal::locale()->readNumber(tmpStr, &ok);
if(!ok) if(!ok)
val=0; val=0;
return val; return val;
@ -879,7 +879,7 @@ else
else if((pos2=tmp.findRev('+'))!=-1) else if((pos2=tmp.findRev('+'))!=-1)
{ {
tmpStr=tmp.left(pos2); tmpStr=tmp.left(pos2);
val=KGlobal::locale()->readNumber(tmpStr, &ok); val=TDEGlobal::locale()->readNumber(tmpStr, &ok);
if(!ok) if(!ok)
val=0; val=0;
return val; return val;
@ -959,7 +959,7 @@ Value func_imsum (valVector args, ValueCalc *calc, FuncExtra *)
bool ok; bool ok;
TQString res = calc->conv()->asString (result).asString(); TQString res = calc->conv()->asString (result).asString();
double val=KGlobal::locale()->readNumber(res, &ok); double val=TDEGlobal::locale()->readNumber(res, &ok);
if (ok) if (ok)
return Value (val); return Value (val);
return Value (result); return Value (result);
@ -973,7 +973,7 @@ Value func_imsub (valVector args, ValueCalc *calc, FuncExtra *)
bool ok; bool ok;
TQString res = calc->conv()->asString (result).asString(); TQString res = calc->conv()->asString (result).asString();
double val=KGlobal::locale()->readNumber(res, &ok); double val=TDEGlobal::locale()->readNumber(res, &ok);
if (ok) if (ok)
return Value (val); return Value (val);
return Value (result); return Value (result);
@ -987,7 +987,7 @@ Value func_improduct (valVector args, ValueCalc *calc, FuncExtra *)
bool ok; bool ok;
TQString res = calc->conv()->asString (result).asString(); TQString res = calc->conv()->asString (result).asString();
double val=KGlobal::locale()->readNumber(res, &ok); double val=TDEGlobal::locale()->readNumber(res, &ok);
if (ok) if (ok)
return Value (val); return Value (val);
return Value (result); return Value (result);
@ -1001,7 +1001,7 @@ Value func_imdiv (valVector args, ValueCalc *calc, FuncExtra *)
bool ok; bool ok;
TQString res = calc->conv()->asString (result).asString(); TQString res = calc->conv()->asString (result).asString();
double val=KGlobal::locale()->readNumber(res, &ok); double val=TDEGlobal::locale()->readNumber(res, &ok);
if (ok) if (ok)
return Value (val); return Value (val);
return Value (result); return Value (result);
@ -1021,7 +1021,7 @@ Value func_imconjugate (valVector args, ValueCalc *calc, FuncExtra *)
tmp=func_create_complex(real,-imag); tmp=func_create_complex(real,-imag);
double result=KGlobal::locale()->readNumber(tmp, &ok); double result=TDEGlobal::locale()->readNumber(tmp, &ok);
if(ok) if(ok)
return Value (result); return Value (result);
@ -1079,7 +1079,7 @@ Value func_imcos (valVector args, ValueCalc *calc, FuncExtra *)
tmp=func_create_complex(real_res,-imag_res); tmp=func_create_complex(real_res,-imag_res);
double result=KGlobal::locale()->readNumber(tmp, &ok); double result=TDEGlobal::locale()->readNumber(tmp, &ok);
if(ok) if(ok)
return Value (result); return Value (result);
@ -1103,7 +1103,7 @@ Value func_imsin (valVector args, ValueCalc *calc, FuncExtra *)
tmp=func_create_complex(real_res,imag_res); tmp=func_create_complex(real_res,imag_res);
double result=KGlobal::locale()->readNumber(tmp, &ok); double result=TDEGlobal::locale()->readNumber(tmp, &ok);
if(ok) if(ok)
return Value (result); return Value (result);
@ -1127,7 +1127,7 @@ Value func_imln (valVector args, ValueCalc *calc, FuncExtra *)
double imag_res=atan(imag/real); double imag_res=atan(imag/real);
tmp=func_create_complex(real_res,imag_res); tmp=func_create_complex(real_res,imag_res);
double result=KGlobal::locale()->readNumber(tmp, &ok); double result=TDEGlobal::locale()->readNumber(tmp, &ok);
if(ok) if(ok)
return Value (result); return Value (result);
@ -1151,7 +1151,7 @@ Value func_imexp (valVector args, ValueCalc *calc, FuncExtra *)
tmp=func_create_complex(real_res,imag_res); tmp=func_create_complex(real_res,imag_res);
double result=KGlobal::locale()->readNumber(tmp, &ok); double result=TDEGlobal::locale()->readNumber(tmp, &ok);
if(ok) if(ok)
return Value (result); return Value (result);
@ -1177,7 +1177,7 @@ Value func_imsqrt (valVector args, ValueCalc *calc, FuncExtra *)
tmp=func_create_complex(real_res,imag_res); tmp=func_create_complex(real_res,imag_res);
double result=KGlobal::locale()->readNumber(tmp, &ok); double result=TDEGlobal::locale()->readNumber(tmp, &ok);
if(ok) if(ok)
return Value (result); return Value (result);
@ -1205,7 +1205,7 @@ Value func_impower (valVector args, ValueCalc *calc, FuncExtra *)
tmp=func_create_complex(real_res,imag_res); tmp=func_create_complex(real_res,imag_res);
double result=KGlobal::locale()->readNumber(tmp, &ok); double result=TDEGlobal::locale()->readNumber(tmp, &ok);
if(ok) if(ok)
return Value (result); return Value (result);

@ -586,8 +586,8 @@ static TQString convertDateFormat( const TQString& date )
FormatType Style::dateType( const TQString &_format ) FormatType Style::dateType( const TQString &_format )
{ {
const TQString dateFormatShort = convertDateFormat( KGlobal::locale()->dateFormatShort() ); const TQString dateFormatShort = convertDateFormat( TDEGlobal::locale()->dateFormatShort() );
const TQString dateFormat = convertDateFormat( KGlobal::locale()->dateFormat() ); const TQString dateFormat = convertDateFormat( TDEGlobal::locale()->dateFormat() );
if ( _format == "dd-MMM-yy" ) if ( _format == "dd-MMM-yy" )
return date_format1; return date_format1;
@ -899,11 +899,11 @@ TQString Style::saveOasisStyleNumericDate( KoGenStyles&mainStyles, FormatType _s
{ {
//TODO fixme use locale of kspread and not kglobal //TODO fixme use locale of kspread and not kglobal
case ShortDate_format: case ShortDate_format:
format = KGlobal::locale()->dateFormatShort(); format = TDEGlobal::locale()->dateFormatShort();
locale = true; locale = true;
break; break;
case TextDate_format: case TextDate_format:
format = KGlobal::locale()->dateFormat(); format = TDEGlobal::locale()->dateFormat();
locale = true; locale = true;
break; break;
case date_format1: case date_format1:

@ -114,7 +114,7 @@ TQDomElement KSpread::util_createElement( const TQString & tagName, const TQFont
e.setAttribute( "underline", "yes" ); e.setAttribute( "underline", "yes" );
if ( font.strikeOut() ) if ( font.strikeOut() )
e.setAttribute( "strikeout", "yes" ); e.setAttribute( "strikeout", "yes" );
//e.setAttribute( "charset", KGlobal::charsets()->name( font ) ); //e.setAttribute( "charset", TDEGlobal::charsets()->name( font ) );
return e; return e;
} }
@ -157,11 +157,11 @@ TQFont KSpread::util_toFont( TQDomElement & element )
/* Uncomment when charset is added to kspread_dlg_layout /* Uncomment when charset is added to kspread_dlg_layout
+ save a document-global charset + save a document-global charset
if ( element.hasAttribute( "charset" ) ) if ( element.hasAttribute( "charset" ) )
KGlobal::charsets()->setTQFont( f, element.attribute("charset") ); TDEGlobal::charsets()->setTQFont( f, element.attribute("charset") );
else else
*/ */
// ######## Not needed anymore in 3.0? // ######## Not needed anymore in 3.0?
//KGlobal::charsets()->setTQFont( f, KGlobal::locale()->charset() ); //TDEGlobal::charsets()->setTQFont( f, TDEGlobal::locale()->charset() );
return f; return f;
} }

@ -2110,7 +2110,7 @@ void View::initConfig()
doc()->setShowColHeader(config->readBoolEntry("Column Header",true)); doc()->setShowColHeader(config->readBoolEntry("Column Header",true));
doc()->setShowRowHeader(config->readBoolEntry("Row Header",true)); doc()->setShowRowHeader(config->readBoolEntry("Row Header",true));
if ( !doc()->configLoadFromFile() ) if ( !doc()->configLoadFromFile() )
doc()->setCompletionMode((KGlobalSettings::Completion)config->readNumEntry("Completion Mode",(int)(KGlobalSettings::CompletionAuto))); doc()->setCompletionMode((TDEGlobalSettings::Completion)config->readNumEntry("Completion Mode",(int)(TDEGlobalSettings::CompletionAuto)));
doc()->setMoveToValue((KSpread::MoveTo)config->readNumEntry("Move",(int)(Bottom))); doc()->setMoveToValue((KSpread::MoveTo)config->readNumEntry("Move",(int)(Bottom)));
doc()->setIndentValue( config->readDoubleNumEntry( "Indent", 10.0 ) ); doc()->setIndentValue( config->readDoubleNumEntry( "Indent", 10.0 ) );
doc()->setTypeOfCalc((MethodOfCalc)config->readNumEntry("Method of Calc",(int)(SumOfNumber))); doc()->setTypeOfCalc((MethodOfCalc)config->readNumEntry("Method of Calc",(int)(SumOfNumber)));

@ -58,7 +58,7 @@ TQtCalculator :: TQtCalculator( Calculator *_corba, TQWidget *parent, const char
readSettings(); readSettings();
TQFont buttonfont( KGlobalSettings::generalFont() ); TQFont buttonfont( TDEGlobalSettings::generalFont() );
buttonfont.setStyleStrategy( TQFont::PreferAntialias ); buttonfont.setStyleStrategy( TQFont::PreferAntialias );
// Set the window caption/title // Set the window caption/title
@ -1587,7 +1587,7 @@ void TQtCalculator::readSettings()
TQColor tmpC(189, 255, 180); TQColor tmpC(189, 255, 180);
TQColor blackC(0,0,0); TQColor blackC(0,0,0);
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("CalcPlugin"); config->setGroup("CalcPlugin");
kcalcdefaults.forecolor = config->readColorEntry("ForeColor", &blackC); kcalcdefaults.forecolor = config->readColorEntry("ForeColor", &blackC);
kcalcdefaults.backcolor = config->readColorEntry("BackColor", &tmpC); kcalcdefaults.backcolor = config->readColorEntry("BackColor", &tmpC);
@ -1606,7 +1606,7 @@ void TQtCalculator::readSettings()
void TQtCalculator::writeSettings() void TQtCalculator::writeSettings()
{ {
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
config->setGroup("CalcPlugin"); config->setGroup("CalcPlugin");
config->writeEntry("ForeColor",kcalcdefaults.forecolor); config->writeEntry("ForeColor",kcalcdefaults.forecolor);

@ -83,7 +83,7 @@ Calculator::Calculator( View* parent, const char* name )
m_calc = 0; m_calc = 0;
m_view = parent; m_view = parent;
KGlobal::locale()->insertCatalogue("kspreadcalc_calc"); TDEGlobal::locale()->insertCatalogue("kspreadcalc_calc");
parent->installEventFilter( this ); parent->installEventFilter( this );
(void)new KAction( i18n("Calculator"), SmallIcon("kcalc", CalcFactory::global()), (void)new KAction( i18n("Calculator"), SmallIcon("kcalc", CalcFactory::global()),

@ -109,7 +109,7 @@ int Band::isInHolder( const TQPoint p )
void Band::drawHolders( TQPainter &painter ) void Band::drawHolders( TQPainter &painter )
{ {
painter.setPen( TQColor( 0, 0, 0 ) ); painter.setPen( TQColor( 0, 0, 0 ) );
painter.setBrush( KGlobalSettings::highlightColor() ); painter.setBrush( TDEGlobalSettings::highlightColor() );
painter.drawRect( bottomMiddleResizableRect() ); painter.drawRect( bottomMiddleResizableRect() );
} }

@ -145,7 +145,7 @@ void ReportItem::drawHolders( TQPainter &painter )
{ {
painter.setPen( TQColor( 0, 0, 0 ) ); painter.setPen( TQColor( 0, 0, 0 ) );
painter.setBrush( KGlobalSettings::highlightColor() ); painter.setBrush( TDEGlobalSettings::highlightColor() );
TQCanvasItemList list = collisions( false ); TQCanvasItemList list = collisions( false );
TQCanvasItemList::iterator it = list.begin(); TQCanvasItemList::iterator it = list.begin();

@ -78,7 +78,7 @@ void SelectionRect::draw( TQPainter & painter )
mp.convertFromImage(im, TQt::OrderedAlphaDither); mp.convertFromImage(im, TQt::OrderedAlphaDither);
kdDebug(31000) << "creating brush" << endl; kdDebug(31000) << "creating brush" << endl;
TQBrush br(KGlobalSettings::highlightColor(),TQt::CustomPattern); TQBrush br(TDEGlobalSettings::highlightColor(),TQt::CustomPattern);
br.setPixmap(mp); br.setPixmap(mp);
painter.setBrush(br); painter.setBrush(br);
} }

@ -1779,7 +1779,7 @@ bool KWCanvas::eventFilter( TQObject *o, TQEvent *e )
// out of document window. Disabled because it conflicts with Shift+Tab inside a table. // out of document window. Disabled because it conflicts with Shift+Tab inside a table.
// else if ( keyev->key() == TQt::Key_BackTab ) // else if ( keyev->key() == TQt::Key_BackTab )
// return FALSE; // return FALSE;
else if ( keyev->key() == KGlobalSettings::contextMenuKey() ) { else if ( keyev->key() == TDEGlobalSettings::contextMenuKey() ) {
// The popups are not available in readonly mode, since the GUI isn't built... // The popups are not available in readonly mode, since the GUI isn't built...
if(!m_doc->isReadWrite()) return TRUE; if(!m_doc->isReadWrite()) return TRUE;
if (m_mouseMode != MM_EDIT) return TRUE; if (m_mouseMode != MM_EDIT) return TRUE;

@ -155,7 +155,7 @@ KoTextCursor * KWPasteTextCommand::execute( KoTextCursor *c )
TQDomElement formatElem = layout.namedItem( "FORMAT" ).toElement(); TQDomElement formatElem = layout.namedItem( "FORMAT" ).toElement();
if ( !formatElem.isNull() ) if ( !formatElem.isNull() )
{ {
KoTextFormat f = parag->loadFormat( formatElem, 0L, TQFont(), KGlobal::locale()->language(),false ); KoTextFormat f = parag->loadFormat( formatElem, 0L, TQFont(), TDEGlobal::locale()->language(),false );
KoTextFormat * defaultFormat = doc->formatCollection()->format( &f ); KoTextFormat * defaultFormat = doc->formatCollection()->format( &f );
// Last paragraph (i.e. only one in all) : some of the text might be from before the paste // Last paragraph (i.e. only one in all) : some of the text might be from before the paste
int endIndex = (item == count-1) ? c->index() : parag->string()->length() - 1; int endIndex = (item == count-1) ? c->index() : parag->string()->length() - 1;

@ -74,7 +74,7 @@ using namespace KSpell2;
// little helper stolen from kmail // little helper stolen from kmail
// (Note: KDialogBase should have version of the methods that take a TQString for the icon name) // (Note: KDialogBase should have version of the methods that take a TQString for the icon name)
static inline TQPixmap loadIcon( const char * name ) { static inline TQPixmap loadIcon( const char * name ) {
return KGlobal::instance()->iconLoader() return TDEGlobal::instance()->iconLoader()
->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium ); ->loadIcon( TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium );
} }
@ -911,7 +911,7 @@ void ConfigureDefaultDocPage::slotDefault()
m_tabStopWidth->setValue( MM_TO_POINT(15) ); m_tabStopWidth->setValue( MM_TO_POINT(15) );
m_createBackupFile->setChecked( true ); m_createBackupFile->setChecked( true );
// m_directInsertCursor->setChecked( false ); // m_directInsertCursor->setChecked( false );
m_globalLanguage->setCurrentText( KoGlobal::languageFromTag( KGlobal::locale()->language() ) ); m_globalLanguage->setCurrentText( KoGlobal::languageFromTag( TDEGlobal::locale()->language() ) );
m_autoHyphenation->setChecked( false ); m_autoHyphenation->setChecked( false );
} }

@ -721,22 +721,22 @@ KWDocStructRootItem::KWDocStructRootItem(TQListView* parent, const TQString& tex
{ {
switch ( type ) { switch ( type ) {
case Arrangement: { case Arrangement: {
setPixmap( 0, KGlobal::iconLoader()->loadIcon( "tree_arrange", KIcon::Small ) ); setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "tree_arrange", KIcon::Small ) );
} break; } break;
case TextFrames: { case TextFrames: {
setPixmap( 0, KGlobal::iconLoader()->loadIcon( "frame_text", KIcon::Small ) ); setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "frame_text", KIcon::Small ) );
} break; } break;
case FormulaFrames: { case FormulaFrames: {
setPixmap( 0, KGlobal::iconLoader()->loadIcon( "frame_formula", KIcon::Small ) ); setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "frame_formula", KIcon::Small ) );
}break; }break;
case Tables: { case Tables: {
setPixmap( 0, KGlobal::iconLoader()->loadIcon( "inline_table", KIcon::Small ) ); setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "inline_table", KIcon::Small ) );
} break; } break;
case Pictures: { case Pictures: {
setPixmap( 0, KGlobal::iconLoader()->loadIcon( "frame_image", KIcon::Small ) ); setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "frame_image", KIcon::Small ) );
} break; } break;
case Embedded: { case Embedded: {
setPixmap( 0, KGlobal::iconLoader()->loadIcon( "frame_query", KIcon::Small ) ); setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "frame_query", KIcon::Small ) );
} break; } break;
} }
} }
@ -1199,7 +1199,7 @@ KWDocStruct::KWDocStruct(TQWidget* parent, KWDocument* doc, KWGUI* gui)
KToolBarButton* eraseButton = new KToolBarButton( "locationbar_erase", 0, searchBar ); KToolBarButton* eraseButton = new KToolBarButton( "locationbar_erase", 0, searchBar );
m_tree = new KWDocStructTree( this, doc, gui ); m_tree = new KWDocStructTree( this, doc, gui );
m_tree->setAlternateBackground( KGlobalSettings::alternateBackgroundColor() ); m_tree->setAlternateBackground( TDEGlobalSettings::alternateBackgroundColor() );
KListViewSearchLine* searchLine = new KListViewSearchLine( searchBar, m_tree ); KListViewSearchLine* searchLine = new KListViewSearchLine( searchBar, m_tree );
searchBar->setStretchableWidget( searchLine ); searchBar->setStretchableWidget( searchLine );
connect( eraseButton, TQT_SIGNAL( clicked() ), searchLine, TQT_SLOT( clear() ) ); connect( eraseButton, TQT_SIGNAL( clicked() ), searchLine, TQT_SLOT( clear() ) );

@ -213,7 +213,7 @@ KWDocument::KWDocument(TQWidget *parentWidget, const char *widname, TQObject* pa
m_bHasEndNotes = false; m_bHasEndNotes = false;
m_bInsertDirectCursor=false; m_bInsertDirectCursor=false;
m_globalLanguage = KGlobal::locale()->language(); m_globalLanguage = TDEGlobal::locale()->language();
m_bGlobalHyphenation = false; m_bGlobalHyphenation = false;
m_bGeneratingPreview = false; m_bGeneratingPreview = false;
m_viewModeType="ModeNormal"; m_viewModeType="ModeNormal";
@ -366,7 +366,7 @@ void KWDocument::initConfig()
m_bShowDocStruct = false; // off by default for embedded docs, but still toggleable m_bShowDocStruct = false; // off by default for embedded docs, but still toggleable
m_pgUpDownMovesCaret = config->readBoolEntry( "PgUpDownMovesCaret", true ); m_pgUpDownMovesCaret = config->readBoolEntry( "PgUpDownMovesCaret", true );
m_bInsertDirectCursor= config->readBoolEntry( "InsertDirectCursor", false ); m_bInsertDirectCursor= config->readBoolEntry( "InsertDirectCursor", false );
m_globalLanguage=config->readEntry("language", KGlobal::locale()->language()); m_globalLanguage=config->readEntry("language", TDEGlobal::locale()->language());
m_bGlobalHyphenation=config->readBoolEntry("hyphenation", false); m_bGlobalHyphenation=config->readBoolEntry("hyphenation", false);
setShowGrid( config->readBoolEntry( "ShowGrid" , false )); setShowGrid( config->readBoolEntry( "ShowGrid" , false ));
@ -2068,8 +2068,8 @@ void KWDocument::loadDefaultFrameStyleTemplates()
{ {
const TQString fsfileName( locate("data", "kword/framestyles.xml") ); const TQString fsfileName( locate("data", "kword/framestyles.xml") );
kdDebug(30003) << "Data directory: " << KGlobal::dirs()->resourceDirs( "data" ) << endl; kdDebug(30003) << "Data directory: " << TDEGlobal::dirs()->resourceDirs( "data" ) << endl;
kdDebug(30003) << "Directory searched: " << KGlobal::dirs()->resourceDirs( "data" ) << endl; kdDebug(30003) << "Directory searched: " << TDEGlobal::dirs()->resourceDirs( "data" ) << endl;
kdDebug(30003) << "File framestyles.xml searched at: " << fsfileName << endl; kdDebug(30003) << "File framestyles.xml searched at: " << fsfileName << endl;
m_frameStyleColl->setDefault( true ); m_frameStyleColl->setDefault( true );

@ -31,7 +31,7 @@ TDEAboutData* KWFactory::s_aboutData = 0;
KWFactory::KWFactory( TQObject* parent, const char* name ) KWFactory::KWFactory( TQObject* parent, const char* name )
: KoFactory( parent, name ) : KoFactory( parent, name )
{ {
// Create our instance, so that it becomes KGlobal::instance if the // Create our instance, so that it becomes TDEGlobal::instance if the
// main app is KWord. // main app is KWord.
(void) instance(); (void) instance();
} }

@ -110,7 +110,7 @@ void KWStatisticsDialog::slotRefreshValue(bool state)
void KWStatisticsDialog::calcGeneral( TQLabel **resultLabel ) void KWStatisticsDialog::calcGeneral( TQLabel **resultLabel )
{ {
KLocale *locale = KGlobal::locale(); KLocale *locale = TDEGlobal::locale();
resultLabel[0]->setText( locale->formatNumber( m_doc->pageCount(), 0) ); resultLabel[0]->setText( locale->formatNumber( m_doc->pageCount(), 0) );
int table =0; int table =0;
@ -194,7 +194,7 @@ bool KWStatisticsDialog::calcStats( TQLabel **resultLabel, bool selection, bool
} }
// assign results // assign results
KLocale *locale = KGlobal::locale(); KLocale *locale = TDEGlobal::locale();
resultLabel[0]->setText( locale->formatNumber( charsWithSpace, 0) ); resultLabel[0]->setText( locale->formatNumber( charsWithSpace, 0) );
resultLabel[1]->setText( locale->formatNumber( charsWithoutSpace, 0 ) ); resultLabel[1]->setText( locale->formatNumber( charsWithoutSpace, 0 ) );
resultLabel[2]->setText( locale->formatNumber( syllables, 0 ) ); resultLabel[2]->setText( locale->formatNumber( syllables, 0 ) );

@ -53,7 +53,7 @@ KWTableStylePreview::KWTableStylePreview( const TQString& title, const TQString&
{ {
m_zoomHandler = new KoTextZoomHandler; m_zoomHandler = new KoTextZoomHandler;
TQFont font = KoGlobal::defaultFont(); TQFont font = KoGlobal::defaultFont();
m_textdoc = new KoTextDocument( m_zoomHandler, new KoTextFormatCollection( font, TQColor(),KGlobal::locale()->language(), false ) ); m_textdoc = new KoTextDocument( m_zoomHandler, new KoTextFormatCollection( font, TQColor(),TDEGlobal::locale()->language(), false ) );
KoTextParag * parag = m_textdoc->firstParag(); KoTextParag * parag = m_textdoc->firstParag();
parag->insert( 0, text ); parag->insert( 0, text );
} }

@ -43,7 +43,7 @@ KWTextDocument::KWTextDocument( KWTextFrameSet * textfs, KoTextFormatCollection
} }
KWTextDocument::KWTextDocument( KoTextZoomHandler * zoomHandler ) KWTextDocument::KWTextDocument( KoTextZoomHandler * zoomHandler )
: KoTextDocument( zoomHandler, new KoTextFormatCollection( KGlobalSettings::generalFont() /*unused*/, TQColor(), KGlobal::locale()->language(), false), 0L, false ), : KoTextDocument( zoomHandler, new KoTextFormatCollection( TDEGlobalSettings::generalFont() /*unused*/, TQColor(), TDEGlobal::locale()->language(), false), 0L, false ),
m_textfs( 0 ) m_textfs( 0 )
{ {
init(); init();

@ -70,7 +70,7 @@ void KWTextParag::drawFormattingChars( TQPainter &painter, int start, int len,
if ( start + len == length() && (whichFormattingChars & FormattingBreak) && hardFrameBreakAfter() ) if ( start + len == length() && (whichFormattingChars & FormattingBreak) && hardFrameBreakAfter() )
{ {
painter.save(); painter.save();
TQPen pen( KGlobalSettings::linkColor() ); // #101820 TQPen pen( TDEGlobalSettings::linkColor() ); // #101820
painter.setPen( pen ); painter.setPen( pen );
//kdDebug() << "KWTextParag::drawFormattingChars start=" << start << " len=" << len << " length=" << length() << endl; //kdDebug() << "KWTextParag::drawFormattingChars start=" << start << " len=" << len << " length=" << length() << endl;
// keep in sync with KWTextFrameSet::formatVertically // keep in sync with KWTextFrameSet::formatVertically

@ -6006,7 +6006,7 @@ void KWView::documentModified( bool b )
return; return;
if ( b ) if ( b )
m_sbModifiedLabel->setPixmap( KGlobal::iconLoader()->loadIcon( "action-modified", KIcon::Small ) ); m_sbModifiedLabel->setPixmap( TDEGlobal::iconLoader()->loadIcon( "action-modified", KIcon::Small ) );
else else
m_sbModifiedLabel->setText( " " ); m_sbModifiedLabel->setText( " " );
} }

@ -198,7 +198,7 @@ TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const
if ( name == "Nick name" ) if ( name == "Nick name" )
return addr.nickName(); return addr.nickName();
if ( name == "Birthday" ) if ( name == "Birthday" )
return KGlobal::locale()->formatDate( addr.birthday().date() ); return TDEGlobal::locale()->formatDate( addr.birthday().date() );
if ( name == "Home address: Street" ) if ( name == "Home address: Street" )
{ {
@ -375,7 +375,7 @@ TQString KWMailMergeKABC::getValue( const TQString &name, int record ) const
if ( name == "productId" ) if ( name == "productId" )
return addr.productId(); return addr.productId();
if ( name == "Revision" ) if ( name == "Revision" )
return KGlobal::locale()->formatDate( addr.revision().date() ); return TDEGlobal::locale()->formatDate( addr.revision().date() );
if ( name == "sortString" ) if ( name == "sortString" )
return addr.sortString(); return addr.sortString();
if ( name == "URL" ) if ( name == "URL" )

@ -436,7 +436,7 @@ void DocumentWrapper::setCommandStack( KoCommandHistory* history )
void DocumentWrapper::createActions( KActionCollection* collection ) void DocumentWrapper::createActions( KActionCollection* collection )
{ {
KGlobal::dirs()->addResourceType( "toolbar", TDEGlobal::dirs()->addResourceType( "toolbar",
KStandardDirs::kde_default("data") + KStandardDirs::kde_default("data") +
"kformula/pics/" ); "kformula/pics/" );

@ -76,12 +76,12 @@ SymbolComboItem::~SymbolComboItem()
int SymbolComboItem::width( const TQListBox * /*lb*/ ) const int SymbolComboItem::width( const TQListBox * /*lb*/ ) const
{ {
return widest + TQFontMetrics( KGlobalSettings::generalFont() ).width( text() ) + 12; return widest + TQFontMetrics( TDEGlobalSettings::generalFont() ).width( text() ) + 12;
} }
int SymbolComboItem::height( const TQListBox * /*lb*/ ) const int SymbolComboItem::height( const TQListBox * /*lb*/ ) const
{ {
int generalHeight = TQFontMetrics( KGlobalSettings::generalFont() ).lineSpacing(); int generalHeight = TQFontMetrics( TDEGlobalSettings::generalFont() ).lineSpacing();
int fontHeight = TQFontMetrics( m_font ).lineSpacing(); int fontHeight = TQFontMetrics( m_font ).lineSpacing();
return TQMAX( generalHeight, fontHeight ) + 2; return TQMAX( generalHeight, fontHeight ) + 2;
} }
@ -93,7 +93,7 @@ void SymbolComboItem::paint( TQPainter *p )
p->drawText( 3, fm.ascent() + fm.leading() / 2, p->drawText( 3, fm.ascent() + fm.leading() / 2,
TQString( "%1" ).arg( TQChar( m_symbol ) ) ); TQString( "%1" ).arg( TQChar( m_symbol ) ) );
p->setFont( KGlobalSettings::generalFont() ); p->setFont( TDEGlobalSettings::generalFont() );
fm = p->fontMetrics(); fm = p->fontMetrics();
p->drawText( widest + 6, height( m_combo->listBox() ) / 2 + fm.strikeOutPos(), m_name ); p->drawText( widest + 6, height( m_combo->listBox() ) / 2 + fm.strikeOutPos(), m_name );
} }

@ -173,11 +173,11 @@ bool KoApplication::start()
kdDebug(30003) << "using full path..." << endl; kdDebug(30003) << "using full path..." << endl;
} else { } else {
TQString desktopName(args->arg(i)); TQString desktopName(args->arg(i));
TQString appName = KGlobal::instance()->instanceName(); TQString appName = TDEGlobal::instance()->instanceName();
paths = KGlobal::dirs()->findAllResources("data", appName +"/templates/*/" + desktopName ); paths = TDEGlobal::dirs()->findAllResources("data", appName +"/templates/*/" + desktopName );
if ( paths.isEmpty()) { if ( paths.isEmpty()) {
paths = KGlobal::dirs()->findAllResources("data", appName +"/templates/" + desktopName ); paths = TDEGlobal::dirs()->findAllResources("data", appName +"/templates/" + desktopName );
} }
if ( paths.isEmpty()) { if ( paths.isEmpty()) {
KMessageBox::error(0L, i18n("No template found for: %1 ").arg(desktopName) ); KMessageBox::error(0L, i18n("No template found for: %1 ").arg(desktopName) );

@ -112,7 +112,7 @@ public:
{ {
m_confirmNonNativeSave[0] = true; m_confirmNonNativeSave[0] = true;
m_confirmNonNativeSave[1] = true; m_confirmNonNativeSave[1] = true;
if ( KGlobal::locale()->measureSystem() == KLocale::Imperial ) { if ( TDEGlobal::locale()->measureSystem() == KLocale::Imperial ) {
m_unit = KoUnit::U_INCH; m_unit = KoUnit::U_INCH;
} else { } else {
m_unit = KoUnit::U_CM; m_unit = KoUnit::U_CM;
@ -168,9 +168,9 @@ public:
KoViewWrapperWidget( TQWidget *parent, const char *name ) KoViewWrapperWidget( TQWidget *parent, const char *name )
: TQWidget( parent, name ) : TQWidget( parent, name )
{ {
KGlobal::locale()->insertCatalogue("koffice"); TDEGlobal::locale()->insertCatalogue("koffice");
// Tell the iconloader about share/apps/koffice/icons // Tell the iconloader about share/apps/koffice/icons
KGlobal::iconLoader()->addAppDir("koffice"); TDEGlobal::iconLoader()->addAppDir("koffice");
m_view = 0L; m_view = 0L;
// Avoid warning from KParts - we'll have the KoView as focus proxy anyway // Avoid warning from KParts - we'll have the KoView as focus proxy anyway
setFocusPolicy( TQ_ClickFocus ); setFocusPolicy( TQ_ClickFocus );

@ -831,7 +831,7 @@ TQString KoDocumentInfoAbout::editingCycles() const
TQString KoDocumentInfoAbout::creationDate() const TQString KoDocumentInfoAbout::creationDate() const
{ {
if ( m_creationDate.isValid() ) if ( m_creationDate.isValid() )
return KGlobal::locale()->formatDateTime( m_creationDate ); return TDEGlobal::locale()->formatDateTime( m_creationDate );
else else
return TQString(); return TQString();
} }
@ -839,7 +839,7 @@ TQString KoDocumentInfoAbout::creationDate() const
TQString KoDocumentInfoAbout::modificationDate() const TQString KoDocumentInfoAbout::modificationDate() const
{ {
if ( m_modificationDate.isValid() ) if ( m_modificationDate.isValid() )
return KGlobal::locale()->formatDateTime( m_modificationDate ); return TDEGlobal::locale()->formatDateTime( m_modificationDate );
else else
return TQString(); return TQString();
} }

@ -191,7 +191,7 @@ void KoDocumentInfoDlg::deleteInfo()
void KoDocumentInfoDlg::resetMetaData() void KoDocumentInfoDlg::resetMetaData()
{ {
TQString s = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ); TQString s = TDEGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() );
d->m_aboutWidget->labelCreated->setText( s + ", " + d->m_info->creator() ); d->m_aboutWidget->labelCreated->setText( s + ", " + d->m_info->creator() );
d->m_aboutWidget->labelModified->setText( "" ); d->m_aboutWidget->labelModified->setText( "" );
d->m_aboutWidget->labelRevision->setText( "0" ); d->m_aboutWidget->labelRevision->setText( "0" );
@ -202,9 +202,9 @@ void KoDocumentInfoDlg::addAuthorPage( KoDocumentInfoAuthor *authorInfo )
{ {
TQVBox *page = d->m_dialog->addVBoxPage( i18n( "Author" ) ); TQVBox *page = d->m_dialog->addVBoxPage( i18n( "Author" ) );
d->m_authorWidget = new KoDocumentInfoAuthorWidget( page ); d->m_authorWidget = new KoDocumentInfoAuthorWidget( page );
d->m_authorWidget->labelAuthor->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 48 ) ); d->m_authorWidget->labelAuthor->setPixmap( TDEGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 48 ) );
d->m_authorWidget->pbLoadKABC->setIconSet( TQIconSet( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Small ) ) ); d->m_authorWidget->pbLoadKABC->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Small ) ) );
d->m_authorWidget->pbDelete->setIconSet( TQIconSet( KGlobal::iconLoader()->loadIcon( "eraser", KIcon::Small ) ) ); d->m_authorWidget->pbDelete->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "eraser", KIcon::Small ) ) );
d->m_authorWidget->leFullName->setText( authorInfo->fullName() ); d->m_authorWidget->leFullName->setText( authorInfo->fullName() );
d->m_authorWidget->leInitial->setText( authorInfo->initial() ); d->m_authorWidget->leInitial->setText( authorInfo->initial() );
@ -256,7 +256,7 @@ void KoDocumentInfoDlg::addAboutPage( KoDocumentInfoAbout *aboutInfo )
{ {
TQVBox *page = d->m_dialog->addVBoxPage( i18n( "General" ) ); TQVBox *page = d->m_dialog->addVBoxPage( i18n( "General" ) );
d->m_aboutWidget = new KoDocumentInfoAboutWidget( page ); d->m_aboutWidget = new KoDocumentInfoAboutWidget( page );
d->m_aboutWidget->pbReset->setIconSet( TQIconSet( KGlobal::iconLoader()->loadIcon( "reload", KIcon::Small ) ) ); d->m_aboutWidget->pbReset->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "reload", KIcon::Small ) ) );
KoDocument* doc = dynamic_cast< KoDocument* >( d->m_info->parent() ); KoDocument* doc = dynamic_cast< KoDocument* >( d->m_info->parent() );
if ( doc ) if ( doc )
{ {
@ -302,7 +302,7 @@ void KoDocumentInfoDlg::addUserMetadataPage( KoDocumentInfoUserMetadata *userMet
TQString name = it.key(); TQString name = it.key();
TQString value = it.data(); TQString value = it.data();
KListViewItem* it = new KListViewItem( d->m_metaWidget->metaListView, name, value ); KListViewItem* it = new KListViewItem( d->m_metaWidget->metaListView, name, value );
it->setPixmap( 0, KGlobal::iconLoader()->loadIcon( "text", KIcon::Small ) ); it->setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "text", KIcon::Small ) );
} }
} }

@ -51,15 +51,15 @@ KoGlobal::KoGlobal()
setlocale( LC_NUMERIC, "C" ); setlocale( LC_NUMERIC, "C" );
// Install the libkoffice* translations // Install the libkoffice* translations
KGlobal::locale()->insertCatalogue("koffice"); TDEGlobal::locale()->insertCatalogue("koffice");
KImageIO::registerFormats(); KImageIO::registerFormats();
// Tell KStandardDirs about the koffice prefix // Tell KStandardDirs about the koffice prefix
KGlobal::dirs()->addPrefix(PREFIX); TDEGlobal::dirs()->addPrefix(PREFIX);
// Tell the iconloader about share/apps/koffice/icons // Tell the iconloader about share/apps/koffice/icons
KGlobal::iconLoader()->addAppDir("koffice"); TDEGlobal::iconLoader()->addAppDir("koffice");
// Another way to get the DPI of the display would be TQPaintDeviceMetrics, // Another way to get the DPI of the display would be TQPaintDeviceMetrics,
// but we have no widget here (and moving this to KoView wouldn't allow // but we have no widget here (and moving this to KoView wouldn't allow
@ -80,7 +80,7 @@ KoGlobal::~KoGlobal()
TQFont KoGlobal::_defaultFont() TQFont KoGlobal::_defaultFont()
{ {
TQFont font = KGlobalSettings::generalFont(); TQFont font = TDEGlobalSettings::generalFont();
// we have to use TQFontInfo, in case the font was specified with a pixel size // we have to use TQFontInfo, in case the font was specified with a pixel size
if ( font.pointSize() == -1 ) if ( font.pointSize() == -1 )
{ {
@ -135,7 +135,7 @@ void KoGlobal::createListOfLanguages()
// Many of them are already in all_languages but all_languages doesn't // Many of them are already in all_languages but all_languages doesn't
// currently have en_GB or en_US etc. // currently have en_GB or en_US etc.
const TQStringList translationList = KGlobal::dirs()->findAllResources("locale", const TQStringList translationList = TDEGlobal::dirs()->findAllResources("locale",
TQString::fromLatin1("*/entry.desktop")); TQString::fromLatin1("*/entry.desktop"));
for ( TQStringList::ConstIterator it = translationList.begin(); for ( TQStringList::ConstIterator it = translationList.begin();
it != translationList.end(); ++it ) it != translationList.end(); ++it )

@ -33,7 +33,7 @@ class KOFFICECORE_EXPORT KoGlobal
public: public:
/// For KoApplication /// For KoApplication
static void initialize() { static void initialize() {
(void)self(); // I don't want to make KGlobal instances public, so self() is private (void)self(); // I don't want to make TDEGlobal instances public, so self() is private
} }
/** /**
* Return the default font for KOffice programs. * Return the default font for KOffice programs.

@ -201,7 +201,7 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name )
// part's instance! (Simon) // part's instance! (Simon)
TQString doc; TQString doc;
TQStringList allFiles = KGlobal::dirs()->findAllResources( "data", "koffice/koffice_shell.rc" ); TQStringList allFiles = TDEGlobal::dirs()->findAllResources( "data", "koffice/koffice_shell.rc" );
setXMLFile( findMostRecentXMLFile( allFiles, doc ) ); setXMLFile( findMostRecentXMLFile( allFiles, doc ) );
setLocalXMLFile( locateLocal( "data", "koffice/koffice_shell.rc" ) ); setLocalXMLFile( locateLocal( "data", "koffice/koffice_shell.rc" ) );
@ -284,7 +284,7 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name )
d->m_splitViewActionList.append(new KActionSeparator(TQT_TQOBJECT(this))); d->m_splitViewActionList.append(new KActionSeparator(TQT_TQOBJECT(this)));
// Load list of recent files // Load list of recent files
KConfig * config = instance ? instance->config() : KGlobal::config(); KConfig * config = instance ? instance->config() : TDEGlobal::config();
m_recent->loadEntries( config ); m_recent->loadEntries( config );
createShellGUI(); createShellGUI();
@ -293,7 +293,7 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name )
if ( !initialGeometrySet() ) if ( !initialGeometrySet() )
{ {
// Default size // Default size
const int deskWidth = KGlobalSettings::desktopGeometry(this).width(); const int deskWidth = TDEGlobalSettings::desktopGeometry(this).width();
if (deskWidth > 1100) // very big desktop ? if (deskWidth > 1100) // very big desktop ?
resize( 1000, 800 ); resize( 1000, 800 );
if (deskWidth > 850) // big desktop ? if (deskWidth > 850) // big desktop ?
@ -443,7 +443,7 @@ void KoMainWindow::addRecentURL( const KURL& url )
if ( url.isLocalFile() ) if ( url.isLocalFile() )
{ {
TQString path = url.path( -1 ); TQString path = url.path( -1 );
TQStringList tmpDirs = KGlobal::dirs()->resourceDirs( "tmp" ); TQStringList tmpDirs = TDEGlobal::dirs()->resourceDirs( "tmp" );
for ( TQStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it ) for ( TQStringList::Iterator it = tmpDirs.begin() ; ok && it != tmpDirs.end() ; ++it )
if ( path.contains( *it ) ) if ( path.contains( *it ) )
ok = false; // it's in the tmp resource ok = false; // it's in the tmp resource
@ -462,7 +462,7 @@ void KoMainWindow::addRecentURL( const KURL& url )
void KoMainWindow::saveRecentFiles() void KoMainWindow::saveRecentFiles()
{ {
// Save list of recent files // Save list of recent files
KConfig * config = instance() ? instance()->config() : KGlobal::config(); KConfig * config = instance() ? instance()->config() : TDEGlobal::config();
kdDebug(30003) << this << " Saving recent files list into config. instance()=" << instance() << endl; kdDebug(30003) << this << " Saving recent files list into config. instance()=" << instance() << endl;
m_recent->saveEntries( config ); m_recent->saveEntries( config );
config->sync(); config->sync();
@ -478,7 +478,7 @@ void KoMainWindow::saveRecentFiles()
void KoMainWindow::reloadRecentFileList() void KoMainWindow::reloadRecentFileList()
{ {
KConfig * config = instance() ? instance()->config() : KGlobal::config(); KConfig * config = instance() ? instance()->config() : TDEGlobal::config();
m_recent->loadEntries( config ); m_recent->loadEntries( config );
} }
@ -998,8 +998,8 @@ void KoMainWindow::saveWindowSettings()
d->m_windowSizeDirty = false; d->m_windowSizeDirty = false;
// Save toolbar position into the config file of the app, under the doc's instance name // Save toolbar position into the config file of the app, under the doc's instance name
//kdDebug(30003) << "KoMainWindow::closeEvent -> saveMainWindowSettings rootdoc's instance=" << rootDocument()->instance()->instanceName() << endl; //kdDebug(30003) << "KoMainWindow::closeEvent -> saveMainWindowSettings rootdoc's instance=" << rootDocument()->instance()->instanceName() << endl;
saveMainWindowSettings( KGlobal::config(), rootDocument()->instance()->instanceName() ); saveMainWindowSettings( TDEGlobal::config(), rootDocument()->instance()->instanceName() );
KGlobal::config()->sync(); TDEGlobal::config()->sync();
resetAutoSaveSettings(); // Don't let KMainWindow override the good stuff we wrote down resetAutoSaveSettings(); // Don't let KMainWindow override the good stuff we wrote down
} }
} }
@ -1212,7 +1212,7 @@ void KoMainWindow::print(bool quick) {
if ( title.isEmpty() ) { if ( title.isEmpty() ) {
// #139905 - breaks message freeze though // #139905 - breaks message freeze though
//const TQString programName = instance()->aboutData() ? instance()->aboutData()->programName() : instance()->instanceName(); //const TQString programName = instance()->aboutData() ? instance()->aboutData()->programName() : instance()->instanceName();
//title = i18n("%1 unsaved document (%2)").arg(programName).arg(KGlobal::locale()->formatDate(TQDate::currentDate(), true/*short*/)); //title = i18n("%1 unsaved document (%2)").arg(programName).arg(TDEGlobal::locale()->formatDate(TQDate::currentDate(), true/*short*/));
} }
printer.setDocName( title ); printer.setDocName( title );
printer.setDocFileName( fileName ); printer.setDocFileName( fileName );
@ -1275,7 +1275,7 @@ void KoMainWindow::slotConfigureKeys()
void KoMainWindow::slotConfigureToolbars() void KoMainWindow::slotConfigureToolbars()
{ {
if (rootDocument()) if (rootDocument())
saveMainWindowSettings( KGlobal::config(), rootDocument()->instance()->instanceName() ); saveMainWindowSettings( TDEGlobal::config(), rootDocument()->instance()->instanceName() );
KEditToolbar edit(factory(), this); KEditToolbar edit(factory(), this);
connect(&edit,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); connect(&edit,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
(void) edit.exec(); (void) edit.exec();
@ -1284,7 +1284,7 @@ void KoMainWindow::slotConfigureToolbars()
void KoMainWindow::slotNewToolbarConfig() void KoMainWindow::slotNewToolbarConfig()
{ {
if (rootDocument()) if (rootDocument())
applyMainWindowSettings( KGlobal::config(), rootDocument()->instance()->instanceName() ); applyMainWindowSettings( TDEGlobal::config(), rootDocument()->instance()->instanceName() );
KXMLGUIFactory *factory = guiFactory(); KXMLGUIFactory *factory = guiFactory();
// Check if there's an active view // Check if there's an active view
@ -1315,7 +1315,7 @@ void KoMainWindow::slotToolbarToggled( bool toggle )
bar->hide(); bar->hide();
if (rootDocument()) if (rootDocument())
saveMainWindowSettings( KGlobal::config(), rootDocument()->instance()->instanceName() ); saveMainWindowSettings( TDEGlobal::config(), rootDocument()->instance()->instanceName() );
} }
else else
kdWarning(30003) << "slotToolbarToggled : Toolbar " << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() << " not found!" << endl; kdWarning(30003) << "slotToolbarToggled : Toolbar " << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() << " not found!" << endl;

@ -215,7 +215,7 @@ KoFormat KoPageFormat::formatFromString( const TQString & string )
KoFormat KoPageFormat::defaultFormat() KoFormat KoPageFormat::defaultFormat()
{ {
int kprinter = KGlobal::locale()->pageSize(); int kprinter = TDEGlobal::locale()->pageSize();
for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i )
{ {
if ( pageFormatInfo[ i ].kprinter == kprinter ) if ( pageFormatInfo[ i ].kprinter == kprinter )

@ -39,7 +39,7 @@ KoPictureBase::KoPictureBase(void)
// Slow mode can be very slow, especially at high zoom levels -> configurable // Slow mode can be very slow, especially at high zoom levels -> configurable
if ( s_useSlowResizeMode == -1 ) if ( s_useSlowResizeMode == -1 )
{ {
KConfigGroup group( KGlobal::config(), "KOfficeImage" ); KConfigGroup group( TDEGlobal::config(), "KOfficeImage" );
s_useSlowResizeMode = group.readNumEntry( "HighResolution", 1 ); s_useSlowResizeMode = group.readNumEntry( "HighResolution", 1 );
kdDebug(30003) << "HighResolution = " << s_useSlowResizeMode << endl; kdDebug(30003) << "HighResolution = " << s_useSlowResizeMode << endl;
} }

@ -125,7 +125,7 @@ int KoPictureEps::tryScaleWithGhostScript(TQImage &image, const TQSize& size, co
// create GS command line // create GS command line
TQString cmdBuf ( "gs -sOutputFile=" ); TQString cmdBuf ( "gs -sOutputFile=" );
cmdBuf += KProcess::quote(tmpFile.name()); cmdBuf += TDEProcess::quote(tmpFile.name());
cmdBuf += " -q -g"; cmdBuf += " -q -g";
cmdBuf += TQString::number( wantedWidth ); cmdBuf += TQString::number( wantedWidth );
cmdBuf += "x"; cmdBuf += "x";

@ -113,7 +113,7 @@ KoSpeaker::KoSpeaker()
Q_ASSERT(!KSpkr); Q_ASSERT(!KSpkr);
KSpkr = this; KSpkr = this;
d = new KoSpeakerPrivate(); d = new KoSpeakerPrivate();
readConfig(KGlobal::config()); readConfig(TDEGlobal::config());
} }
KoSpeaker::~KoSpeaker() KoSpeaker::~KoSpeaker()
@ -170,7 +170,7 @@ void KoSpeaker::queueSpeech(const TQString& msg, const TQString& langCode /*= TQ
// If no language code given, assume desktop setting. // If no language code given, assume desktop setting.
TQString languageCode = langCode; TQString languageCode = langCode;
if (langCode.isEmpty()) if (langCode.isEmpty())
languageCode = KGlobal::locale()->language(); languageCode = TDEGlobal::locale()->language();
// kdDebug() << "KoSpeaker::queueSpeech:languageCode = " << languageCode << endl; // kdDebug() << "KoSpeaker::queueSpeech:languageCode = " << languageCode << endl;
// If KTTSD version is 0.3.5 or later, we can use the appendText method to submit a // If KTTSD version is 0.3.5 or later, we can use the appendText method to submit a
// single, multi-part text job. Otherwise, must submit separate text jobs. // single, multi-part text job. Otherwise, must submit separate text jobs.

@ -244,7 +244,7 @@ void KoTemplateTree::readGroups() {
void KoTemplateTree::readTemplates() { void KoTemplateTree::readTemplates() {
TQString dontShow = "imperial"; TQString dontShow = "imperial";
if(KGlobal::locale()->pageSize() == TQPrinter::Letter) { if(TDEGlobal::locale()->pageSize() == TQPrinter::Letter) {
dontShow = "metric"; dontShow = "metric";
} }

@ -114,7 +114,7 @@ double KoUnit::ptToUnit( const double ptValue, const Unit unit )
TQString KoUnit::toUserStringValue( double ptValue, Unit unit ) TQString KoUnit::toUserStringValue( double ptValue, Unit unit )
{ {
return KGlobal::locale()->formatNumber( toUserValue( ptValue, unit ) ); return TDEGlobal::locale()->formatNumber( toUserValue( ptValue, unit ) );
} }
double KoUnit::fromUserValue( double value, Unit unit ) double KoUnit::fromUserValue( double value, Unit unit )
@ -142,7 +142,7 @@ double KoUnit::fromUserValue( double value, Unit unit )
double KoUnit::fromUserValue( const TQString& value, Unit unit, bool* ok ) double KoUnit::fromUserValue( const TQString& value, Unit unit, bool* ok )
{ {
return fromUserValue( KGlobal::locale()->readNumber( value, ok ), unit ); return fromUserValue( TDEGlobal::locale()->readNumber( value, ok ), unit );
} }
double KoUnit::parseValue( TQString value, double defaultVal ) double KoUnit::parseValue( TQString value, double defaultVal )

@ -219,7 +219,7 @@ KParts::PartManager *KoView::partManager() const
KAction *KoView::action( const TQDomElement &element ) const KAction *KoView::action( const TQDomElement &element ) const
{ {
static const TQString &attrName = KGlobal::staticQString( "name" ); static const TQString &attrName = TDEGlobal::staticQString( "name" );
TQString name = element.attribute( attrName ); TQString name = element.attribute( attrName );
KAction *act = KXMLGUIClient::action( name.utf8() ); KAction *act = KXMLGUIClient::action( name.utf8() );

@ -203,7 +203,7 @@ double KoRuler::lineDistance() const
/*================================================================*/ /*================================================================*/
void KoRuler::drawHorizontal( TQPainter *_painter ) void KoRuler::drawHorizontal( TQPainter *_painter )
{ {
TQFont font = KGlobalSettings::toolBarFont(); TQFont font = TDEGlobalSettings::toolBarFont();
TQFontMetrics fm( font ); TQFontMetrics fm( font );
resize( width(), TQMAX( fm.height() + 4, 20 ) ); resize( width(), TQMAX( fm.height() + 4, 20 ) );
@ -366,7 +366,7 @@ void KoRuler::drawTabs( TQPainter &_painter )
/*================================================================*/ /*================================================================*/
void KoRuler::drawVertical( TQPainter *_painter ) void KoRuler::drawVertical( TQPainter *_painter )
{ {
TQFont font = KGlobalSettings::toolBarFont(); TQFont font = TDEGlobalSettings::toolBarFont();
TQFontMetrics fm( font ); TQFontMetrics fm( font );
resize( TQMAX( fm.height() + 4, 20 ), height() ); resize( TQMAX( fm.height() + 4, 20 ), height() );
@ -550,7 +550,7 @@ void KoRuler::mousePressEvent( TQMouseEvent *e )
break; break;
case KoTabChooser::TAB_DEC_PNT: case KoTabChooser::TAB_DEC_PNT:
tab.type = T_DEC_PNT; tab.type = T_DEC_PNT;
tab.alignChar = KGlobal::locale()->decimalSymbol()[0]; tab.alignChar = TDEGlobal::locale()->decimalSymbol()[0];
break; break;
default: break; default: break;
} }
@ -1179,7 +1179,7 @@ void KoRuler::slotMenuActivated( int i )
TQSize KoRuler::minimumSizeHint() const TQSize KoRuler::minimumSizeHint() const
{ {
TQSize size; TQSize size;
TQFont font = KGlobalSettings::toolBarFont(); TQFont font = TDEGlobalSettings::toolBarFont();
TQFontMetrics fm( font ); TQFontMetrics fm( font );
size.setWidth( TQMAX( fm.height() + 4, 20 ) ); size.setWidth( TQMAX( fm.height() + 4, 20 ) );

@ -125,7 +125,7 @@ int KoSelectAction::plug(TQWidget* widget, int index)
if ( m_parentCollection ) { if ( m_parentCollection ) {
instance = m_parentCollection->instance(); instance = m_parentCollection->instance();
} else { } else {
instance = KGlobal::instance(); instance = TDEGlobal::instance();
} }
bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this,

@ -376,7 +376,7 @@ void KoTemplateCreateDia::slotSelect() {
return; return;
} }
// ### TODO: do a better remote loading without having to have d->m_tempFile // ### TODO: do a better remote loading without having to have d->m_tempFile
TQString path = KGlobal::iconLoader()->iconPath(name, KIcon::Desktop); TQString path = TDEGlobal::iconLoader()->iconPath(name, KIcon::Desktop);
d->m_customFile = path; d->m_customFile = path;
d->m_customPixmap=TQPixmap(); d->m_customPixmap=TQPixmap();
updatePixmap(); updatePixmap();

@ -727,7 +727,7 @@ void KoToolButton::drawButton(TQPainter *_painter)
qDrawShadeLine( _painter, width() - ARROW_WIDTH - 1, 0, width() - ARROW_WIDTH - 1, height() - 1, colorGroup(), true ); qDrawShadeLine( _painter, width() - ARROW_WIDTH - 1, 0, width() - ARROW_WIDTH - 1, height() - 1, colorGroup(), true );
int dx, dy; int dx, dy;
TQFont tmp_font( KGlobalSettings::toolBarFont() ); TQFont tmp_font( TDEGlobalSettings::toolBarFont() );
TQFontMetrics fm( tmp_font ); TQFontMetrics fm( tmp_font );
TQRect textRect; TQRect textRect;
int textFlags = 0; int textFlags = 0;
@ -796,11 +796,11 @@ void KoToolButton::drawButton(TQPainter *_painter)
// Draw the text at the position given by textRect, and using textFlags // Draw the text at the position given by textRect, and using textFlags
if (!textLabel().isNull() && !textRect.isNull()) { if (!textLabel().isNull() && !textRect.isNull()) {
_painter->setFont( KGlobalSettings::toolBarFont() ); _painter->setFont( TDEGlobalSettings::toolBarFont() );
if ( !isEnabled() ) if ( !isEnabled() )
_painter->setPen( palette().disabled().dark() ); _painter->setPen( palette().disabled().dark() );
else if( KToolBarButton::isRaised() ) else if( KToolBarButton::isRaised() )
_painter->setPen( KGlobalSettings::toolBarHighlightColor() ); _painter->setPen( TDEGlobalSettings::toolBarHighlightColor() );
else else
_painter->setPen( colorGroup().buttonText() ); _painter->setPen( colorGroup().buttonText() );
_painter->drawText( textRect, textFlags, textLabel() ); _painter->drawText( textRect, textFlags, textLabel() );

@ -145,7 +145,7 @@ public:
*/ */
KoToolButton( const TQString& icon, int id, TQWidget* parent, KoToolButton( const TQString& icon, int id, TQWidget* parent,
const char* name = 0L, const TQString& txt = TQString(), const char* name = 0L, const TQString& txt = TQString(),
TDEInstance* _instance = KGlobal::instance() ); TDEInstance* _instance = TDEGlobal::instance() );
/** /**
* Construct a button with an existing pixmap. It is not * Construct a button with an existing pixmap. It is not

@ -90,7 +90,7 @@ KoUnitDoubleValidator::validate( TQString &s, int &pos ) const
TQString KoUnitDoubleBase::getVisibleText( double value ) const TQString KoUnitDoubleBase::getVisibleText( double value ) const
{ {
const TQString num ( TQString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); const TQString num ( TQString( "%1%2").arg( TDEGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) );
kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl; kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl;
return num; return num;
} }
@ -100,11 +100,11 @@ double KoUnitDoubleBase::toDouble( const TQString& str, bool* ok ) const
TQString str2( str ); TQString str2( str );
/* KLocale::readNumber wants the thousand separator exactly at 1000. /* KLocale::readNumber wants the thousand separator exactly at 1000.
But when editing, it might be anywhere. So we need to remove it. */ But when editing, it might be anywhere. So we need to remove it. */
const TQString sep( KGlobal::locale()->thousandsSeparator() ); const TQString sep( TDEGlobal::locale()->thousandsSeparator() );
if ( !sep.isEmpty() ) if ( !sep.isEmpty() )
str2.remove( sep ); str2.remove( sep );
str2.remove( KoUnit::unitName( m_unit ) ); str2.remove( KoUnit::unitName( m_unit ) );
const double dbl = KGlobal::locale()->readNumber( str2, ok ); const double dbl = TDEGlobal::locale()->readNumber( str2, ok );
if ( ok ) if ( ok )
kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << TQString::number( dbl, 'f', 12 ) << endl; kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << TQString::number( dbl, 'f', 12 ) << endl;
else else

@ -249,7 +249,7 @@ int KSelectColorAction::plug( TQWidget* w, int index )
if ( parentCollection() ) if ( parentCollection() )
instance = parentCollection()->instance(); instance = parentCollection()->instance();
else else
instance = KGlobal::instance(); instance = TDEGlobal::instance();
*/ */
id = menu->insertItem( iconSet( KIcon::Small, 0 ), text(), this,//dsweet id = menu->insertItem( iconSet( KIcon::Small, 0 ), text(), this,//dsweet
TQT_SLOT( slotActivated() ), 0, -1, index ); TQT_SLOT( slotActivated() ), 0, -1, index );
@ -285,7 +285,7 @@ int KSelectColorAction::plug( TQWidget* w, int index )
if ( parentCollection() ) if ( parentCollection() )
instance = parentCollection()->instance(); instance = parentCollection()->instance();
else else
instance = KGlobal::instance(); instance = TDEGlobal::instance();
if ( icon().isEmpty() ) // old code using TQIconSet directly if ( icon().isEmpty() ) // old code using TQIconSet directly
{ {

@ -61,7 +61,7 @@ int TKAction::plug(TQWidget* widget, int index)
if ( parentCollection() ) if ( parentCollection() )
instance = parentCollection()->instance(); instance = parentCollection()->instance();
else else
instance = KGlobal::instance(); instance = TDEGlobal::instance();
TKToolBarButton* b = new TKToolBarButton(icon(),plainText(),bar,name(),instance); TKToolBarButton* b = new TKToolBarButton(icon(),plainText(),bar,name(),instance);
// we don't need clicked() and buttonClicked(), do we? // we don't need clicked() and buttonClicked(), do we?

@ -58,7 +58,7 @@ public:
m_disabledIconName = TQString(); m_disabledIconName = TQString();
m_defaultIconName = TQString(); m_defaultIconName = TQString();
m_instance = KGlobal::instance(); m_instance = TDEGlobal::instance();
} }
~TKToolBarButtonPrivate() ~TKToolBarButtonPrivate()
@ -154,7 +154,7 @@ void TKToolBarButton::modeChange()
if ((d->m_iconMode==TK::IconAndText||d->m_iconMode==TK::TextOnly) && !d->m_text.isEmpty()) if ((d->m_iconMode==TK::IconAndText||d->m_iconMode==TK::TextOnly) && !d->m_text.isEmpty())
{ {
TQFont tmp_font = KGlobalSettings::toolBarFont(); TQFont tmp_font = TDEGlobalSettings::toolBarFont();
TQFontMetrics fm(tmp_font); TQFontMetrics fm(tmp_font);
h = TQMAX(h,fm.lineSpacing()+2*border); h = TQMAX(h,fm.lineSpacing()+2*border);
@ -254,7 +254,7 @@ void TKToolBarButton::setDisabledPixmap( const TQPixmap &pixmap )
void TKToolBarButton::setPopup(TQPopupMenu *p) void TKToolBarButton::setPopup(TQPopupMenu *p)
{ {
d->m_popup = p; d->m_popup = p;
d->m_popup->setFont(KGlobalSettings::toolBarFont()); d->m_popup->setFont(TDEGlobalSettings::toolBarFont());
p->installEventFilter(this); p->installEventFilter(this);
modeChange(); modeChange();
@ -359,7 +359,7 @@ void TKToolBarButton::drawButton( TQPainter* p )
}\ }\
}\ }\
if ((d->m_iconMode==TK::IconAndText||d->m_iconMode==TK::TextOnly) && !d->m_text.isEmpty()) {\ if ((d->m_iconMode==TK::IconAndText||d->m_iconMode==TK::TextOnly) && !d->m_text.isEmpty()) {\
TQFontMetrics fm(KGlobalSettings::toolBarFont());\ TQFontMetrics fm(TDEGlobalSettings::toolBarFont());\
style().drawItem( p, TQRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, colorGroup(), isEnabled(), 0, d->m_text );\ style().drawItem( p, TQRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, colorGroup(), isEnabled(), 0, d->m_text );\
} }
@ -443,7 +443,7 @@ TQSize TKToolBarButton::minimumSizeHint() const
void TKToolBarButton::showMenu() void TKToolBarButton::showMenu()
{ {
TQPoint p ( mapToGlobal( TQPoint( 0, 0 ) ) ); TQPoint p ( mapToGlobal( TQPoint( 0, 0 ) ) );
const int deskHeight = KGlobalSettings::desktopGeometry(this).height(); const int deskHeight = TDEGlobalSettings::desktopGeometry(this).height();
if ( p.y() + height() + d->m_popup->height() > deskHeight ) if ( p.y() + height() + d->m_popup->height() > deskHeight )
p.setY( p.y() - d->m_popup->height() ); p.setY( p.y() - d->m_popup->height() );
else else

@ -37,7 +37,7 @@ class TKToolBarButton : public TQToolButton
public: public:
TKToolBarButton(const TQString& icon, const TQString& txt, TKToolBarButton(const TQString& icon, const TQString& txt,
TQWidget* parent = 0, const char *name=0L, TQWidget* parent = 0, const char *name=0L,
TDEInstance *_instance = KGlobal::instance()); TDEInstance *_instance = TDEGlobal::instance());
TKToolBarButton(const TQPixmap&, const TQString&, TQWidget* parent=0, const char* name=0); TKToolBarButton(const TQPixmap&, const TQString&, TQWidget* parent=0, const char* name=0);
~TKToolBarButton(); ~TKToolBarButton();

@ -63,11 +63,11 @@ KoPalette::KoPalette(TQWidget * parent, const char * name)
void KoPalette::resetFont() void KoPalette::resetFont()
{ {
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
Q_ASSERT(cfg); Q_ASSERT(cfg);
cfg->setGroup(""); cfg->setGroup("");
m_font = KGlobalSettings::generalFont(); m_font = TDEGlobalSettings::generalFont();
float ps = TQMIN(9, KGlobalSettings::generalFont().pointSize() * 0.8); float ps = TQMIN(9, TDEGlobalSettings::generalFont().pointSize() * 0.8);
ps = cfg->readNumEntry("palettefontsize", (int)ps); ps = cfg->readNumEntry("palettefontsize", (int)ps);
if (ps < 6) ps = 6; if (ps < 6) ps = 6;
m_font.setPointSize((int)ps); m_font.setPointSize((int)ps);

@ -65,7 +65,7 @@ KoPaletteManager::KoPaletteManager(KoView * view, KActionCollection *ac, const c
connect(m_mapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(slotTogglePalette(int))); connect(m_mapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(slotTogglePalette(int)));
m_viewActionMenu = new KActionMenu(i18n("Palettes"), m_actionCollection, "view_palette_action_menu"); m_viewActionMenu = new KActionMenu(i18n("Palettes"), m_actionCollection, "view_palette_action_menu");
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
cfg->setGroup("palettes"); cfg->setGroup("palettes");
bool palettesShown = cfg->readBoolEntry("palettesshown", true); bool palettesShown = cfg->readBoolEntry("palettesshown", true);
@ -149,7 +149,7 @@ void KoPaletteManager::addWidget(TQWidget * widget,
bool visible = true; bool visible = true;
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
if (cfg->hasGroup("palettetab-" + name)) { if (cfg->hasGroup("palettetab-" + name)) {
cfg->setGroup("palettetab-" + name); cfg->setGroup("palettetab-" + name);
@ -367,7 +367,7 @@ void KoPaletteManager::placePalette(const TQString & name, TQt::Dock location)
if (!palette) return; if (!palette) return;
//XXX: Check whether this name occurs in the config list, retrieve the location, set the location //XXX: Check whether this name occurs in the config list, retrieve the location, set the location
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
if (cfg->hasGroup("palette-" + name)) { if (cfg->hasGroup("palette-" + name)) {
cfg->setGroup("palette-" + name); cfg->setGroup("palette-" + name);
@ -529,7 +529,7 @@ void KoPaletteManager::save()
if (!m_view) return; if (!m_view) return;
if (!m_view->mainWindow()) return; if (!m_view->mainWindow()) return;
KConfig * cfg = KGlobal::config(); KConfig * cfg = TDEGlobal::config();
Q_ASSERT(cfg); Q_ASSERT(cfg);
cfg->setGroup(""); cfg->setGroup("");

@ -72,7 +72,7 @@ class EditorPrivate
itemToSelectLater = 0; itemToSelectLater = 0;
if (!kofficeAppDirAdded) { if (!kofficeAppDirAdded) {
kofficeAppDirAdded = true; kofficeAppDirAdded = true;
KGlobal::iconLoader()->addAppDir("koffice"); TDEGlobal::iconLoader()->addAppDir("koffice");
} }
previouslyCollapsedGroupItem = 0; previouslyCollapsedGroupItem = 0;
childFormPreviouslyCollapsedGroupItem = 0; childFormPreviouslyCollapsedGroupItem = 0;

@ -146,7 +146,7 @@ ComboBox::fillBox()
m_edit->insertStringList(property()->listData()->names); m_edit->insertStringList(property()->listData()->names);
KCompletion *comp = m_edit->completionObject(); KCompletion *comp = m_edit->completionObject();
comp->insertItems(property()->listData()->names); comp->insertItems(property()->listData()->names);
comp->setCompletionMode(KGlobalSettings::CompletionShell); comp->setCompletionMode(TDEGlobalSettings::CompletionShell);
} }
void void

@ -70,8 +70,8 @@ void
DateEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) DateEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{ {
p->eraseRect(r); p->eraseRect(r);
Widget::drawViewer(p, cg, r, KGlobal::locale()->formatDate(value.toDate(), true /* use short format*/ )); Widget::drawViewer(p, cg, r, TDEGlobal::locale()->formatDate(value.toDate(), true /* use short format*/ ));
// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, KGlobal::locale()->formatDate(value.toDate(), true /* use short format*/ )); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TDEGlobal::locale()->formatDate(value.toDate(), true /* use short format*/ ));
} }
void void

@ -69,9 +69,9 @@ void
DateTimeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) DateTimeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{ {
p->eraseRect(r); p->eraseRect(r);
Widget::drawViewer(p, cg, r, KGlobal::locale()->formatDateTime(value.toDateTime(), true /* use short format*/, false /*no sec */ )); Widget::drawViewer(p, cg, r, TDEGlobal::locale()->formatDateTime(value.toDateTime(), true /* use short format*/, false /*no sec */ ));
// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine,
// KGlobal::locale()->formatDateTime(value.toDateTime(), true /* use short format*/, false /*no sec */ )); // TDEGlobal::locale()->formatDateTime(value.toDateTime(), true /* use short format*/, false /*no sec */ ));
} }
void void

@ -291,7 +291,7 @@ DoubleEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, co
} }
} }
if (valueText.isEmpty()) if (valueText.isEmpty())
valueText = TQString(value.toString()).replace('.', KGlobal::locale()->decimalSymbol()); valueText = TQString(value.toString()).replace('.', TDEGlobal::locale()->decimalSymbol());
Widget::drawViewer(p, cg, r, valueText); Widget::drawViewer(p, cg, r, valueText);
// p->eraseRect(r); // p->eraseRect(r);

@ -68,8 +68,8 @@ TimeEdit::setValue(const TQVariant &value, bool emitChange)
void void
TimeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) TimeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{ {
Widget::drawViewer(p, cg, r, KGlobal::locale()->formatTime(value.toTime(), true /* include sec*/)); Widget::drawViewer(p, cg, r, TDEGlobal::locale()->formatTime(value.toTime(), true /* include sec*/));
// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, KGlobal::locale()->formatTime(value.toTime(), true /* include sec*/)); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TDEGlobal::locale()->formatTime(value.toTime(), true /* include sec*/));
} }
void void

@ -293,7 +293,7 @@ KFontChooser_local::KFontChooser_local(TQWidget *parent, const char *name,
row ++; row ++;
sampleEdit = new TQLineEdit( page, "sampleEdit"); sampleEdit = new TQLineEdit( page, "sampleEdit");
TQFont tmpFont( KGlobalSettings::generalFont().family(), 64, TQFont::Black ); TQFont tmpFont( TDEGlobalSettings::generalFont().family(), 64, TQFont::Black );
sampleEdit->setFont(tmpFont); sampleEdit->setFont(tmpFont);
sampleEdit->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog")); sampleEdit->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog"));
sampleEdit->setMinimumHeight( sampleEdit->fontMetrics().lineSpacing() ); sampleEdit->setMinimumHeight( sampleEdit->fontMetrics().lineSpacing() );
@ -327,12 +327,12 @@ KFontChooser_local::KFontChooser_local(TQWidget *parent, const char *name,
vbox->addWidget( xlfdEdit ); vbox->addWidget( xlfdEdit );
// lets initialize the display if possible // lets initialize the display if possible
setFont( KGlobalSettings::generalFont(), usingFixed ); setFont( TDEGlobalSettings::generalFont(), usingFixed );
// check or uncheck or gray out the "relative" checkbox // check or uncheck or gray out the "relative" checkbox
if( sizeIsRelativeState && sizeIsRelativeCheckBox ) if( sizeIsRelativeState && sizeIsRelativeCheckBox )
setSizeIsRelative( *sizeIsRelativeState ); setSizeIsRelative( *sizeIsRelativeState );
KConfig *config = KGlobal::config(); KConfig *config = TDEGlobal::config();
KConfigGroupSaver saver(config, TQString::fromLatin1("General")); KConfigGroupSaver saver(config, TQString::fromLatin1("General"));
showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false)); showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false));
} }
@ -725,7 +725,7 @@ void KFontChooser_local::setFamilyList( TQStringList list )
familyListBox->blockSignals( true ); familyListBox->blockSignals( true );
familyListBox->clear(); familyListBox->clear();
familyListBox->insertStringList( list ); familyListBox->insertStringList( list );
setFont( KGlobalSettings::generalFont(), usingFixed ); setFont( TDEGlobalSettings::generalFont(), usingFixed );
familyListBox->blockSignals( false ); familyListBox->blockSignals( false );
} }

@ -512,7 +512,7 @@ void KoAutoFormatDia::setupTab3()
{ {
if ( !(*it).contains("autocorrect")) if ( !(*it).contains("autocorrect"))
{ {
TQString readableName = KGlobal::locale()->twoAlphaToCountryName((*it).left((*it).length()-4)); TQString readableName = TDEGlobal::locale()->twoAlphaToCountryName((*it).left((*it).length()-4));
TQString tmp; TQString tmp;
if ( readableName.isEmpty() ) if ( readableName.isEmpty() )
tmp =(*it).left((*it).length()-4); tmp =(*it).left((*it).length()-4);

@ -64,8 +64,8 @@ TQString KoCommentDia::commentText()
void KoCommentDia::slotAddAuthorName() void KoCommentDia::slotAddAuthorName()
{ {
TQString date = KGlobal::locale()->formatDate( TQDate::currentDate() ); TQString date = TDEGlobal::locale()->formatDate( TQDate::currentDate() );
TQString time = KGlobal::locale()->formatTime( TQTime::currentTime() ); TQString time = TDEGlobal::locale()->formatTime( TQTime::currentTime() );
TQString result = TQString("--------%1 ,%2, %3------\n").arg(authorName).arg(date).arg(time); TQString result = TQString("--------%1 ,%2, %3------\n").arg(authorName).arg(date).arg(time);
m_multiLine->insertLine( result, m_multiLine->numLines() ); m_multiLine->insertLine( result, m_multiLine->numLines() );
} }

@ -794,7 +794,7 @@ KoStylePreview::KoStylePreview( const TQString& title, const TQString& text, TQW
setMinimumHeight(80); setMinimumHeight(80);
m_zoomHandler = new KoTextZoomHandler; m_zoomHandler = new KoTextZoomHandler;
TQFont font = KoGlobal::defaultFont(); TQFont font = KoGlobal::defaultFont();
m_textdoc = new KoTextDocument( m_zoomHandler, new KoTextFormatCollection( font, TQColor(), KGlobal::locale()->language(), false ) ); m_textdoc = new KoTextDocument( m_zoomHandler, new KoTextFormatCollection( font, TQColor(), TDEGlobal::locale()->language(), false ) );
m_textdoc->setFlow( new MyFlow(this, m_zoomHandler) ); m_textdoc->setFlow( new MyFlow(this, m_zoomHandler) );
//m_textdoc->setWidth( KoTextZoomHandler::ptToLayoutUnitPt( 1000 ) ); //m_textdoc->setWidth( KoTextZoomHandler::ptToLayoutUnitPt( 1000 ) );
@ -1827,7 +1827,7 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram
sAlignChar = new TQLineEdit( bgAlign); sAlignChar = new TQLineEdit( bgAlign);
sAlignChar->setMaximumSize( TQSize( 60, 32767 ) ); sAlignChar->setMaximumSize( TQSize( 60, 32767 ) );
sAlignChar->setText(TQString(KGlobal::locale()->decimalSymbol()[0])); sAlignChar->setText(TQString(TDEGlobal::locale()->decimalSymbol()[0]));
Layout8->addWidget( sAlignChar ); Layout8->addWidget( sAlignChar );
TQSpacerItem* spacer_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); TQSpacerItem* spacer_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
Layout8->addItem( spacer_2 ); Layout8->addItem( spacer_2 );

@ -164,7 +164,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement&
tab.ptWidth = getAttribute( element, "width", 0.5 ); tab.ptWidth = getAttribute( element, "width", 0.5 );
TQString alignCharStr = element.attribute("alignchar"); TQString alignCharStr = element.attribute("alignchar");
if ( alignCharStr.isEmpty() ) if ( alignCharStr.isEmpty() )
tab.alignChar = KGlobal::locale()->decimalSymbol()[0]; tab.alignChar = TDEGlobal::locale()->decimalSymbol()[0];
else else
tab.alignChar = alignCharStr[0]; tab.alignChar = alignCharStr[0];
tabList.append( tab ); tabList.append( tab );

@ -67,7 +67,7 @@ KoTextFormat::KoTextFormat()
m_strikeOutType = S_NONE; m_strikeOutType = S_NONE;
m_underlineStyle = U_SOLID; m_underlineStyle = U_SOLID;
m_strikeOutStyle = S_SOLID; m_strikeOutStyle = S_SOLID;
m_language = KGlobal::locale()->language(); m_language = TDEGlobal::locale()->language();
d->m_bHyphenation = false; d->m_bHyphenation = false;
d->m_underLineWidth = 1.0; d->m_underLineWidth = 1.0;
d->m_shadowDistanceX = 0; d->m_shadowDistanceX = 0;
@ -1678,7 +1678,7 @@ KoTextFormatCollection::KoTextFormatCollection()
#ifdef DEBUG_COLLECTION #ifdef DEBUG_COLLECTION
kdDebug(32500) << "KoTextFormatCollection::KoTextFormatCollection " << this << endl; kdDebug(32500) << "KoTextFormatCollection::KoTextFormatCollection " << this << endl;
#endif #endif
defFormat = new KoTextFormat( TQApplication::font(), TQColor(), KGlobal::locale()->language(), false ); defFormat = new KoTextFormat( TQApplication::font(), TQColor(), TDEGlobal::locale()->language(), false );
lastFormat = cres = 0; lastFormat = cres = 0;
cflags = -1; cflags = -1;
cKey.setAutoDelete( TRUE ); cKey.setAutoDelete( TRUE );

@ -3163,7 +3163,7 @@ void KoTextParag::drawFormattingChars( TQPainter &painter, int start, int len,
return; return;
painter.save(); painter.save();
//TQPen pen( cg.color( TQColorGroup::Highlight ) ); //TQPen pen( cg.color( TQColorGroup::Highlight ) );
TQPen pen( KGlobalSettings::linkColor() ); // #101820 TQPen pen( TDEGlobalSettings::linkColor() ); // #101820
painter.setPen( pen ); painter.setPen( pen );
//kdDebug() << "KWTextParag::drawFormattingChars start=" << start << " len=" << len << " length=" << length() << endl; //kdDebug() << "KWTextParag::drawFormattingChars start=" << start << " len=" << len << " length=" << length() << endl;
if ( start + len == length() && ( whichFormattingChars & FormattingEndParag ) ) if ( start + len == length() && ( whichFormattingChars & FormattingEndParag ) )

@ -235,18 +235,18 @@ TQString KoVariableDateFormat::convert( const TQVariant& data ) const
return i18n("No date set"); // e.g. old KWord documents return i18n("No date set"); // e.g. old KWord documents
if (m_strFormat.lower() == "locale" || m_strFormat.isEmpty()) if (m_strFormat.lower() == "locale" || m_strFormat.isEmpty())
return KGlobal::locale()->formatDate( dateTime.date(), false ); return TDEGlobal::locale()->formatDate( dateTime.date(), false );
else if ( m_strFormat.lower() == "localeshort" ) else if ( m_strFormat.lower() == "localeshort" )
return KGlobal::locale()->formatDate( dateTime.date(), true ); return TDEGlobal::locale()->formatDate( dateTime.date(), true );
else if ( m_strFormat.lower() == "localedatetime" ) else if ( m_strFormat.lower() == "localedatetime" )
return KGlobal::locale()->formatDateTime( dateTime, false ); return TDEGlobal::locale()->formatDateTime( dateTime, false );
else if ( m_strFormat.lower() == "localedatetimeshort" ) else if ( m_strFormat.lower() == "localedatetimeshort" )
return KGlobal::locale()->formatDateTime( dateTime, true ); return TDEGlobal::locale()->formatDateTime( dateTime, true );
TQString tmp ( dateTime.toString(m_strFormat) ); TQString tmp ( dateTime.toString(m_strFormat) );
const int month = dateTime.date().month(); const int month = dateTime.date().month();
tmp.replace("PPPP", KGlobal::locale()->calendar()->monthNamePossessive(month, false)); //long possessive month name tmp.replace("PPPP", TDEGlobal::locale()->calendar()->monthNamePossessive(month, false)); //long possessive month name
tmp.replace("PPP", KGlobal::locale()->calendar()->monthNamePossessive(month, true)); //short possessive month name tmp.replace("PPP", TDEGlobal::locale()->calendar()->monthNamePossessive(month, true)); //short possessive month name
return tmp; return tmp;
} }
@ -350,7 +350,7 @@ TQString KoVariableTimeFormat::convert( const TQVariant & time ) const
} }
if( m_strFormat.lower() == "locale" || m_strFormat.isEmpty() ) if( m_strFormat.lower() == "locale" || m_strFormat.isEmpty() )
return KGlobal::locale()->formatTime( time.toTime() ); return TDEGlobal::locale()->formatTime( time.toTime() );
return time.toTime().toString(m_strFormat); return time.toTime().toString(m_strFormat);
} }
@ -1198,11 +1198,11 @@ void KoDateVariable::resize()
TQString oldLanguage; TQString oldLanguage;
if ( !fmt->language().isEmpty()) if ( !fmt->language().isEmpty())
{ {
oldLanguage=KGlobal::locale()->language(); oldLanguage=TDEGlobal::locale()->language();
bool changeLanguage = KGlobal::locale()->setLanguage( fmt->language() ); bool changeLanguage = TDEGlobal::locale()->setLanguage( fmt->language() );
KoVariable::resize(); KoVariable::resize();
if ( changeLanguage ) if ( changeLanguage )
KGlobal::locale()->setLanguage( oldLanguage ); TDEGlobal::locale()->setLanguage( oldLanguage );
} }
else else
KoVariable::resize(); KoVariable::resize();
@ -1315,13 +1315,13 @@ void KoDateVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& context )
value.lower() == "localedatetimeshort" ) value.lower() == "localedatetimeshort" )
{ {
if ( value.lower() == "locale" || value.isEmpty()) if ( value.lower() == "locale" || value.isEmpty())
value = KGlobal::locale()->dateFormat(); value = TDEGlobal::locale()->dateFormat();
else if ( value.lower() == "localeshort" ) else if ( value.lower() == "localeshort" )
value = KGlobal::locale()->dateFormatShort(); value = TDEGlobal::locale()->dateFormatShort();
else if ( value.lower() == "localedatetime" ) else if ( value.lower() == "localedatetime" )
value = TQString( "%1 %2" ).arg( KGlobal::locale()->dateFormat() ).arg( KGlobal::locale()->timeFormat() ); value = TQString( "%1 %2" ).arg( TDEGlobal::locale()->dateFormat() ).arg( TDEGlobal::locale()->timeFormat() );
else if ( value.lower() == "localedatetimeshort" ) else if ( value.lower() == "localedatetimeshort" )
value = TQString( "%1 %2" ).arg( KGlobal::locale()->dateFormatShort() ).arg( KGlobal::locale()->timeFormat() ); value = TQString( "%1 %2" ).arg( TDEGlobal::locale()->dateFormatShort() ).arg( TDEGlobal::locale()->timeFormat() );
klocaleFormat = true; klocaleFormat = true;
} }
writer.addAttribute( "style:data-style-name", KoOasisStyles::saveOasisDateStyle(context.mainStyles(), value, klocaleFormat ) ); writer.addAttribute( "style:data-style-name", KoOasisStyles::saveOasisDateStyle(context.mainStyles(), value, klocaleFormat ) );
@ -1466,11 +1466,11 @@ void KoTimeVariable::resize()
KoTextFormat * fmt = format(); KoTextFormat * fmt = format();
if ( !fmt->language().isEmpty() ) if ( !fmt->language().isEmpty() )
{ {
TQString oldLanguage = KGlobal::locale()->language(); TQString oldLanguage = TDEGlobal::locale()->language();
bool changeLanguage = KGlobal::locale()->setLanguage( fmt->language() ); bool changeLanguage = TDEGlobal::locale()->setLanguage( fmt->language() );
KoVariable::resize(); KoVariable::resize();
if ( changeLanguage ) if ( changeLanguage )
KGlobal::locale()->setLanguage( oldLanguage ); TDEGlobal::locale()->setLanguage( oldLanguage );
} }
else else
KoVariable::resize(); KoVariable::resize();
@ -1570,7 +1570,7 @@ void KoTimeVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& context )
bool klocaleFormat = false; bool klocaleFormat = false;
if ( value.lower() == "locale" ) if ( value.lower() == "locale" )
{ {
value = KGlobal::locale()->timeFormat(); value = TDEGlobal::locale()->timeFormat();
klocaleFormat = true; klocaleFormat = true;
} }
writer.addAttribute( "style:data-style-name", KoOasisStyles::saveOasisTimeStyle(context.mainStyles(), m_varFormat->formatProperties(), klocaleFormat ) ); writer.addAttribute( "style:data-style-name", KoOasisStyles::saveOasisTimeStyle(context.mainStyles(), m_varFormat->formatProperties(), klocaleFormat ) );
@ -2517,7 +2517,7 @@ TQString KoNoteVariable::fieldCode()
TQString KoNoteVariable::createdNote() const TQString KoNoteVariable::createdNote() const
{ {
return KGlobal::locale()->formatDate( m_createdNoteDate, false ); return TDEGlobal::locale()->formatDate( m_createdNoteDate, false );
} }
void KoNoteVariable::loadOasis( const TQDomElement &elem, KoOasisContext& /*context*/ ) void KoNoteVariable::loadOasis( const TQDomElement &elem, KoOasisContext& /*context*/ )

@ -205,8 +205,8 @@ int main (int argc, char ** argv)
TDEApplication app(argc, argv, "KoTextFormatter test"); TDEApplication app(argc, argv, "KoTextFormatter test");
// Don't let locale settings lead to different hyphenation output // Don't let locale settings lead to different hyphenation output
KGlobal::locale()->setLanguage( TQString::fromLatin1( "en_US" ) ); TDEGlobal::locale()->setLanguage( TQString::fromLatin1( "en_US" ) );
KGlobal::locale()->setCountry( TQString::fromLatin1( "C" ) ); TDEGlobal::locale()->setCountry( TQString::fromLatin1( "C" ) );
KoTextFormatterTest test; KoTextFormatterTest test;
//test.speedTest(); //test.speedTest();

@ -94,7 +94,7 @@ namespace Kross { namespace Api {
/** /**
* \return the file-wildcard used to determinate by this interpreter * \return the file-wildcard used to determinate by this interpreter
* used scriptingfiles. Those filter will be used e.g. with * used scriptingfiles. Those filter will be used e.g. with
* KGlobal::dirs()->findAllResources() as filtermask. For example * TDEGlobal::dirs()->findAllResources() as filtermask. For example
* python just defines it as "*py". * python just defines it as "*py".
*/ */
const TQString getWildcard(); const TQString getWildcard();

@ -139,7 +139,7 @@ void ScriptGUIClient::reloadInstalledScripts()
installedcollection->clear(); installedcollection->clear();
TQCString partname = d->guiclient->instance()->instanceName(); TQCString partname = d->guiclient->instance()->instanceName();
TQStringList files = KGlobal::dirs()->findAllResources("data", partname + "/scripts/*/*.rc"); TQStringList files = TDEGlobal::dirs()->findAllResources("data", partname + "/scripts/*/*.rc");
//files.sort(); //files.sort();
for(TQStringList::iterator it = files.begin(); it != files.end(); ++it) for(TQStringList::iterator it = files.begin(); it != files.end(); ++it)
loadScriptConfigFile(*it); loadScriptConfigFile(*it);
@ -155,8 +155,8 @@ bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile)
} }
TQCString partname = d->guiclient->instance()->instanceName(); TQCString partname = d->guiclient->instance()->instanceName();
TQString destination = KGlobal::dirs()->saveLocation("data", partname + "/scripts/", true); TQString destination = TDEGlobal::dirs()->saveLocation("data", partname + "/scripts/", true);
//TQString destination = KGlobal::dirs()->saveLocation("appdata", "scripts", true); //TQString destination = TDEGlobal::dirs()->saveLocation("appdata", "scripts", true);
if(destination.isNull()) { if(destination.isNull()) {
krosswarning("ScriptGUIClient::installScriptPackage() Failed to determinate location where the scriptpackage should be installed to!"); krosswarning("ScriptGUIClient::installScriptPackage() Failed to determinate location where the scriptpackage should be installed to!");
return false; return false;

@ -137,18 +137,18 @@ WdgScriptsManager::WdgScriptsManager(ScriptGUIClient* scr, TQWidget* parent, con
slotSelectionChanged(0); slotSelectionChanged(0);
connect(scriptsList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQListViewItem*))); connect(scriptsList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
btnExec->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "exec", KIcon::MainToolbar, 16 )); btnExec->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "exec", KIcon::MainToolbar, 16 ));
connect(btnExec, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExecuteScript())); connect(btnExec, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExecuteScript()));
btnLoad->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "fileopen", KIcon::MainToolbar, 16 )); btnLoad->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileopen", KIcon::MainToolbar, 16 ));
connect(btnLoad, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLoadScript())); connect(btnLoad, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLoadScript()));
btnUnload->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "fileclose", KIcon::MainToolbar, 16 )); btnUnload->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileclose", KIcon::MainToolbar, 16 ));
connect(btnUnload, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUnloadScript())); connect(btnUnload, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUnloadScript()));
btnInstall->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "fileimport", KIcon::MainToolbar, 16 )); btnInstall->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileimport", KIcon::MainToolbar, 16 ));
connect(btnInstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInstallScript())); connect(btnInstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInstallScript()));
btnUninstall->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "fileclose", KIcon::MainToolbar, 16 )); btnUninstall->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileclose", KIcon::MainToolbar, 16 ));
connect(btnUninstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUninstallScript())); connect(btnUninstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUninstallScript()));
#ifdef KROSS_SUPPORT_NEWSTUFF #ifdef KROSS_SUPPORT_NEWSTUFF
btnNewStuff->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "knewstuff", KIcon::MainToolbar, 16 )); btnNewStuff->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "knewstuff", KIcon::MainToolbar, 16 ));
connect(btnNewStuff, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetNewScript())); connect(btnNewStuff, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetNewScript()));
#endif #endif
/* /*
@ -218,7 +218,7 @@ TQListViewItem* WdgScriptsManager::addItem(ScriptAction::Ptr action, TQListViewI
TQPixmap pm; TQPixmap pm;
if(action->hasIcon()) { if(action->hasIcon()) {
KIconLoader* icons = KGlobal::iconLoader(); KIconLoader* icons = TDEGlobal::iconLoader();
pm = icons->loadIconSet(action->icon(), KIcon::Small).pixmap(TQIconSet::Small, TQIconSet::Active); pm = icons->loadIconSet(action->icon(), KIcon::Small).pixmap(TQIconSet::Small, TQIconSet::Active);
} }
else { else {
@ -346,7 +346,7 @@ void WdgScriptsManager::slotResourceInstalled()
// Delete KNewStuff's configuration entries. These entries reflect what has // Delete KNewStuff's configuration entries. These entries reflect what has
// already been installed. As we cannot yet keep them in sync after uninstalling // already been installed. As we cannot yet keep them in sync after uninstalling
// scripts, we deactivate the check marks entirely. // scripts, we deactivate the check marks entirely.
KGlobal::config()->deleteGroup("KNewStuffStatus"); TDEGlobal::config()->deleteGroup("KNewStuffStatus");
} }
}} }}

@ -111,11 +111,11 @@ PythonInterpreter::PythonInterpreter(Kross::Api::InterpreterInfo* info)
// Determinate additional module-paths we like to add. // Determinate additional module-paths we like to add.
// First add the global Kross modules-path. // First add the global Kross modules-path.
TQStringList krossdirs = KGlobal::dirs()->findDirs("data", "kross/python"); TQStringList krossdirs = TDEGlobal::dirs()->findDirs("data", "kross/python");
for(TQStringList::Iterator krossit = krossdirs.begin(); krossit != krossdirs.end(); ++krossit) for(TQStringList::Iterator krossit = krossdirs.begin(); krossit != krossdirs.end(); ++krossit)
path.append(*krossit + PYPATHDELIMITER); path.append(*krossit + PYPATHDELIMITER);
// Then add the application modules-path. // Then add the application modules-path.
TQStringList appdirs = KGlobal::dirs()->findDirs("appdata", "kross/python"); TQStringList appdirs = TDEGlobal::dirs()->findDirs("appdata", "kross/python");
for(TQStringList::Iterator appit = appdirs.begin(); appit != appdirs.end(); ++appit) for(TQStringList::Iterator appit = appdirs.begin(); appit != appdirs.end(); ++appit)
path.append(*appit + PYPATHDELIMITER); path.append(*appit + PYPATHDELIMITER);

@ -48,7 +48,7 @@ TestWindow::TestWindow(const TQString& interpretername, const TQString& scriptco
m_scriptextension = new Kross::Api::ScriptGUIClient(this, this); m_scriptextension = new Kross::Api::ScriptGUIClient(this, this);
TQString file = KGlobal::dirs()->findResource("appdata", "testscripting.rc"); TQString file = TDEGlobal::dirs()->findResource("appdata", "testscripting.rc");
if(file.isNull()) if(file.isNull())
file = TQDir(TQDir::currentDirPath()).filePath("testscripting.rc"); file = TQDir(TQDir::currentDirPath()).filePath("testscripting.rc");
else Kross::krossdebug("-------------------------222222"); else Kross::krossdebug("-------------------------222222");

@ -84,7 +84,7 @@ int main( int argc, char **argv )
TDEApplication app; TDEApplication app;
// Install the libkoffice* translations // Install the libkoffice* translations
KGlobal::locale()->insertCatalogue("koffice"); TDEGlobal::locale()->insertCatalogue("koffice");
KImageIO::registerFormats(); KImageIO::registerFormats();

@ -74,7 +74,7 @@ Thesaurus::Thesaurus(TQObject* parent, const char* name, const TQStringList &)
m_config = new KConfig("kthesaurusrc"); m_config = new KConfig("kthesaurusrc");
m_data_file = m_config->readPathEntry("datafile"); m_data_file = m_config->readPathEntry("datafile");
if( ! m_data_file ) { if( ! m_data_file ) {
m_data_file = KGlobal::dirs()->findResourceDir("data", "thesaurus/") m_data_file = TDEGlobal::dirs()->findResourceDir("data", "thesaurus/")
+ "thesaurus/thesaurus.txt"; + "thesaurus/thesaurus.txt";
} }
setCaption(); setCaption();
@ -199,20 +199,20 @@ Thesaurus::Thesaurus(TQObject* parent, const char* name, const TQStringList &)
// //
// calling the 'wn' binary // calling the 'wn' binary
m_wnproc = new KProcess; m_wnproc = new TDEProcess;
connect(m_wnproc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(wnExited(KProcess*))); connect(m_wnproc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(wnExited(TDEProcess*)));
connect(m_wnproc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), connect(m_wnproc, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this, TQT_SLOT(receivedWnStdout(KProcess*, char*, int))); this, TQT_SLOT(receivedWnStdout(TDEProcess*, char*, int)));
connect(m_wnproc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), connect(m_wnproc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this, TQT_SLOT(receivedWnStderr(KProcess*, char*, int))); this, TQT_SLOT(receivedWnStderr(TDEProcess*, char*, int)));
// grep'ing the text file // grep'ing the text file
m_thesproc = new KProcess; m_thesproc = new TDEProcess;
connect(m_thesproc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(thesExited(KProcess*))); connect(m_thesproc, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(thesExited(TDEProcess*)));
connect(m_thesproc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), connect(m_thesproc, TQT_SIGNAL(receivedStdout(TDEProcess*,char*,int)),
this, TQT_SLOT(receivedThesStdout(KProcess*, char*, int))); this, TQT_SLOT(receivedThesStdout(TDEProcess*, char*, int)));
connect(m_thesproc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), connect(m_thesproc, TQT_SIGNAL(receivedStderr(TDEProcess*,char*,int)),
this, TQT_SLOT(receivedThesStderr(KProcess*, char*, int))); this, TQT_SLOT(receivedThesStderr(TDEProcess*, char*, int)));
} }
@ -291,7 +291,7 @@ bool Thesaurus::run(const TQString& command, void* data, const TQString& datatyp
void Thesaurus::slotChangeLanguage() void Thesaurus::slotChangeLanguage()
{ {
TQString filename = KFileDialog::getOpenFileName( TQString filename = KFileDialog::getOpenFileName(
KGlobal::dirs()->findResourceDir("data", "thesaurus/")+"thesaurus/"); TDEGlobal::dirs()->findResourceDir("data", "thesaurus/")+"thesaurus/");
if( !filename.isNull() ) { if( !filename.isNull() ) {
m_data_file = filename; m_data_file = filename;
setCaption(); setCaption();
@ -415,7 +415,7 @@ void Thesaurus::findTermThesaurus(const TQString &term)
*m_thesproc << "grep" << "-i" << term_tmp; *m_thesproc << "grep" << "-i" << term_tmp;
*m_thesproc << m_data_file; *m_thesproc << m_data_file;
if( !m_thesproc->start(KProcess::NotifyOnExit, KProcess::AllOutput) ) { if( !m_thesproc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput) ) {
KMessageBox::error(0, i18n("Failed to execute grep.")); KMessageBox::error(0, i18n("Failed to execute grep."));
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
return; return;
@ -424,7 +424,7 @@ void Thesaurus::findTermThesaurus(const TQString &term)
// The external process has ended, so we parse its result and put it in // The external process has ended, so we parse its result and put it in
// the list box. // the list box.
void Thesaurus::thesExited(KProcess *) void Thesaurus::thesExited(TDEProcess *)
{ {
if( !m_thesproc_stderr.isEmpty() ) { if( !m_thesproc_stderr.isEmpty() ) {
@ -511,12 +511,12 @@ void Thesaurus::thesExited(KProcess *)
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
} }
void Thesaurus::receivedThesStdout(KProcess *, char *result, int len) void Thesaurus::receivedThesStdout(TDEProcess *, char *result, int len)
{ {
m_thesproc_stdout += TQString::fromLocal8Bit( TQCString(result, len+1) ); m_thesproc_stdout += TQString::fromLocal8Bit( TQCString(result, len+1) );
} }
void Thesaurus::receivedThesStderr(KProcess *, char *result, int len) void Thesaurus::receivedThesStderr(TDEProcess *, char *result, int len)
{ {
m_thesproc_stderr += TQString::fromLocal8Bit( TQCString(result, len+1) ); m_thesproc_stderr += TQString::fromLocal8Bit( TQCString(result, len+1) );
} }
@ -628,7 +628,7 @@ void Thesaurus::findTermWordnet(const TQString &term)
return; return;
} }
if( !m_wnproc->start(KProcess::NotifyOnExit, KProcess::AllOutput) ) { if( !m_wnproc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput) ) {
m_resultbox->setText(i18n("<b>Error:</b> Failed to execute WordNet program 'wn'. " m_resultbox->setText(i18n("<b>Error:</b> Failed to execute WordNet program 'wn'. "
"WordNet has to be installed on your computer if you want to use it, " "WordNet has to be installed on your computer if you want to use it, "
"and 'wn' has to be in your PATH. " "and 'wn' has to be in your PATH. "
@ -643,7 +643,7 @@ void Thesaurus::findTermWordnet(const TQString &term)
} }
// The process has ended, so parse its result and display it as TQt richtext. // The process has ended, so parse its result and display it as TQt richtext.
void Thesaurus::wnExited(KProcess *) void Thesaurus::wnExited(TDEProcess *)
{ {
if( !m_wnproc_stderr.isEmpty() ) { if( !m_wnproc_stderr.isEmpty() ) {
@ -699,12 +699,12 @@ void Thesaurus::wnExited(KProcess *)
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
} }
void Thesaurus::receivedWnStdout(KProcess *, char *result, int len) void Thesaurus::receivedWnStdout(TDEProcess *, char *result, int len)
{ {
m_wnproc_stdout += TQString::fromLocal8Bit( TQCString(result, len+1) ); m_wnproc_stdout += TQString::fromLocal8Bit( TQCString(result, len+1) );
} }
void Thesaurus::receivedWnStderr(KProcess *, char *result, int len) void Thesaurus::receivedWnStderr(TDEProcess *, char *result, int len)
{ {
m_wnproc_stderr += TQString::fromLocal8Bit( TQCString(result, len+1) ); m_wnproc_stderr += TQString::fromLocal8Bit( TQCString(result, len+1) );
} }

@ -86,13 +86,13 @@ protected slots:
void slotBack(); void slotBack();
void slotForward(); void slotForward();
void thesExited(KProcess *proc); void thesExited(TDEProcess *proc);
void receivedThesStdout(KProcess *proc, char *result, int len); void receivedThesStdout(TDEProcess *proc, char *result, int len);
void receivedThesStderr(KProcess *proc, char *result, int len); void receivedThesStderr(TDEProcess *proc, char *result, int len);
void wnExited(KProcess *proc); void wnExited(TDEProcess *proc);
void receivedWnStdout(KProcess *proc, char *result, int len); void receivedWnStdout(TDEProcess *proc, char *result, int len);
void receivedWnStderr(KProcess *proc, char *result, int len); void receivedWnStderr(TDEProcess *proc, char *result, int len);
protected: protected:
enum Mode {grep, other}; enum Mode {grep, other};
@ -117,11 +117,11 @@ protected:
KConfig *m_config; KConfig *m_config;
KProcess *m_thesproc; TDEProcess *m_thesproc;
TQString m_thesproc_stdout; TQString m_thesproc_stdout;
TQString m_thesproc_stderr; TQString m_thesproc_stderr;
KProcess *m_wnproc; TDEProcess *m_wnproc;
TQString m_wnproc_stdout; TQString m_wnproc_stdout;
TQString m_wnproc_stderr; TQString m_wnproc_stderr;

Loading…
Cancel
Save