diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 00:35:07 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 00:35:07 -0600 |
commit | 703fb0c89c2eee56a1e613e67a446db9d4287929 (patch) | |
tree | dd8c5ca66075cd89c2638a2b48cf78386a9870a7 /kutils/ksettings | |
parent | 818e7abec3d5d3809b6b77293558678371c16b71 (diff) | |
download | tdelibs-703fb0c89c2eee56a1e613e67a446db9d4287929.tar.gz tdelibs-703fb0c89c2eee56a1e613e67a446db9d4287929.zip |
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'kutils/ksettings')
-rw-r--r-- | kutils/ksettings/README.dox | 14 | ||||
-rw-r--r-- | kutils/ksettings/dialog.cpp | 26 | ||||
-rw-r--r-- | kutils/ksettings/dialog.h | 6 | ||||
-rw-r--r-- | kutils/ksettings/dispatcher.cpp | 4 | ||||
-rw-r--r-- | kutils/ksettings/dispatcher.h | 14 | ||||
-rw-r--r-- | kutils/ksettings/pluginpage.cpp | 4 | ||||
-rw-r--r-- | kutils/ksettings/pluginpage.h | 12 |
7 files changed, 40 insertions, 40 deletions
diff --git a/kutils/ksettings/README.dox b/kutils/ksettings/README.dox index b9efd0dcb..88268f671 100644 --- a/kutils/ksettings/README.dox +++ b/kutils/ksettings/README.dox @@ -45,7 +45,7 @@ mechanisms. Every page is a KCM. This is what you need for creating a page: \code -class MyAppConfig : public KCModule +class MyAppConfig : public TDECModule { Q_OBJECT public: @@ -67,7 +67,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_myappconfig, MyAppConfigFactory( "kcm_myappconfig" ) ); MyAppConfig::MyAppConfig( QWidget *parent, const char *, const QStringList &args ) - : KCModule( MyAppConfigFactory::instance(), parent, args ) + : TDECModule( MyAppConfigFactory::instance(), parent, args ) { // create the pages GUI load(); @@ -76,9 +76,9 @@ MyAppConfig::MyAppConfig( QWidget *parent, const char *, const QStringList &args // implementations for the other methods \endcode -For the KConfig object you can either use +For the TDEConfig object you can either use TDEGlobal::config() (I don't recommend it) or KSimpleConfig( "myapprc" ). -I added a method to KSettings::Dispatcher that gives you the KConfig +I added a method to KSettings::Dispatcher that gives you the TDEConfig object for every registered instance name: \ref KSettings::Dispatcher::configForInstanceName @@ -94,7 +94,7 @@ An example file: Encoding=UTF-8 Icon=myapp Type=Service -ServiceTypes=KCModule +ServiceTypes=TDECModule X-TDE-ModuleType=Library X-TDE-Library=myappconfig @@ -115,10 +115,10 @@ Some explanation for those keys: - Icon is the icon that will be used in the listview/iconview for your page. - X-TDE-Library is the name of the library where the page is in. The library always needs to be prefixed with kcm_ but you don't write the prefix in the - desktop file. For more docu on this look for the KCModule docu. + desktop file. For more docu on this look for the TDECModule docu. - X-TDE-FactoryName is either the name of the Factory you used in the KGenericFactory call or the suffix of the create_ function that you created. - Again for more info look for the KCModule docu. + Again for more info look for the TDECModule docu. - X-TDE-ParentApp is the name of the application this config page belongs to. It is used by the first two \ref KSettings::Dialog constructors. The Dialog will use all modules that set X-TDE-ParentApp to diff --git a/kutils/ksettings/dialog.cpp b/kutils/ksettings/dialog.cpp index c64e2e64a..727ca1072 100644 --- a/kutils/ksettings/dialog.cpp +++ b/kutils/ksettings/dialog.cpp @@ -58,7 +58,7 @@ class PageNode enum Type { KCM, Group, Root }; union Value { - KCModuleInfo * kcm; + TDECModuleInfo * kcm; GroupInfo * group; }; Type m_type; @@ -71,7 +71,7 @@ class PageNode bool m_dirty; protected: - PageNode( KCModuleInfo * info, PageNode * parent ) + PageNode( TDECModuleInfo * info, PageNode * parent ) : m_type( KCM ) , m_parent( parent ) , m_visible( true ) @@ -291,7 +291,7 @@ class PageNode return false; } - bool insert( KCModuleInfo * info, const TQString & parentid ) + bool insert( TDECModuleInfo * info, const TQString & parentid ) { if( parentid.isNull() ) { @@ -467,10 +467,10 @@ TQValueList<KService::Ptr> Dialog::parentComponentsServices( constraint = "('" + constraint + "' in [X-TDE-ParentComponents])"; kdDebug( 700 ) << "constraint = " << constraint << endl; - return KTrader::self()->query( "KCModule", constraint ); + return KTrader::self()->query( "TDECModule", constraint ); } -bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const +bool Dialog::isPluginForKCMEnabled( TDECModuleInfo * moduleinfo ) const { // if the user of this class requested to hide disabled modules // we check whether it should be enabled or not @@ -491,9 +491,9 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const // we check if the parent component is a plugin if( ! d->plugininfomap.contains( *pcit ) ) { - // if not the KCModule must be enabled + // if not the TDECModule must be enabled enabled = true; - // we're done for this KCModuleInfo + // we're done for this TDECModuleInfo break; } // if it is a plugin we check whether the plugin is enabled @@ -502,7 +502,7 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const enabled = pinfo->isPluginEnabled(); kdDebug( 700 ) << "parent " << *pcit << " is " << ( enabled ? "enabled" : "disabled" ) << endl; - // if it is enabled we're done for this KCModuleInfo + // if it is enabled we're done for this TDECModuleInfo if( enabled ) break; } @@ -543,12 +543,12 @@ void Dialog::createDialogFromServices() it != setdlgaddon.end(); ++it ) parseGroupFile( *it ); - // now we process the KCModule services + // now we process the TDECModule services for( TQValueList<KService::Ptr>::ConstIterator it = d->services.begin(); it != d->services.end(); ++it ) { - // we create the KCModuleInfo - KCModuleInfo * info = new KCModuleInfo( *it ); + // we create the TDECModuleInfo + TDECModuleInfo * info = new TDECModuleInfo( *it ); TQString parentid; TQVariant tmp = info->service()->property( "X-TDE-CfgDlgHierarchy", TQVariant::String ); @@ -577,10 +577,10 @@ void Dialog::createDialogFromServices() // TODO: Don't show the reset button until the issue with the // KPluginSelector::load() method is solved. // Problem: - // KCMultiDialog::show() call KCModule::load() to reset all KCMs + // KCMultiDialog::show() call TDECModule::load() to reset all KCMs // (KPluginSelector::load() resets all plugin selections and all plugin // KCMs). - // The reset button calls KCModule::load(), too but in this case we want the + // The reset button calls TDECModule::load(), too but in this case we want the // KPluginSelector to only reset the current visible plugin KCM and not // touch the plugin selections. // I have no idea how to check that in KPluginSelector::load()... diff --git a/kutils/ksettings/dialog.h b/kutils/ksettings/dialog.h index cd9b539ef..58115426c 100644 --- a/kutils/ksettings/dialog.h +++ b/kutils/ksettings/dialog.h @@ -26,7 +26,7 @@ template<class T> class TQValueList; class KPluginInfo; class KCMultiDialog; -class KCModuleInfo; +class TDECModuleInfo; namespace KSettings { @@ -188,7 +188,7 @@ class KUTILS_EXPORT Dialog : public TQObject * @internal * Check whether the plugin associated with this KCM is enabled. */ - bool isPluginForKCMEnabled( KCModuleInfo * ) const; + bool isPluginForKCMEnabled( TDECModuleInfo * ) const; TQValueList<KService::Ptr> instanceServices() const; TQValueList<KService::Ptr> parentComponentsServices( @@ -204,7 +204,7 @@ class KUTILS_EXPORT Dialog : public TQObject * If this module is put into a TreeList hierarchy this will return a * list of the names of the parent modules. */ - TQStringList parentModuleNames( KCModuleInfo * ); + TQStringList parentModuleNames( TDECModuleInfo * ); /** * @internal diff --git a/kutils/ksettings/dispatcher.cpp b/kutils/ksettings/dispatcher.cpp index eb9acf0bc..590ca7e3c 100644 --- a/kutils/ksettings/dispatcher.cpp +++ b/kutils/ksettings/dispatcher.cpp @@ -83,7 +83,7 @@ void Dispatcher::registerInstance( TDEInstance * instance, TQObject * recv, cons connect( recv, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( unregisterInstance( TQObject * ) ) ); } -KConfig * Dispatcher::configForInstanceName( const TQCString & instanceName ) +TDEConfig * Dispatcher::configForInstanceName( const TQCString & instanceName ) { kdDebug( 701 ) << k_funcinfo << endl; if( m_instanceInfo.contains( instanceName ) ) @@ -113,7 +113,7 @@ void Dispatcher::reparseConfiguration( const TQCString & instanceName ) // check if the instanceName is valid: if( ! m_instanceInfo.contains( instanceName ) ) return; - // first we reparse the config of the instance so that the KConfig object + // first we reparse the config of the instance so that the TDEConfig object // will be up to date m_instanceInfo[ instanceName ].instance->config()->reparseConfiguration(); TQSignal * sig = m_instanceInfo[ instanceName ].signal; diff --git a/kutils/ksettings/dispatcher.h b/kutils/ksettings/dispatcher.h index c04a41b99..fa0c9e6c9 100644 --- a/kutils/ksettings/dispatcher.h +++ b/kutils/ksettings/dispatcher.h @@ -29,7 +29,7 @@ class TQSignal; class TQStrList; template<class T> class KStaticDeleter; class TDEInstance; -class KConfig; +class TDEConfig; namespace KSettings { @@ -39,7 +39,7 @@ namespace KSettings * @short Dispatch change notifications from the KCMs to the program. * * Since your program does not have direct control over the KCMs that get loaded - * into the KConfigureDialog you need a way to get notified. This is what you + * into the TDEConfigureDialog you need a way to get notified. This is what you * do: * \code * Dispatcher::self()->registerInstance( instance(), this, TQT_SLOT( loadSettings() ) ); @@ -74,9 +74,9 @@ class KUTILS_EXPORT Dispatcher : public TQObject void registerInstance( TDEInstance * instance, TQObject * recv, const char * slot ); /** - * @return the KConfig object that belongs to the instanceName + * @return the TDEConfig object that belongs to the instanceName */ - KConfig * configForInstanceName( const TQCString & instanceName ); + TDEConfig * configForInstanceName( const TQCString & instanceName ); /** * @return a list of all the instance names that are currently @@ -100,10 +100,10 @@ class KUTILS_EXPORT Dispatcher : public TQObject void reparseConfiguration( const TQCString & instanceName ); /** - * When this slot is called the KConfig objects of all the registered - * instances are sync()ed. This is usefull when some other KConfig + * When this slot is called the TDEConfig objects of all the registered + * instances are sync()ed. This is usefull when some other TDEConfig * objects will read/write from/to the same config file, so that you - * can first write out the current state of the KConfig objects. + * can first write out the current state of the TDEConfig objects. */ void syncConfiguration(); diff --git a/kutils/ksettings/pluginpage.cpp b/kutils/ksettings/pluginpage.cpp index 4a94d21d4..c7208dc69 100644 --- a/kutils/ksettings/pluginpage.cpp +++ b/kutils/ksettings/pluginpage.cpp @@ -38,7 +38,7 @@ class PluginPage::PluginPagePrivate }; PluginPage::PluginPage( TQWidget * parent, const char * name, const TQStringList & args ) - : KCModule( parent, name, args ) + : TDECModule( parent, name, args ) , d( new PluginPagePrivate ) { ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true ); @@ -47,7 +47,7 @@ class PluginPage::PluginPagePrivate } PluginPage::PluginPage( TDEInstance * instance, TQWidget * parent, const TQStringList & args ) - : KCModule( instance, parent, args ) + : TDECModule( instance, parent, args ) , d( new PluginPagePrivate ) { ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true ); diff --git a/kutils/ksettings/pluginpage.h b/kutils/ksettings/pluginpage.h index 16cfbc572..2ba4f2142 100644 --- a/kutils/ksettings/pluginpage.h +++ b/kutils/ksettings/pluginpage.h @@ -31,7 +31,7 @@ namespace KSettings /** * @ingroup settings * @ingroup plugin - * @short Convenience KCModule for creating a plugins config page. + * @short Convenience TDECModule for creating a plugins config page. * * This class makes it very easy to create a plugins configuration page to your * program. All you need to do is create a class that is derived from @@ -55,7 +55,7 @@ namespace KSettings Encoding=UTF-8 Icon=plugin Type=Service - ServiceTypes=KCModule + ServiceTypes=TDECModule X-TDE-ModuleType=Library X-TDE-Library=myapppluginconfig @@ -70,18 +70,18 @@ namespace KSettings * @author Matthias Kretz <kretz@kde.org> * @since 3.2 */ -class KUTILS_EXPORT PluginPage : public KCModule +class KUTILS_EXPORT PluginPage : public TDECModule { Q_OBJECT public: /** - * Standart KCModule constructor. Automatically creates the the + * Standart TDECModule constructor. Automatically creates the the * KPluginSelector widget. */ PluginPage( TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ); /** - * Standart KCModule constructor. Automatically creates the the + * Standart TDECModule constructor. Automatically creates the the * KPluginSelector widget. */ PluginPage( TDEInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() ); @@ -103,7 +103,7 @@ class KUTILS_EXPORT PluginPage : public KCModule virtual void load(); /** - * Save the state of the plugins to KConfig objects + * Save the state of the plugins to TDEConfig objects */ virtual void save(); virtual void defaults(); |