diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:23:24 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:23:24 -0600 |
commit | 5b8ab149469c8e186ee8b05d90c0103ae722dd85 (patch) | |
tree | fb31321c80b12ee8e2237bdcf8c228fe44e67772 /lib | |
parent | fe33d391dd7c9da0f83e779344a17e2e445b70a8 (diff) | |
download | koffice-5b8ab149469c8e186ee8b05d90c0103ae722dd85.tar.gz koffice-5b8ab149469c8e186ee8b05d90c0103ae722dd85.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'lib')
48 files changed, 132 insertions, 132 deletions
diff --git a/lib/kformula/kformuladocument.cc b/lib/kformula/kformuladocument.cc index 540fe5ef..917d54c5 100644 --- a/lib/kformula/kformuladocument.cc +++ b/lib/kformula/kformuladocument.cc @@ -436,7 +436,7 @@ void DocumentWrapper::setCommandStack( KoCommandHistory* history ) void DocumentWrapper::createActions( KActionCollection* collection ) { - KGlobal::dirs()->addResourceType( "toolbar", + TDEGlobal::dirs()->addResourceType( "toolbar", KStandardDirs::kde_default("data") + "kformula/pics/" ); diff --git a/lib/kformula/symbolaction.cc b/lib/kformula/symbolaction.cc index e26f3fef..edc3d62e 100644 --- a/lib/kformula/symbolaction.cc +++ b/lib/kformula/symbolaction.cc @@ -76,12 +76,12 @@ SymbolComboItem::~SymbolComboItem() 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 generalHeight = TQFontMetrics( KGlobalSettings::generalFont() ).lineSpacing(); + int generalHeight = TQFontMetrics( TDEGlobalSettings::generalFont() ).lineSpacing(); int fontHeight = TQFontMetrics( m_font ).lineSpacing(); return TQMAX( generalHeight, fontHeight ) + 2; } @@ -93,7 +93,7 @@ void SymbolComboItem::paint( TQPainter *p ) p->drawText( 3, fm.ascent() + fm.leading() / 2, TQString( "%1" ).arg( TQChar( m_symbol ) ) ); - p->setFont( KGlobalSettings::generalFont() ); + p->setFont( TDEGlobalSettings::generalFont() ); fm = p->fontMetrics(); p->drawText( widest + 6, height( m_combo->listBox() ) / 2 + fm.strikeOutPos(), m_name ); } diff --git a/lib/kofficecore/KoApplication.cpp b/lib/kofficecore/KoApplication.cpp index 47861558..d594e0a0 100644 --- a/lib/kofficecore/KoApplication.cpp +++ b/lib/kofficecore/KoApplication.cpp @@ -173,11 +173,11 @@ bool KoApplication::start() kdDebug(30003) << "using full path..." << endl; } else { 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()) { - paths = KGlobal::dirs()->findAllResources("data", appName +"/templates/" + desktopName ); + paths = TDEGlobal::dirs()->findAllResources("data", appName +"/templates/" + desktopName ); } if ( paths.isEmpty()) { KMessageBox::error(0L, i18n("No template found for: %1 ").arg(desktopName) ); diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp index 7eebcbca..beb0b266 100644 --- a/lib/kofficecore/KoDocument.cpp +++ b/lib/kofficecore/KoDocument.cpp @@ -112,7 +112,7 @@ public: { m_confirmNonNativeSave[0] = true; m_confirmNonNativeSave[1] = true; - if ( KGlobal::locale()->measureSystem() == KLocale::Imperial ) { + if ( TDEGlobal::locale()->measureSystem() == KLocale::Imperial ) { m_unit = KoUnit::U_INCH; } else { m_unit = KoUnit::U_CM; @@ -168,9 +168,9 @@ public: KoViewWrapperWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ) { - KGlobal::locale()->insertCatalogue("koffice"); + TDEGlobal::locale()->insertCatalogue("koffice"); // Tell the iconloader about share/apps/koffice/icons - KGlobal::iconLoader()->addAppDir("koffice"); + TDEGlobal::iconLoader()->addAppDir("koffice"); m_view = 0L; // Avoid warning from KParts - we'll have the KoView as focus proxy anyway setFocusPolicy( TQ_ClickFocus ); diff --git a/lib/kofficecore/KoDocumentInfo.cpp b/lib/kofficecore/KoDocumentInfo.cpp index 1c9400c6..871c81fd 100644 --- a/lib/kofficecore/KoDocumentInfo.cpp +++ b/lib/kofficecore/KoDocumentInfo.cpp @@ -831,7 +831,7 @@ TQString KoDocumentInfoAbout::editingCycles() const TQString KoDocumentInfoAbout::creationDate() const { if ( m_creationDate.isValid() ) - return KGlobal::locale()->formatDateTime( m_creationDate ); + return TDEGlobal::locale()->formatDateTime( m_creationDate ); else return TQString(); } @@ -839,7 +839,7 @@ TQString KoDocumentInfoAbout::creationDate() const TQString KoDocumentInfoAbout::modificationDate() const { if ( m_modificationDate.isValid() ) - return KGlobal::locale()->formatDateTime( m_modificationDate ); + return TDEGlobal::locale()->formatDateTime( m_modificationDate ); else return TQString(); } diff --git a/lib/kofficecore/KoDocumentInfoDlg.cpp b/lib/kofficecore/KoDocumentInfoDlg.cpp index 8fd35ea9..7918fab2 100644 --- a/lib/kofficecore/KoDocumentInfoDlg.cpp +++ b/lib/kofficecore/KoDocumentInfoDlg.cpp @@ -191,7 +191,7 @@ void KoDocumentInfoDlg::deleteInfo() 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->labelModified->setText( "" ); d->m_aboutWidget->labelRevision->setText( "0" ); @@ -202,9 +202,9 @@ void KoDocumentInfoDlg::addAuthorPage( KoDocumentInfoAuthor *authorInfo ) { TQVBox *page = d->m_dialog->addVBoxPage( i18n( "Author" ) ); d->m_authorWidget = new KoDocumentInfoAuthorWidget( page ); - d->m_authorWidget->labelAuthor->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 48 ) ); - d->m_authorWidget->pbLoadKABC->setIconSet( TQIconSet( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Small ) ) ); - d->m_authorWidget->pbDelete->setIconSet( TQIconSet( KGlobal::iconLoader()->loadIcon( "eraser", KIcon::Small ) ) ); + d->m_authorWidget->labelAuthor->setPixmap( TDEGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 48 ) ); + d->m_authorWidget->pbLoadKABC->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Small ) ) ); + d->m_authorWidget->pbDelete->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "eraser", KIcon::Small ) ) ); d->m_authorWidget->leFullName->setText( authorInfo->fullName() ); d->m_authorWidget->leInitial->setText( authorInfo->initial() ); @@ -256,7 +256,7 @@ void KoDocumentInfoDlg::addAboutPage( KoDocumentInfoAbout *aboutInfo ) { TQVBox *page = d->m_dialog->addVBoxPage( i18n( "General" ) ); 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() ); if ( doc ) { @@ -302,7 +302,7 @@ void KoDocumentInfoDlg::addUserMetadataPage( KoDocumentInfoUserMetadata *userMet TQString name = it.key(); TQString value = it.data(); 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 ) ); } } diff --git a/lib/kofficecore/KoGlobal.cpp b/lib/kofficecore/KoGlobal.cpp index 3c979f93..10ee5bd9 100644 --- a/lib/kofficecore/KoGlobal.cpp +++ b/lib/kofficecore/KoGlobal.cpp @@ -51,15 +51,15 @@ KoGlobal::KoGlobal() setlocale( LC_NUMERIC, "C" ); // Install the libkoffice* translations - KGlobal::locale()->insertCatalogue("koffice"); + TDEGlobal::locale()->insertCatalogue("koffice"); KImageIO::registerFormats(); // Tell KStandardDirs about the koffice prefix - KGlobal::dirs()->addPrefix(PREFIX); + TDEGlobal::dirs()->addPrefix(PREFIX); // 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, // but we have no widget here (and moving this to KoView wouldn't allow @@ -80,7 +80,7 @@ KoGlobal::~KoGlobal() 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 if ( font.pointSize() == -1 ) { @@ -135,7 +135,7 @@ void KoGlobal::createListOfLanguages() // Many of them are already in all_languages but all_languages doesn't // 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")); for ( TQStringList::ConstIterator it = translationList.begin(); it != translationList.end(); ++it ) diff --git a/lib/kofficecore/KoGlobal.h b/lib/kofficecore/KoGlobal.h index 367a150b..cad645b4 100644 --- a/lib/kofficecore/KoGlobal.h +++ b/lib/kofficecore/KoGlobal.h @@ -33,7 +33,7 @@ class KOFFICECORE_EXPORT KoGlobal public: /// For KoApplication 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. diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp index 2487993a..70275b6e 100644 --- a/lib/kofficecore/KoMainWindow.cpp +++ b/lib/kofficecore/KoMainWindow.cpp @@ -201,7 +201,7 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name ) // part's instance! (Simon) 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 ) ); 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))); // Load list of recent files - KConfig * config = instance ? instance->config() : KGlobal::config(); + KConfig * config = instance ? instance->config() : TDEGlobal::config(); m_recent->loadEntries( config ); createShellGUI(); @@ -293,7 +293,7 @@ KoMainWindow::KoMainWindow( TDEInstance *instance, const char* name ) if ( !initialGeometrySet() ) { // Default size - const int deskWidth = KGlobalSettings::desktopGeometry(this).width(); + const int deskWidth = TDEGlobalSettings::desktopGeometry(this).width(); if (deskWidth > 1100) // very big desktop ? resize( 1000, 800 ); if (deskWidth > 850) // big desktop ? @@ -443,7 +443,7 @@ void KoMainWindow::addRecentURL( const KURL& url ) if ( url.isLocalFile() ) { 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 ) if ( path.contains( *it ) ) ok = false; // it's in the tmp resource @@ -462,7 +462,7 @@ void KoMainWindow::addRecentURL( const KURL& url ) void KoMainWindow::saveRecentFiles() { // 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; m_recent->saveEntries( config ); config->sync(); @@ -478,7 +478,7 @@ void KoMainWindow::saveRecentFiles() void KoMainWindow::reloadRecentFileList() { - KConfig * config = instance() ? instance()->config() : KGlobal::config(); + KConfig * config = instance() ? instance()->config() : TDEGlobal::config(); m_recent->loadEntries( config ); } @@ -998,8 +998,8 @@ void KoMainWindow::saveWindowSettings() d->m_windowSizeDirty = false; // 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; - saveMainWindowSettings( KGlobal::config(), rootDocument()->instance()->instanceName() ); - KGlobal::config()->sync(); + saveMainWindowSettings( TDEGlobal::config(), rootDocument()->instance()->instanceName() ); + TDEGlobal::config()->sync(); resetAutoSaveSettings(); // Don't let KMainWindow override the good stuff we wrote down } } @@ -1212,7 +1212,7 @@ void KoMainWindow::print(bool quick) { if ( title.isEmpty() ) { // #139905 - breaks message freeze though //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.setDocFileName( fileName ); @@ -1275,7 +1275,7 @@ void KoMainWindow::slotConfigureKeys() void KoMainWindow::slotConfigureToolbars() { if (rootDocument()) - saveMainWindowSettings( KGlobal::config(), rootDocument()->instance()->instanceName() ); + saveMainWindowSettings( TDEGlobal::config(), rootDocument()->instance()->instanceName() ); KEditToolbar edit(factory(), this); connect(&edit,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); (void) edit.exec(); @@ -1284,7 +1284,7 @@ void KoMainWindow::slotConfigureToolbars() void KoMainWindow::slotNewToolbarConfig() { if (rootDocument()) - applyMainWindowSettings( KGlobal::config(), rootDocument()->instance()->instanceName() ); + applyMainWindowSettings( TDEGlobal::config(), rootDocument()->instance()->instanceName() ); KXMLGUIFactory *factory = guiFactory(); // Check if there's an active view @@ -1315,7 +1315,7 @@ void KoMainWindow::slotToolbarToggled( bool toggle ) bar->hide(); if (rootDocument()) - saveMainWindowSettings( KGlobal::config(), rootDocument()->instance()->instanceName() ); + saveMainWindowSettings( TDEGlobal::config(), rootDocument()->instance()->instanceName() ); } else kdWarning(30003) << "slotToolbarToggled : Toolbar " << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() << " not found!" << endl; diff --git a/lib/kofficecore/KoPageLayout.cpp b/lib/kofficecore/KoPageLayout.cpp index c3965d45..62d81b32 100644 --- a/lib/kofficecore/KoPageLayout.cpp +++ b/lib/kofficecore/KoPageLayout.cpp @@ -215,7 +215,7 @@ KoFormat KoPageFormat::formatFromString( const TQString & string ) KoFormat KoPageFormat::defaultFormat() { - int kprinter = KGlobal::locale()->pageSize(); + int kprinter = TDEGlobal::locale()->pageSize(); for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) { if ( pageFormatInfo[ i ].kprinter == kprinter ) diff --git a/lib/kofficecore/KoPictureBase.cpp b/lib/kofficecore/KoPictureBase.cpp index 29ec51b9..5f81efde 100644 --- a/lib/kofficecore/KoPictureBase.cpp +++ b/lib/kofficecore/KoPictureBase.cpp @@ -39,7 +39,7 @@ KoPictureBase::KoPictureBase(void) // Slow mode can be very slow, especially at high zoom levels -> configurable if ( s_useSlowResizeMode == -1 ) { - KConfigGroup group( KGlobal::config(), "KOfficeImage" ); + KConfigGroup group( TDEGlobal::config(), "KOfficeImage" ); s_useSlowResizeMode = group.readNumEntry( "HighResolution", 1 ); kdDebug(30003) << "HighResolution = " << s_useSlowResizeMode << endl; } diff --git a/lib/kofficecore/KoPictureEps.cpp b/lib/kofficecore/KoPictureEps.cpp index 87547bdf..b6a05c8a 100644 --- a/lib/kofficecore/KoPictureEps.cpp +++ b/lib/kofficecore/KoPictureEps.cpp @@ -125,7 +125,7 @@ int KoPictureEps::tryScaleWithGhostScript(TQImage &image, const TQSize& size, co // create GS command line TQString cmdBuf ( "gs -sOutputFile=" ); - cmdBuf += KProcess::quote(tmpFile.name()); + cmdBuf += TDEProcess::quote(tmpFile.name()); cmdBuf += " -q -g"; cmdBuf += TQString::number( wantedWidth ); cmdBuf += "x"; diff --git a/lib/kofficecore/KoSpeaker.cpp b/lib/kofficecore/KoSpeaker.cpp index 4728c7a8..0f0bea62 100644 --- a/lib/kofficecore/KoSpeaker.cpp +++ b/lib/kofficecore/KoSpeaker.cpp @@ -113,7 +113,7 @@ KoSpeaker::KoSpeaker() Q_ASSERT(!KSpkr); KSpkr = this; d = new KoSpeakerPrivate(); - readConfig(KGlobal::config()); + readConfig(TDEGlobal::config()); } KoSpeaker::~KoSpeaker() @@ -170,7 +170,7 @@ void KoSpeaker::queueSpeech(const TQString& msg, const TQString& langCode /*= TQ // If no language code given, assume desktop setting. TQString languageCode = langCode; if (langCode.isEmpty()) - languageCode = KGlobal::locale()->language(); + languageCode = TDEGlobal::locale()->language(); // kdDebug() << "KoSpeaker::queueSpeech:languageCode = " << languageCode << endl; // 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. diff --git a/lib/kofficecore/KoTemplates.cpp b/lib/kofficecore/KoTemplates.cpp index e020213e..4b0cfe5b 100644 --- a/lib/kofficecore/KoTemplates.cpp +++ b/lib/kofficecore/KoTemplates.cpp @@ -244,7 +244,7 @@ void KoTemplateTree::readGroups() { void KoTemplateTree::readTemplates() { TQString dontShow = "imperial"; - if(KGlobal::locale()->pageSize() == TQPrinter::Letter) { + if(TDEGlobal::locale()->pageSize() == TQPrinter::Letter) { dontShow = "metric"; } diff --git a/lib/kofficecore/KoUnit.cpp b/lib/kofficecore/KoUnit.cpp index 3ba89f24..9068fc94 100644 --- a/lib/kofficecore/KoUnit.cpp +++ b/lib/kofficecore/KoUnit.cpp @@ -114,7 +114,7 @@ double KoUnit::ptToUnit( const double ptValue, const 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 ) @@ -142,7 +142,7 @@ double KoUnit::fromUserValue( double value, Unit unit ) 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 ) diff --git a/lib/kofficecore/KoView.cpp b/lib/kofficecore/KoView.cpp index 634a1393..3688de4e 100644 --- a/lib/kofficecore/KoView.cpp +++ b/lib/kofficecore/KoView.cpp @@ -219,7 +219,7 @@ KParts::PartManager *KoView::partManager() 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 ); KAction *act = KXMLGUIClient::action( name.utf8() ); diff --git a/lib/kofficeui/KoRuler.cpp b/lib/kofficeui/KoRuler.cpp index a4cd5709..74c617c5 100644 --- a/lib/kofficeui/KoRuler.cpp +++ b/lib/kofficeui/KoRuler.cpp @@ -203,7 +203,7 @@ double KoRuler::lineDistance() const /*================================================================*/ void KoRuler::drawHorizontal( TQPainter *_painter ) { - TQFont font = KGlobalSettings::toolBarFont(); + TQFont font = TDEGlobalSettings::toolBarFont(); TQFontMetrics fm( font ); resize( width(), TQMAX( fm.height() + 4, 20 ) ); @@ -366,7 +366,7 @@ void KoRuler::drawTabs( TQPainter &_painter ) /*================================================================*/ void KoRuler::drawVertical( TQPainter *_painter ) { - TQFont font = KGlobalSettings::toolBarFont(); + TQFont font = TDEGlobalSettings::toolBarFont(); TQFontMetrics fm( font ); resize( TQMAX( fm.height() + 4, 20 ), height() ); @@ -550,7 +550,7 @@ void KoRuler::mousePressEvent( TQMouseEvent *e ) break; case KoTabChooser::TAB_DEC_PNT: tab.type = T_DEC_PNT; - tab.alignChar = KGlobal::locale()->decimalSymbol()[0]; + tab.alignChar = TDEGlobal::locale()->decimalSymbol()[0]; break; default: break; } @@ -1179,7 +1179,7 @@ void KoRuler::slotMenuActivated( int i ) TQSize KoRuler::minimumSizeHint() const { TQSize size; - TQFont font = KGlobalSettings::toolBarFont(); + TQFont font = TDEGlobalSettings::toolBarFont(); TQFontMetrics fm( font ); size.setWidth( TQMAX( fm.height() + 4, 20 ) ); diff --git a/lib/kofficeui/KoSelectAction.cpp b/lib/kofficeui/KoSelectAction.cpp index 4bda8821..171c455b 100644 --- a/lib/kofficeui/KoSelectAction.cpp +++ b/lib/kofficeui/KoSelectAction.cpp @@ -125,7 +125,7 @@ int KoSelectAction::plug(TQWidget* widget, int index) if ( m_parentCollection ) { instance = m_parentCollection->instance(); } else { - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); } bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, diff --git a/lib/kofficeui/KoTemplateCreateDia.cpp b/lib/kofficeui/KoTemplateCreateDia.cpp index c3b206e8..b82efbb6 100644 --- a/lib/kofficeui/KoTemplateCreateDia.cpp +++ b/lib/kofficeui/KoTemplateCreateDia.cpp @@ -376,7 +376,7 @@ void KoTemplateCreateDia::slotSelect() { return; } // ### 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_customPixmap=TQPixmap(); updatePixmap(); diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp index cc606584..cc04c714 100644 --- a/lib/kofficeui/KoTooluButton.cpp +++ b/lib/kofficeui/KoTooluButton.cpp @@ -727,7 +727,7 @@ void KoToolButton::drawButton(TQPainter *_painter) qDrawShadeLine( _painter, width() - ARROW_WIDTH - 1, 0, width() - ARROW_WIDTH - 1, height() - 1, colorGroup(), true ); int dx, dy; - TQFont tmp_font( KGlobalSettings::toolBarFont() ); + TQFont tmp_font( TDEGlobalSettings::toolBarFont() ); TQFontMetrics fm( tmp_font ); TQRect textRect; int textFlags = 0; @@ -796,11 +796,11 @@ void KoToolButton::drawButton(TQPainter *_painter) // Draw the text at the position given by textRect, and using textFlags if (!textLabel().isNull() && !textRect.isNull()) { - _painter->setFont( KGlobalSettings::toolBarFont() ); + _painter->setFont( TDEGlobalSettings::toolBarFont() ); if ( !isEnabled() ) _painter->setPen( palette().disabled().dark() ); else if( KToolBarButton::isRaised() ) - _painter->setPen( KGlobalSettings::toolBarHighlightColor() ); + _painter->setPen( TDEGlobalSettings::toolBarHighlightColor() ); else _painter->setPen( colorGroup().buttonText() ); _painter->drawText( textRect, textFlags, textLabel() ); diff --git a/lib/kofficeui/KoTooluButton.h b/lib/kofficeui/KoTooluButton.h index 4e1fab71..1f2ff03c 100644 --- a/lib/kofficeui/KoTooluButton.h +++ b/lib/kofficeui/KoTooluButton.h @@ -145,7 +145,7 @@ public: */ KoToolButton( const TQString& icon, int id, TQWidget* parent, 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 diff --git a/lib/kofficeui/KoUnitWidgets.cpp b/lib/kofficeui/KoUnitWidgets.cpp index 2a2c854e..3599c76a 100644 --- a/lib/kofficeui/KoUnitWidgets.cpp +++ b/lib/kofficeui/KoUnitWidgets.cpp @@ -90,7 +90,7 @@ KoUnitDoubleValidator::validate( TQString &s, int &pos ) 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; return num; } @@ -100,11 +100,11 @@ double KoUnitDoubleBase::toDouble( const TQString& str, bool* ok ) const TQString str2( str ); /* KLocale::readNumber wants the thousand separator exactly at 1000. 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() ) str2.remove( sep ); str2.remove( KoUnit::unitName( m_unit ) ); - const double dbl = KGlobal::locale()->readNumber( str2, ok ); + const double dbl = TDEGlobal::locale()->readNumber( str2, ok ); if ( ok ) kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << TQString::number( dbl, 'f', 12 ) << endl; else diff --git a/lib/kofficeui/kcoloractions.cpp b/lib/kofficeui/kcoloractions.cpp index 201afa8e..b6dc0408 100644 --- a/lib/kofficeui/kcoloractions.cpp +++ b/lib/kofficeui/kcoloractions.cpp @@ -249,7 +249,7 @@ int KSelectColorAction::plug( TQWidget* w, int index ) if ( parentCollection() ) instance = parentCollection()->instance(); else - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); */ id = menu->insertItem( iconSet( KIcon::Small, 0 ), text(), this,//dsweet TQT_SLOT( slotActivated() ), 0, -1, index ); @@ -285,7 +285,7 @@ int KSelectColorAction::plug( TQWidget* w, int index ) if ( parentCollection() ) instance = parentCollection()->instance(); else - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); if ( icon().isEmpty() ) // old code using TQIconSet directly { diff --git a/lib/kofficeui/tkaction.cpp b/lib/kofficeui/tkaction.cpp index 402c8d2c..7ab01d3f 100644 --- a/lib/kofficeui/tkaction.cpp +++ b/lib/kofficeui/tkaction.cpp @@ -61,7 +61,7 @@ int TKAction::plug(TQWidget* widget, int index) if ( parentCollection() ) instance = parentCollection()->instance(); else - instance = KGlobal::instance(); + instance = TDEGlobal::instance(); TKToolBarButton* b = new TKToolBarButton(icon(),plainText(),bar,name(),instance); // we don't need clicked() and buttonClicked(), do we? diff --git a/lib/kofficeui/tktoolbarbutton.cpp b/lib/kofficeui/tktoolbarbutton.cpp index c1b2f8cb..92c42c10 100644 --- a/lib/kofficeui/tktoolbarbutton.cpp +++ b/lib/kofficeui/tktoolbarbutton.cpp @@ -58,7 +58,7 @@ public: m_disabledIconName = TQString(); m_defaultIconName = TQString(); - m_instance = KGlobal::instance(); + m_instance = TDEGlobal::instance(); } ~TKToolBarButtonPrivate() @@ -154,7 +154,7 @@ void TKToolBarButton::modeChange() 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); h = TQMAX(h,fm.lineSpacing()+2*border); @@ -254,7 +254,7 @@ void TKToolBarButton::setDisabledPixmap( const TQPixmap &pixmap ) void TKToolBarButton::setPopup(TQPopupMenu *p) { d->m_popup = p; - d->m_popup->setFont(KGlobalSettings::toolBarFont()); + d->m_popup->setFont(TDEGlobalSettings::toolBarFont()); p->installEventFilter(this); 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()) {\ - 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 );\ } @@ -443,7 +443,7 @@ TQSize TKToolBarButton::minimumSizeHint() const void TKToolBarButton::showMenu() { 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 ) p.setY( p.y() - d->m_popup->height() ); else diff --git a/lib/kofficeui/tktoolbarbutton.h b/lib/kofficeui/tktoolbarbutton.h index bfa3a148..0e74b7e3 100644 --- a/lib/kofficeui/tktoolbarbutton.h +++ b/lib/kofficeui/tktoolbarbutton.h @@ -37,7 +37,7 @@ class TKToolBarButton : public TQToolButton public: TKToolBarButton(const TQString& icon, const TQString& txt, 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(); diff --git a/lib/kopalette/kopalette.cc b/lib/kopalette/kopalette.cc index 751074b7..430b972a 100644 --- a/lib/kopalette/kopalette.cc +++ b/lib/kopalette/kopalette.cc @@ -63,11 +63,11 @@ KoPalette::KoPalette(TQWidget * parent, const char * name) void KoPalette::resetFont() { - KConfig * cfg = KGlobal::config(); + KConfig * cfg = TDEGlobal::config(); Q_ASSERT(cfg); cfg->setGroup(""); - m_font = KGlobalSettings::generalFont(); - float ps = TQMIN(9, KGlobalSettings::generalFont().pointSize() * 0.8); + m_font = TDEGlobalSettings::generalFont(); + float ps = TQMIN(9, TDEGlobalSettings::generalFont().pointSize() * 0.8); ps = cfg->readNumEntry("palettefontsize", (int)ps); if (ps < 6) ps = 6; m_font.setPointSize((int)ps); diff --git a/lib/kopalette/kopalettemanager.cc b/lib/kopalette/kopalettemanager.cc index 91d237a3..7d4a32d9 100644 --- a/lib/kopalette/kopalettemanager.cc +++ b/lib/kopalette/kopalettemanager.cc @@ -65,7 +65,7 @@ KoPaletteManager::KoPaletteManager(KoView * view, KActionCollection *ac, const c connect(m_mapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(slotTogglePalette(int))); m_viewActionMenu = new KActionMenu(i18n("Palettes"), m_actionCollection, "view_palette_action_menu"); - KConfig * cfg = KGlobal::config(); + KConfig * cfg = TDEGlobal::config(); cfg->setGroup("palettes"); bool palettesShown = cfg->readBoolEntry("palettesshown", true); @@ -149,7 +149,7 @@ void KoPaletteManager::addWidget(TQWidget * widget, bool visible = true; - KConfig * cfg = KGlobal::config(); + KConfig * cfg = TDEGlobal::config(); if (cfg->hasGroup("palettetab-" + name)) { cfg->setGroup("palettetab-" + name); @@ -367,7 +367,7 @@ void KoPaletteManager::placePalette(const TQString & name, TQt::Dock location) if (!palette) return; //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)) { cfg->setGroup("palette-" + name); @@ -529,7 +529,7 @@ void KoPaletteManager::save() if (!m_view) return; if (!m_view->mainWindow()) return; - KConfig * cfg = KGlobal::config(); + KConfig * cfg = TDEGlobal::config(); Q_ASSERT(cfg); cfg->setGroup(""); diff --git a/lib/koproperty/editor.cpp b/lib/koproperty/editor.cpp index 7040e885..39c965a5 100644 --- a/lib/koproperty/editor.cpp +++ b/lib/koproperty/editor.cpp @@ -72,7 +72,7 @@ class EditorPrivate itemToSelectLater = 0; if (!kofficeAppDirAdded) { kofficeAppDirAdded = true; - KGlobal::iconLoader()->addAppDir("koffice"); + TDEGlobal::iconLoader()->addAppDir("koffice"); } previouslyCollapsedGroupItem = 0; childFormPreviouslyCollapsedGroupItem = 0; diff --git a/lib/koproperty/editors/combobox.cpp b/lib/koproperty/editors/combobox.cpp index b9606e0e..164c5816 100644 --- a/lib/koproperty/editors/combobox.cpp +++ b/lib/koproperty/editors/combobox.cpp @@ -146,7 +146,7 @@ ComboBox::fillBox() m_edit->insertStringList(property()->listData()->names); KCompletion *comp = m_edit->completionObject(); comp->insertItems(property()->listData()->names); - comp->setCompletionMode(KGlobalSettings::CompletionShell); + comp->setCompletionMode(TDEGlobalSettings::CompletionShell); } void diff --git a/lib/koproperty/editors/dateedit.cpp b/lib/koproperty/editors/dateedit.cpp index 11c36a54..d26dbb30 100644 --- a/lib/koproperty/editors/dateedit.cpp +++ b/lib/koproperty/editors/dateedit.cpp @@ -70,8 +70,8 @@ void DateEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) { p->eraseRect(r); - Widget::drawViewer(p, cg, r, KGlobal::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*/ )); + Widget::drawViewer(p, cg, r, TDEGlobal::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 diff --git a/lib/koproperty/editors/datetimeedit.cpp b/lib/koproperty/editors/datetimeedit.cpp index 6ab541de..1ed2c9c6 100644 --- a/lib/koproperty/editors/datetimeedit.cpp +++ b/lib/koproperty/editors/datetimeedit.cpp @@ -69,9 +69,9 @@ void DateTimeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) { 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, -// 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 diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp index 8c9dbab9..97a3177d 100644 --- a/lib/koproperty/editors/spinbox.cpp +++ b/lib/koproperty/editors/spinbox.cpp @@ -291,7 +291,7 @@ DoubleEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, co } } 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); // p->eraseRect(r); diff --git a/lib/koproperty/editors/timeedit.cpp b/lib/koproperty/editors/timeedit.cpp index f89530ea..767ba83d 100644 --- a/lib/koproperty/editors/timeedit.cpp +++ b/lib/koproperty/editors/timeedit.cpp @@ -68,8 +68,8 @@ TimeEdit::setValue(const TQVariant &value, bool emitChange) void 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*/)); -// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, 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, TDEGlobal::locale()->formatTime(value.toTime(), true /* include sec*/)); } void diff --git a/lib/kotext/KFontDialog_local.cpp b/lib/kotext/KFontDialog_local.cpp index 8be2f699..1dbed289 100644 --- a/lib/kotext/KFontDialog_local.cpp +++ b/lib/kotext/KFontDialog_local.cpp @@ -293,7 +293,7 @@ KFontChooser_local::KFontChooser_local(TQWidget *parent, const char *name, row ++; 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->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog")); sampleEdit->setMinimumHeight( sampleEdit->fontMetrics().lineSpacing() ); @@ -327,12 +327,12 @@ KFontChooser_local::KFontChooser_local(TQWidget *parent, const char *name, vbox->addWidget( xlfdEdit ); // lets initialize the display if possible - setFont( KGlobalSettings::generalFont(), usingFixed ); + setFont( TDEGlobalSettings::generalFont(), usingFixed ); // check or uncheck or gray out the "relative" checkbox if( sizeIsRelativeState && sizeIsRelativeCheckBox ) setSizeIsRelative( *sizeIsRelativeState ); - KConfig *config = KGlobal::config(); + KConfig *config = TDEGlobal::config(); KConfigGroupSaver saver(config, TQString::fromLatin1("General")); showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false)); } @@ -725,7 +725,7 @@ void KFontChooser_local::setFamilyList( TQStringList list ) familyListBox->blockSignals( true ); familyListBox->clear(); familyListBox->insertStringList( list ); - setFont( KGlobalSettings::generalFont(), usingFixed ); + setFont( TDEGlobalSettings::generalFont(), usingFixed ); familyListBox->blockSignals( false ); } diff --git a/lib/kotext/KoAutoFormatDia.cpp b/lib/kotext/KoAutoFormatDia.cpp index 74b35908..eacf63a3 100644 --- a/lib/kotext/KoAutoFormatDia.cpp +++ b/lib/kotext/KoAutoFormatDia.cpp @@ -512,7 +512,7 @@ void KoAutoFormatDia::setupTab3() { 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; if ( readableName.isEmpty() ) tmp =(*it).left((*it).length()-4); diff --git a/lib/kotext/KoCommentDia.cpp b/lib/kotext/KoCommentDia.cpp index 9882e6de..e313d5b2 100644 --- a/lib/kotext/KoCommentDia.cpp +++ b/lib/kotext/KoCommentDia.cpp @@ -64,8 +64,8 @@ TQString KoCommentDia::commentText() void KoCommentDia::slotAddAuthorName() { - TQString date = KGlobal::locale()->formatDate( TQDate::currentDate() ); - TQString time = KGlobal::locale()->formatTime( TQTime::currentTime() ); + TQString date = TDEGlobal::locale()->formatDate( TQDate::currentDate() ); + TQString time = TDEGlobal::locale()->formatTime( TQTime::currentTime() ); TQString result = TQString("--------%1 ,%2, %3------\n").arg(authorName).arg(date).arg(time); m_multiLine->insertLine( result, m_multiLine->numLines() ); } diff --git a/lib/kotext/KoParagDia.cpp b/lib/kotext/KoParagDia.cpp index 0e38c8b5..200b1f32 100644 --- a/lib/kotext/KoParagDia.cpp +++ b/lib/kotext/KoParagDia.cpp @@ -794,7 +794,7 @@ KoStylePreview::KoStylePreview( const TQString& title, const TQString& text, TQW setMinimumHeight(80); m_zoomHandler = new KoTextZoomHandler; 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->setWidth( KoTextZoomHandler::ptToLayoutUnitPt( 1000 ) ); @@ -1827,7 +1827,7 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram sAlignChar = new TQLineEdit( bgAlign); sAlignChar->setMaximumSize( TQSize( 60, 32767 ) ); - sAlignChar->setText(TQString(KGlobal::locale()->decimalSymbol()[0])); + sAlignChar->setText(TQString(TDEGlobal::locale()->decimalSymbol()[0])); Layout8->addWidget( sAlignChar ); TQSpacerItem* spacer_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); Layout8->addItem( spacer_2 ); diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp index 37fbbfb5..7fd214be 100644 --- a/lib/kotext/KoParagLayout.cpp +++ b/lib/kotext/KoParagLayout.cpp @@ -164,7 +164,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& tab.ptWidth = getAttribute( element, "width", 0.5 ); TQString alignCharStr = element.attribute("alignchar"); if ( alignCharStr.isEmpty() ) - tab.alignChar = KGlobal::locale()->decimalSymbol()[0]; + tab.alignChar = TDEGlobal::locale()->decimalSymbol()[0]; else tab.alignChar = alignCharStr[0]; tabList.append( tab ); diff --git a/lib/kotext/KoTextFormat.cpp b/lib/kotext/KoTextFormat.cpp index 2554d4ee..0f3d48d2 100644 --- a/lib/kotext/KoTextFormat.cpp +++ b/lib/kotext/KoTextFormat.cpp @@ -67,7 +67,7 @@ KoTextFormat::KoTextFormat() m_strikeOutType = S_NONE; m_underlineStyle = U_SOLID; m_strikeOutStyle = S_SOLID; - m_language = KGlobal::locale()->language(); + m_language = TDEGlobal::locale()->language(); d->m_bHyphenation = false; d->m_underLineWidth = 1.0; d->m_shadowDistanceX = 0; @@ -1678,7 +1678,7 @@ KoTextFormatCollection::KoTextFormatCollection() #ifdef DEBUG_COLLECTION kdDebug(32500) << "KoTextFormatCollection::KoTextFormatCollection " << this << endl; #endif - defFormat = new KoTextFormat( TQApplication::font(), TQColor(), KGlobal::locale()->language(), false ); + defFormat = new KoTextFormat( TQApplication::font(), TQColor(), TDEGlobal::locale()->language(), false ); lastFormat = cres = 0; cflags = -1; cKey.setAutoDelete( TRUE ); diff --git a/lib/kotext/KoTextParag.cpp b/lib/kotext/KoTextParag.cpp index cc1aecb9..c9f0a831 100644 --- a/lib/kotext/KoTextParag.cpp +++ b/lib/kotext/KoTextParag.cpp @@ -3163,7 +3163,7 @@ void KoTextParag::drawFormattingChars( TQPainter &painter, int start, int len, return; painter.save(); //TQPen pen( cg.color( TQColorGroup::Highlight ) ); - TQPen pen( KGlobalSettings::linkColor() ); // #101820 + TQPen pen( TDEGlobalSettings::linkColor() ); // #101820 painter.setPen( pen ); //kdDebug() << "KWTextParag::drawFormattingChars start=" << start << " len=" << len << " length=" << length() << endl; if ( start + len == length() && ( whichFormattingChars & FormattingEndParag ) ) diff --git a/lib/kotext/KoVariable.cpp b/lib/kotext/KoVariable.cpp index 489752f0..6b040905 100644 --- a/lib/kotext/KoVariable.cpp +++ b/lib/kotext/KoVariable.cpp @@ -235,18 +235,18 @@ TQString KoVariableDateFormat::convert( const TQVariant& data ) const return i18n("No date set"); // e.g. old KWord documents 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" ) - return KGlobal::locale()->formatDate( dateTime.date(), true ); + return TDEGlobal::locale()->formatDate( dateTime.date(), true ); else if ( m_strFormat.lower() == "localedatetime" ) - return KGlobal::locale()->formatDateTime( dateTime, false ); + return TDEGlobal::locale()->formatDateTime( dateTime, false ); else if ( m_strFormat.lower() == "localedatetimeshort" ) - return KGlobal::locale()->formatDateTime( dateTime, true ); + return TDEGlobal::locale()->formatDateTime( dateTime, true ); TQString tmp ( dateTime.toString(m_strFormat) ); const int month = dateTime.date().month(); - tmp.replace("PPPP", KGlobal::locale()->calendar()->monthNamePossessive(month, false)); //long possessive month name - tmp.replace("PPP", KGlobal::locale()->calendar()->monthNamePossessive(month, true)); //short possessive month name + tmp.replace("PPPP", TDEGlobal::locale()->calendar()->monthNamePossessive(month, false)); //long possessive month name + tmp.replace("PPP", TDEGlobal::locale()->calendar()->monthNamePossessive(month, true)); //short possessive month name return tmp; } @@ -350,7 +350,7 @@ TQString KoVariableTimeFormat::convert( const TQVariant & time ) const } 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); } @@ -1198,11 +1198,11 @@ void KoDateVariable::resize() TQString oldLanguage; if ( !fmt->language().isEmpty()) { - oldLanguage=KGlobal::locale()->language(); - bool changeLanguage = KGlobal::locale()->setLanguage( fmt->language() ); + oldLanguage=TDEGlobal::locale()->language(); + bool changeLanguage = TDEGlobal::locale()->setLanguage( fmt->language() ); KoVariable::resize(); if ( changeLanguage ) - KGlobal::locale()->setLanguage( oldLanguage ); + TDEGlobal::locale()->setLanguage( oldLanguage ); } else KoVariable::resize(); @@ -1315,13 +1315,13 @@ void KoDateVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& context ) value.lower() == "localedatetimeshort" ) { if ( value.lower() == "locale" || value.isEmpty()) - value = KGlobal::locale()->dateFormat(); + value = TDEGlobal::locale()->dateFormat(); else if ( value.lower() == "localeshort" ) - value = KGlobal::locale()->dateFormatShort(); + value = TDEGlobal::locale()->dateFormatShort(); 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" ) - 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; } writer.addAttribute( "style:data-style-name", KoOasisStyles::saveOasisDateStyle(context.mainStyles(), value, klocaleFormat ) ); @@ -1466,11 +1466,11 @@ void KoTimeVariable::resize() KoTextFormat * fmt = format(); if ( !fmt->language().isEmpty() ) { - TQString oldLanguage = KGlobal::locale()->language(); - bool changeLanguage = KGlobal::locale()->setLanguage( fmt->language() ); + TQString oldLanguage = TDEGlobal::locale()->language(); + bool changeLanguage = TDEGlobal::locale()->setLanguage( fmt->language() ); KoVariable::resize(); if ( changeLanguage ) - KGlobal::locale()->setLanguage( oldLanguage ); + TDEGlobal::locale()->setLanguage( oldLanguage ); } else KoVariable::resize(); @@ -1570,7 +1570,7 @@ void KoTimeVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& context ) bool klocaleFormat = false; if ( value.lower() == "locale" ) { - value = KGlobal::locale()->timeFormat(); + value = TDEGlobal::locale()->timeFormat(); klocaleFormat = true; } 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 { - return KGlobal::locale()->formatDate( m_createdNoteDate, false ); + return TDEGlobal::locale()->formatDate( m_createdNoteDate, false ); } void KoNoteVariable::loadOasis( const TQDomElement &elem, KoOasisContext& /*context*/ ) diff --git a/lib/kotext/tests/kotextformattertest.cpp b/lib/kotext/tests/kotextformattertest.cpp index 38aab237..c75d8c89 100644 --- a/lib/kotext/tests/kotextformattertest.cpp +++ b/lib/kotext/tests/kotextformattertest.cpp @@ -205,8 +205,8 @@ int main (int argc, char ** argv) TDEApplication app(argc, argv, "KoTextFormatter test"); // Don't let locale settings lead to different hyphenation output - KGlobal::locale()->setLanguage( TQString::fromLatin1( "en_US" ) ); - KGlobal::locale()->setCountry( TQString::fromLatin1( "C" ) ); + TDEGlobal::locale()->setLanguage( TQString::fromLatin1( "en_US" ) ); + TDEGlobal::locale()->setCountry( TQString::fromLatin1( "C" ) ); KoTextFormatterTest test; //test.speedTest(); diff --git a/lib/kross/api/interpreter.h b/lib/kross/api/interpreter.h index ebb1a09b..04630b07 100644 --- a/lib/kross/api/interpreter.h +++ b/lib/kross/api/interpreter.h @@ -94,7 +94,7 @@ namespace Kross { namespace Api { /** * \return the file-wildcard used to determinate by this interpreter * 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". */ const TQString getWildcard(); diff --git a/lib/kross/main/scriptguiclient.cpp b/lib/kross/main/scriptguiclient.cpp index 88877f5a..05e4f9aa 100644 --- a/lib/kross/main/scriptguiclient.cpp +++ b/lib/kross/main/scriptguiclient.cpp @@ -139,7 +139,7 @@ void ScriptGUIClient::reloadInstalledScripts() installedcollection->clear(); 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(); for(TQStringList::iterator it = files.begin(); it != files.end(); ++it) loadScriptConfigFile(*it); @@ -155,8 +155,8 @@ bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile) } TQCString partname = d->guiclient->instance()->instanceName(); - TQString destination = KGlobal::dirs()->saveLocation("data", partname + "/scripts/", true); - //TQString destination = KGlobal::dirs()->saveLocation("appdata", "scripts", true); + TQString destination = TDEGlobal::dirs()->saveLocation("data", partname + "/scripts/", true); + //TQString destination = TDEGlobal::dirs()->saveLocation("appdata", "scripts", true); if(destination.isNull()) { krosswarning("ScriptGUIClient::installScriptPackage() Failed to determinate location where the scriptpackage should be installed to!"); return false; diff --git a/lib/kross/main/wdgscriptsmanager.cpp b/lib/kross/main/wdgscriptsmanager.cpp index d7234332..99b2d058 100644 --- a/lib/kross/main/wdgscriptsmanager.cpp +++ b/lib/kross/main/wdgscriptsmanager.cpp @@ -137,18 +137,18 @@ WdgScriptsManager::WdgScriptsManager(ScriptGUIClient* scr, TQWidget* parent, con slotSelectionChanged(0); 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())); - 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())); - 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())); - 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())); - 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())); #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())); #endif /* @@ -218,7 +218,7 @@ TQListViewItem* WdgScriptsManager::addItem(ScriptAction::Ptr action, TQListViewI TQPixmap pm; if(action->hasIcon()) { - KIconLoader* icons = KGlobal::iconLoader(); + KIconLoader* icons = TDEGlobal::iconLoader(); pm = icons->loadIconSet(action->icon(), KIcon::Small).pixmap(TQIconSet::Small, TQIconSet::Active); } else { @@ -346,7 +346,7 @@ void WdgScriptsManager::slotResourceInstalled() // Delete KNewStuff's configuration entries. These entries reflect what has // already been installed. As we cannot yet keep them in sync after uninstalling // scripts, we deactivate the check marks entirely. - KGlobal::config()->deleteGroup("KNewStuffStatus"); + TDEGlobal::config()->deleteGroup("KNewStuffStatus"); } }} diff --git a/lib/kross/python/pythoninterpreter.cpp b/lib/kross/python/pythoninterpreter.cpp index ded5dbc9..3b956fe0 100644 --- a/lib/kross/python/pythoninterpreter.cpp +++ b/lib/kross/python/pythoninterpreter.cpp @@ -111,11 +111,11 @@ PythonInterpreter::PythonInterpreter(Kross::Api::InterpreterInfo* info) // Determinate additional module-paths we like to add. // 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) path.append(*krossit + PYPATHDELIMITER); // 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) path.append(*appit + PYPATHDELIMITER); diff --git a/lib/kross/test/testwindow.cpp b/lib/kross/test/testwindow.cpp index ec2960b0..ec0090b6 100644 --- a/lib/kross/test/testwindow.cpp +++ b/lib/kross/test/testwindow.cpp @@ -48,7 +48,7 @@ TestWindow::TestWindow(const TQString& interpretername, const TQString& scriptco 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()) file = TQDir(TQDir::currentDirPath()).filePath("testscripting.rc"); else Kross::krossdebug("-------------------------222222"); |