diff options
author | Timothy Pearson <[email protected]> | 2013-01-25 00:30:47 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-25 00:30:47 -0600 |
commit | cc74f360bb40da3d79f58048f8e8611804980aa6 (patch) | |
tree | c4385d2c16b904757b1c8bb998a4aec6993373f7 /kcontrol/kthememanager | |
parent | 79b21d47bce1ee428affc97534cd8b257232a871 (diff) | |
download | tdebase-cc74f360bb40da3d79f58048f8e8611804980aa6.tar.gz tdebase-cc74f360bb40da3d79f58048f8e8611804980aa6.zip |
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'kcontrol/kthememanager')
-rw-r--r-- | kcontrol/kthememanager/ktheme.cpp | 54 | ||||
-rw-r--r-- | kcontrol/kthememanager/ktheme.h | 18 | ||||
-rw-r--r-- | kcontrol/kthememanager/kthememanager.cpp | 10 | ||||
-rw-r--r-- | kcontrol/kthememanager/kthememanager.h | 2 |
4 files changed, 42 insertions, 42 deletions
diff --git a/kcontrol/kthememanager/ktheme.cpp b/kcontrol/kthememanager/ktheme.cpp index aebf467a0..faf6feb9c 100644 --- a/kcontrol/kthememanager/ktheme.cpp +++ b/kcontrol/kthememanager/ktheme.cpp @@ -89,7 +89,7 @@ bool KTheme::load( const KURL & url ) kdDebug() << "Loading theme from URL: " << url << endl; TQString tmpFile; - if ( !KIO::NetAccess::download( url, tmpFile, 0L ) ) + if ( !TDEIO::NetAccess::download( url, tmpFile, 0L ) ) return false; kdDebug() << "Theme is in temp file: " << tmpFile << endl; @@ -111,7 +111,7 @@ bool KTheme::load( const KURL & url ) file.close(); // remove the temp file - KIO::NetAccess::removeTempFile( tmpFile ); + TDEIO::NetAccess::removeTempFile( tmpFile ); return true; } @@ -125,13 +125,13 @@ TQString KTheme::createYourself( bool pack ) // 1. General stuff set by methods setBlah() // 2. Background theme - KConfig * globalConf = TDEGlobal::config(); + TDEConfig * globalConf = TDEGlobal::config(); - KConfig twinConf( "twinrc", true ); + TDEConfig twinConf( "twinrc", true ); twinConf.setGroup( "Desktops" ); uint numDesktops = twinConf.readUnsignedNumEntry( "Number", 4 ); - KConfig desktopConf( "kdesktoprc", true ); + TDEConfig desktopConf( "kdesktoprc", true ); desktopConf.setGroup( "Background Common" ); bool common = desktopConf.readBoolEntry( "CommonDesktop", true ); @@ -197,7 +197,7 @@ TQString KTheme::createYourself( bool pack ) // 4. Sounds // 4.1 Global sounds - KConfig * soundConf = new KConfig( "knotify.eventsrc", true ); + TDEConfig * soundConf = new TDEConfig( "knotify.eventsrc", true ); TQStringList stdEvents; stdEvents << "cannotopenfile" << "catastrophe" << "exitkde" << "fatalerror" << "notification" << "printerror" << "starttde" << "warning" @@ -205,7 +205,7 @@ TQString KTheme::createYourself( bool pack ) << "messageboxQuestion"; // 4.2 KWin sounds - KConfig * twinSoundConf = new KConfig( "twin.eventsrc", true ); + TDEConfig * twinSoundConf = new TDEConfig( "twin.eventsrc", true ); TQStringList twinEvents; twinEvents << "activate" << "close" << "delete" << "desktop1" << "desktop2" << "desktop3" << "desktop4" << @@ -247,7 +247,7 @@ TQString KTheme::createYourself( bool pack ) m_root.appendChild( colorsElem ); // 6. Cursors - KConfig* mouseConf = new KConfig( "kcminputrc", true ); + TDEConfig* mouseConf = new TDEConfig( "kcminputrc", true ); mouseConf->setGroup( "Mouse" ); TQDomElement cursorsElem = m_dom.createElement( "cursors" ); cursorsElem.setAttribute( "name", mouseConf->readEntry( "cursorTheme" ) ); @@ -273,7 +273,7 @@ TQString KTheme::createYourself( bool pack ) m_root.appendChild( wmElem ); // 8. Konqueror - KConfig konqConf( "konquerorrc", true ); + TDEConfig konqConf( "konquerorrc", true ); konqConf.setGroup( "Settings" ); TQDomElement konqElem = m_dom.createElement( "konqueror" ); TQDomElement konqWallElem = m_dom.createElement( "wallpaper" ); @@ -286,7 +286,7 @@ TQString KTheme::createYourself( bool pack ) m_root.appendChild( konqElem ); // 9. Kicker (aka TDE Panel) - KConfig kickerConf( "kickerrc", true ); + TDEConfig kickerConf( "kickerrc", true ); kickerConf.setGroup( "General" ); TQDomElement panelElem = m_dom.createElement( "panel" ); @@ -396,7 +396,7 @@ void KTheme::apply() // 2. Background theme TQDomNodeList desktopList = m_dom.elementsByTagName( "desktop" ); - KConfig desktopConf( "kdesktoprc" ); + TDEConfig desktopConf( "kdesktoprc" ); desktopConf.setGroup( "Background Common" ); for ( uint i = 0; i <= desktopList.count(); i++ ) @@ -448,7 +448,7 @@ void KTheme::apply() TQDomElement iconElem = m_dom.elementsByTagName( "icons" ).item( 0 ).toElement(); if ( !iconElem.isNull() ) { - KConfig * iconConf = TDEGlobal::config(); + TDEConfig * iconConf = TDEGlobal::config(); iconConf->setGroup( "Icons" ); iconConf->writeEntry( "Theme", iconElem.attribute( "name", "crystalsvg" ), true, true ); @@ -492,8 +492,8 @@ void KTheme::apply() TQDomElement soundsElem = m_dom.elementsByTagName( "sounds" ).item( 0 ).toElement(); if ( !soundsElem.isNull() ) { - KConfig soundConf( "knotify.eventsrc" ); - KConfig twinSoundConf( "twin.eventsrc" ); + TDEConfig soundConf( "knotify.eventsrc" ); + TDEConfig twinSoundConf( "twin.eventsrc" ); TQDomNodeList eventList = soundsElem.elementsByTagName( "event" ); for ( uint i = 0; i < eventList.count(); i++ ) { @@ -526,7 +526,7 @@ void KTheme::apply() if ( !colorsElem.isNull() ) { TQDomNodeList colorList = colorsElem.childNodes(); - KConfig * colorConf = TDEGlobal::config(); + TDEConfig * colorConf = TDEGlobal::config(); TQString sCurrentScheme = locateLocal("data", "kdisplay/color-schemes/thememgr.kcsrc"); KSimpleConfig *colorScheme = new KSimpleConfig( sCurrentScheme ); @@ -562,7 +562,7 @@ void KTheme::apply() if ( !cursorsElem.isNull() ) { - KConfig mouseConf( "kcminputrc" ); + TDEConfig mouseConf( "kcminputrc" ); mouseConf.setGroup( "Mouse" ); mouseConf.writeEntry( "cursorTheme", cursorsElem.attribute( "name" )); // FIXME is there a way to notify KDE of cursor changes? @@ -573,7 +573,7 @@ void KTheme::apply() if ( !wmElem.isNull() ) { - KConfig twinConf( "twinrc" ); + TDEConfig twinConf( "twinrc" ); twinConf.setGroup( "Style" ); TQString type = wmElem.attribute( "type" ); if ( type == "builtin" ) @@ -601,7 +601,7 @@ void KTheme::apply() if ( !konqElem.isNull() ) { - KConfig konqConf( "konquerorrc" ); + TDEConfig konqConf( "konquerorrc" ); konqConf.setGroup( "Settings" ); konqConf.writeEntry( "BgImage", unprocessFilePath( "konqueror", getProperty( konqElem, "wallpaper", "url" ) ) ); konqConf.writeEntry( "BgColor", TQColor( getProperty( konqElem, "bgcolor", "rgb" ) ) ); @@ -615,7 +615,7 @@ void KTheme::apply() if ( !panelElem.isNull() ) { - KConfig kickerConf( "kickerrc" ); + TDEConfig kickerConf( "kickerrc" ); kickerConf.setGroup( "General" ); TQString kickerBgUrl = getProperty( panelElem, "background", "url" ); if ( !kickerBgUrl.isEmpty() ) @@ -643,7 +643,7 @@ void KTheme::apply() if ( !widgetsElem.isNull() ) { - KConfig * widgetConf = TDEGlobal::config(); + TDEConfig * widgetConf = TDEGlobal::config(); widgetConf->setGroup( "General" ); widgetConf->writeEntry( "widgetStyle", widgetsElem.attribute( "name" ), true, true ); widgetConf->sync(); @@ -654,8 +654,8 @@ void KTheme::apply() TQDomElement fontsElem = m_dom.elementsByTagName( "fonts" ).item( 0 ).toElement(); if ( !fontsElem.isNull() ) { - KConfig * fontsConf = TDEGlobal::config(); - KConfig * kde1xConf = new KSimpleConfig( TQDir::homeDirPath() + "/.kderc" ); + TDEConfig * fontsConf = TDEGlobal::config(); + TDEConfig * kde1xConf = new KSimpleConfig( TQDir::homeDirPath() + "/.kderc" ); kde1xConf->setGroup( "General" ); TQDomNodeList fontList = fontsElem.childNodes(); @@ -688,7 +688,7 @@ void KTheme::apply() bool KTheme::remove( const TQString & name ) { kdDebug() << "Going to remove theme: " << name << endl; - return KIO::NetAccess::del( TDEGlobal::dirs()->saveLocation( "themes", name + "/" ), 0L ); + return TDEIO::NetAccess::del( TDEGlobal::dirs()->saveLocation( "themes", name + "/" ), 0L ); } void KTheme::setProperty( const TQString & name, const TQString & value, TQDomElement parent ) @@ -726,7 +726,7 @@ TQString KTheme::getProperty( TQDomElement parent, const TQString & tag, } void KTheme::createIconElems( const TQString & group, const TQString & object, - TQDomElement parent, KConfig * cfg ) + TQDomElement parent, TDEConfig * cfg ) { cfg->setGroup( group ); TQStringList elemNames; @@ -759,7 +759,7 @@ void KTheme::createIconElems( const TQString & group, const TQString & object, } void KTheme::createColorElem( const TQString & name, const TQString & object, - TQDomElement parent, KConfig * cfg ) + TQDomElement parent, TDEConfig * cfg ) { TQColor color = cfg->readColorEntry( name ); if ( color.isValid() ) @@ -772,7 +772,7 @@ void KTheme::createColorElem( const TQString & name, const TQString & object, } void KTheme::createSoundList( const TQStringList & events, const TQString & object, - TQDomElement parent, KConfig * cfg ) + TQDomElement parent, TDEConfig * cfg ) { for ( TQStringList::ConstIterator it = events.begin(); it != events.end(); ++it ) { @@ -876,7 +876,7 @@ void KTheme::addPreview() bool KTheme::copyFile( const TQString & from, const TQString & to ) { // we overwrite b/c of restoring the "original" theme - return KIO::NetAccess::file_copy( from, to, -1, true /*overwrite*/ ); + return TDEIO::NetAccess::file_copy( from, to, -1, true /*overwrite*/ ); } TQString KTheme::findResource( const TQString & section, const TQString & path ) diff --git a/kcontrol/kthememanager/ktheme.h b/kcontrol/kthememanager/ktheme.h index fd659d3c7..4efad8527 100644 --- a/kcontrol/kthememanager/ktheme.h +++ b/kcontrol/kthememanager/ktheme.h @@ -28,7 +28,7 @@ #include <kurl.h> class KStandardDirs; -class KConfig; +class TDEConfig; /// defines the syntax version used by the XML #define SYNTAX_VERSION 1 @@ -153,30 +153,30 @@ private: /** * Creates a list of "icon" elements based on: - * @param group The group in the KConfig object @p cfg + * @param group The group in the TDEConfig object @p cfg * @param object Specifier (similiar, but not identical to @p group) * @param parent Parent element to append to - * @param cfg The KConfig object to work with + * @param cfg The TDEConfig object to work with */ void createIconElems( const TQString & group, const TQString & object, - TQDomElement parent, KConfig * cfg ); + TQDomElement parent, TDEConfig * cfg ); /** * Creates a color DOM element @p name, with a specifier @p object, * appends it to @p parent; used when creating themes - * @param cfg The KConfig object to work with + * @param cfg The TDEConfig object to work with */ void createColorElem( const TQString & name, const TQString & object, - TQDomElement parent, KConfig * cfg ); + TQDomElement parent, TDEConfig * cfg ); /** * Creates a list of "event" elements based on: * @param events The list of events to work on * @param object Specifier (currently "global" or "twin") * @param parent Parent element to append to - * @param cfg The KConfig object to work with + * @param cfg The TDEConfig object to work with */ void createSoundList( const TQStringList & events, const TQString & object, - TQDomElement parent, KConfig * cfg ); + TQDomElement parent, TDEConfig * cfg ); /** * Tries to find out absolute path to a resource and copy it to the theme's temp dir; @@ -195,7 +195,7 @@ private: TQString unprocessFilePath( const TQString & section, TQString path ); /** - * Wrapper around KIO::NetAccess::file_copy + * Wrapper around TDEIO::NetAccess::file_copy */ bool copyFile( const TQString & from, const TQString & to ); diff --git a/kcontrol/kthememanager/kthememanager.cpp b/kcontrol/kthememanager/kthememanager.cpp index 5489aedbf..f4b7835bb 100644 --- a/kcontrol/kthememanager/kthememanager.cpp +++ b/kcontrol/kthememanager/kthememanager.cpp @@ -43,7 +43,7 @@ #include "config.h" kthememanager::kthememanager( TQWidget *parent, const char *name ) - : KCModule( parent, name ), m_theme( 0 ), m_origTheme( 0 ) + : TDECModule( parent, name ), m_theme( 0 ), m_origTheme( 0 ) { TDEAboutData *about = new TDEAboutData("kthememanager", I18N_NOOP("TDE Theme Manager"), @@ -56,7 +56,7 @@ kthememanager::kthememanager( TQWidget *parent, const char *name ) setQuickHelp( i18n("This control module handles installing, removing and " "creating visual TDE themes.")); - setButtons( KCModule::Default|KCModule::Apply|KCModule::Help ); + setButtons( TDECModule::Default|TDECModule::Apply|TDECModule::Help ); setAcceptDrops( true ); init(); @@ -130,7 +130,7 @@ void kthememanager::load(bool useDefaults) listThemes(); // Load the current theme name - KConfig conf("kcmthememanagerrc", false, false); + TDEConfig conf("kcmthememanagerrc", false, false); conf.setReadDefaults( useDefaults ); @@ -164,7 +164,7 @@ void kthememanager::save() m_theme->apply(); // Save the current theme name - KConfig conf("kcmthememanagerrc", false, false); + TDEConfig conf("kcmthememanagerrc", false, false); conf.setGroup( "General" ); conf.writeEntry( "CurrentTheme", themeName ); conf.sync(); @@ -415,7 +415,7 @@ void kthememanager::updatePreview( const TQString & pixFile ) extern "C" { - KDE_EXPORT KCModule *create_kthememanager(TQWidget *parent, const char *) + KDE_EXPORT TDECModule *create_kthememanager(TQWidget *parent, const char *) { TDEGlobal::locale()->insertCatalogue( "kthememanager" ); return new kthememanager( parent, "kthememanager" ); diff --git a/kcontrol/kthememanager/kthememanager.h b/kcontrol/kthememanager/kthememanager.h index 0d7059729..3ca337300 100644 --- a/kcontrol/kthememanager/kthememanager.h +++ b/kcontrol/kthememanager/kthememanager.h @@ -59,7 +59,7 @@ private: * @brief The Theme Manager config module. * @author Lukas Tinkl <[email protected]> */ -class kthememanager: public KCModule +class kthememanager: public TDECModule { Q_OBJECT public: |