diff options
Diffstat (limited to 'tdeui')
55 files changed, 321 insertions, 321 deletions
diff --git a/tdeui/AUTHORS b/tdeui/AUTHORS index 7d64d96b1..61087b1f0 100644 --- a/tdeui/AUTHORS +++ b/tdeui/AUTHORS @@ -10,7 +10,7 @@ Maintainer of KPixmapEffect, KStyle, KThemeStyle, and KThemeBase - as well as general misc coding here and there. Matthias Kalle Dalheimer <kalle@kde.org>: -classes TDEApplication, KConfig, KTextStream, KColorSet, +classes TDEApplication, TDEConfig, KTextStream, KColorSet, automake, autoconf, maintenance Richard Moore <moorer@cs.man.ac.uk>: @@ -23,7 +23,7 @@ Steffen Hansen <stefh@dit.ou.dk>: KURL class Torben Weis <weis@stud.uni-frankfurt.de> -DnD stuff, KSocket and KServerSocket classes, KPixmap +DnD stuff, TDESocket and TDEServerSocket classes, KPixmap Alexander Sanda <alex@darkstar.ping.at> Read and write numerical config entries, KPanner, KTabControl, diff --git a/tdeui/kaction.h b/tdeui/kaction.h index a6ebbfb9d..f2860679f 100644 --- a/tdeui/kaction.h +++ b/tdeui/kaction.h @@ -45,8 +45,8 @@ class KToolBar; class KAccel; class KAccelActions; -class KConfig; -class KConfigBase; +class TDEConfig; +class TDEConfigBase; class KURL; class TDEInstance; class KToolBar; diff --git a/tdeui/kactionclasses.cpp b/tdeui/kactionclasses.cpp index 4be388afe..605ac8379 100644 --- a/tdeui/kactionclasses.cpp +++ b/tdeui/kactionclasses.cpp @@ -1164,7 +1164,7 @@ void KRecentFilesAction::clearURLList() d->m_urls.clear(); } -void KRecentFilesAction::loadEntries( KConfig* config, TQString groupname) +void KRecentFilesAction::loadEntries( TDEConfig* config, TQString groupname) { TQString key; TQString value; @@ -1209,7 +1209,7 @@ void KRecentFilesAction::loadEntries( KConfig* config, TQString groupname) config->setGroup( oldGroup ); } -void KRecentFilesAction::saveEntries( KConfig* config, TQString groupname ) +void KRecentFilesAction::saveEntries( TDEConfig* config, TQString groupname ) { TQString key; TQString value; diff --git a/tdeui/kactionclasses.h b/tdeui/kactionclasses.h index 0a6a105f0..ec63cd36b 100644 --- a/tdeui/kactionclasses.h +++ b/tdeui/kactionclasses.h @@ -48,8 +48,8 @@ class KToolBar; class KAccel; class KAccelActions; -class KConfig; -class KConfigBase; +class TDEConfig; +class TDEConfigBase; class KURL; class TDEInstance; class KToolBar; @@ -834,22 +834,22 @@ public slots: void setMaxItems( uint maxItems ); /** - * Loads the recent files entries from a given KConfig object. + * Loads the recent files entries from a given TDEConfig object. * You can provide the name of the group used to load the entries. * If the groupname is empty, entries are load from a group called 'RecentFiles' * - * This method does not effect the active group of KConfig. + * This method does not effect the active group of TDEConfig. */ - void loadEntries( KConfig* config, TQString groupname=TQString::null ); + void loadEntries( TDEConfig* config, TQString groupname=TQString::null ); /** - * Saves the current recent files entries to a given KConfig object. + * Saves the current recent files entries to a given TDEConfig object. * You can provide the name of the group used to load the entries. * If the groupname is empty, entries are saved to a group called 'RecentFiles' * - * This method does not effect the active group of KConfig. + * This method does not effect the active group of TDEConfig. */ - void saveEntries( KConfig* config, TQString groupname=TQString::null ); + void saveEntries( TDEConfig* config, TQString groupname=TQString::null ); /** * Add URL to recent files list. diff --git a/tdeui/kactioncollection.cpp b/tdeui/kactioncollection.cpp index 9654d0ffd..c841b2730 100644 --- a/tdeui/kactioncollection.cpp +++ b/tdeui/kactioncollection.cpp @@ -405,12 +405,12 @@ KAction* KActionCollection::action( int index ) const // return d->m_actions.at( index ); } -bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig ) +bool KActionCollection::readShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) { return KActionShortcutList(this).readSettings( sConfigGroup, pConfig ); } -bool KActionCollection::writeShortcutSettings( const TQString& sConfigGroup, KConfigBase* pConfig ) const +bool KActionCollection::writeShortcutSettings( const TQString& sConfigGroup, TDEConfigBase* pConfig ) const { return KActionShortcutList((KActionCollection*)this).writeSettings( sConfigGroup, pConfig ); } diff --git a/tdeui/kactioncollection.h b/tdeui/kactioncollection.h index 28c9e530e..35dd5dc2d 100644 --- a/tdeui/kactioncollection.h +++ b/tdeui/kactioncollection.h @@ -46,8 +46,8 @@ class KToolBar; class KAccel; class KAccelActions; -class KConfig; -class KConfigBase; +class TDEConfig; +class TDEConfigBase; class KURL; class TDEInstance; class KToolBar; @@ -191,11 +191,11 @@ public: /** * Used for reading shortcut configuration from a non-XML rc file. */ - bool readShortcutSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 ); + bool readShortcutSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0 ); /** * Used for writing shortcut configuration to a non-XML rc file. */ - bool writeShortcutSettings( const TQString& sConfigGroup = TQString::null, KConfigBase* pConfig = 0 ) const; + bool writeShortcutSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0 ) const; void setInstance( TDEInstance *instance ); /** The instance with which this class is associated. */ diff --git a/tdeui/kbugreport.cpp b/tdeui/kbugreport.cpp index 3e63af8f9..ab36f83d7 100644 --- a/tdeui/kbugreport.cpp +++ b/tdeui/kbugreport.cpp @@ -338,7 +338,7 @@ void KBugReport::slotSetFrom() m_configureEmail->setEnabled(true); // ### KDE4: why oh why is KEmailSettings in kio? - KConfig emailConf( TQString::fromLatin1("emaildefaults") ); + TDEConfig emailConf( TQString::fromLatin1("emaildefaults") ); // find out the default profile emailConf.setGroup( TQString::fromLatin1("Defaults") ); diff --git a/tdeui/kcmenumngr.cpp b/tdeui/kcmenumngr.cpp index 0745bccd9..5af7b6de6 100644 --- a/tdeui/kcmenumngr.cpp +++ b/tdeui/kcmenumngr.cpp @@ -35,7 +35,7 @@ KContextMenuManager* KContextMenuManager::manager = 0; KContextMenuManager::KContextMenuManager( TQObject* parent, const char* name ) : TQObject( parent, name) { - KConfigGroupSaver saver ( TDEGlobal::config(), TQString::fromLatin1("Shortcuts") ) ; + TDEConfigGroupSaver saver ( TDEGlobal::config(), TQString::fromLatin1("Shortcuts") ) ; menuKey = KShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt(); saver.config()->setGroup( TQString::fromLatin1("ContextMenus") ) ; showOnPress = saver.config()->readBoolEntry(TQString::fromLatin1("ShowOnPress"), true ); diff --git a/tdeui/kcmodule.cpp b/tdeui/kcmodule.cpp index bba0e5247..904c1cdc4 100644 --- a/tdeui/kcmodule.cpp +++ b/tdeui/kcmodule.cpp @@ -34,10 +34,10 @@ #include "kcmodule.h" #include "kcmodule.moc" -class KCModulePrivate +class TDECModulePrivate { public: - KCModulePrivate(): + TDECModulePrivate(): _about( 0 ), _useRootOnlyMsg( false ), _hasOwnInstance( true ), @@ -49,17 +49,17 @@ public: TQString _rootOnlyMsg; bool _useRootOnlyMsg; bool _hasOwnInstance; - TQPtrList<KConfigDialogManager> managers; + TQPtrList<TDEConfigDialogManager> managers; TQString _quickHelp; // this member is used to record the state on non-automatically - // managed widgets, allowing for mixed KConfigXT-drive and manual + // managed widgets, allowing for mixed TDEConfigXT-drive and manual // widgets to coexist peacefully and do the correct thing with // the changed(bool) signal bool _unmanagedWidgetChangeState; }; -KCModule::KCModule(TQWidget *parent, const char *name, const TQStringList &) +TDECModule::TDECModule(TQWidget *parent, const char *name, const TQStringList &) : TQWidget(parent, name) { init(); @@ -74,7 +74,7 @@ KCModule::KCModule(TQWidget *parent, const char *name, const TQStringList &) } -KCModule::KCModule(TDEInstance *instance, TQWidget *parent, const TQStringList & ) +TDECModule::TDECModule(TDEInstance *instance, TQWidget *parent, const TQStringList & ) : TQWidget(parent, instance ? instance->instanceName().data() : 0) { init(); @@ -89,21 +89,21 @@ KCModule::KCModule(TDEInstance *instance, TQWidget *parent, const TQStringList & TDEGlobal::setActiveInstance(this->instance()); } -void KCModule::init() +void TDECModule::init() { - d = new KCModulePrivate; + d = new TDECModulePrivate; _btn = Help|Default|Apply; } -KConfigDialogManager* KCModule::addConfig( KConfigSkeleton *config, TQWidget* widget ) +TDEConfigDialogManager* TDECModule::addConfig( TDEConfigSkeleton *config, TQWidget* widget ) { - KConfigDialogManager* manager = new KConfigDialogManager( widget, config, name() ); + TDEConfigDialogManager* manager = new TDEConfigDialogManager( widget, config, name() ); connect( manager, TQT_SIGNAL( widgetModified() ), TQT_SLOT( widgetChanged() )); d->managers.append( manager ); return manager; } -KCModule::~KCModule() +TDECModule::~TDECModule() { if (d->_hasOwnInstance) delete d->_instance; @@ -111,36 +111,36 @@ KCModule::~KCModule() delete d; } -void KCModule::load() +void TDECModule::load() { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) manager->updateWidgets(); } -void KCModule::save() +void TDECModule::save() { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) manager->updateSettings(); emit( changed( false )); } -void KCModule::defaults() +void TDECModule::defaults() { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) manager->updateWidgetsDefault(); } -void KCModule::widgetChanged() +void TDECModule::widgetChanged() { emit changed(d->_unmanagedWidgetChangeState || managedWidgetChangeState()); } -bool KCModule::managedWidgetChangeState() const +bool TDECModule::managedWidgetChangeState() const { - KConfigDialogManager* manager; + TDEConfigDialogManager* manager; for( manager = d->managers.first(); manager; manager = d->managers.next() ) { if ( manager->hasChanged() ) @@ -150,71 +150,71 @@ bool KCModule::managedWidgetChangeState() const return false; } -void KCModule::unmanagedWidgetChangeState(bool changed) +void TDECModule::unmanagedWidgetChangeState(bool changed) { d->_unmanagedWidgetChangeState = changed; widgetChanged(); } -const TDEAboutData *KCModule::aboutData() const +const TDEAboutData *TDECModule::aboutData() const { return d->_about; } -void KCModule::setAboutData( TDEAboutData* about ) +void TDECModule::setAboutData( TDEAboutData* about ) { delete d->_about; d->_about = about; } -void KCModule::setRootOnlyMsg(const TQString& msg) +void TDECModule::setRootOnlyMsg(const TQString& msg) { d->_rootOnlyMsg = msg; } -TQString KCModule::rootOnlyMsg() const +TQString TDECModule::rootOnlyMsg() const { return d->_rootOnlyMsg; } -void KCModule::setUseRootOnlyMsg(bool on) +void TDECModule::setUseRootOnlyMsg(bool on) { d->_useRootOnlyMsg = on; } -bool KCModule::useRootOnlyMsg() const +bool TDECModule::useRootOnlyMsg() const { return d->_useRootOnlyMsg; } -void KCModule::changed() +void TDECModule::changed() { emit changed(true); } -TDEInstance *KCModule::instance() const +TDEInstance *TDECModule::instance() const { return d->_instance; } -void KCModule::setQuickHelp( const TQString& help ) +void TDECModule::setQuickHelp( const TQString& help ) { d->_quickHelp = help; emit( quickHelpChanged() ); } -TQString KCModule::quickHelp() const +TQString TDECModule::quickHelp() const { return d->_quickHelp; } -const TQPtrList<KConfigDialogManager>& KCModule::configs() const +const TQPtrList<TDEConfigDialogManager>& TDECModule::configs() const { return d->managers; } -void KCModule::virtual_hook( int, void* ) +void TDECModule::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } // vim: sw=4 et sts=4 diff --git a/tdeui/kcmodule.h b/tdeui/kcmodule.h index c237ad163..41d8d095e 100644 --- a/tdeui/kcmodule.h +++ b/tdeui/kcmodule.h @@ -30,9 +30,9 @@ class TQStringList; class TDEAboutData; -class KConfigDialogManager; -class KConfigSkeleton; -class KCModulePrivate; +class TDEConfigDialogManager; +class TDEConfigSkeleton; +class TDECModulePrivate; class TDEInstance; /** @@ -54,8 +54,8 @@ class TDEInstance; * \code * #include <kgenericfactory.h> * - * typedef KGenericFactory<YourKCModule, TQWidget> YourKCModuleFactory; - * K_EXPORT_COMPONENT_FACTORY( yourLibName, YourKCModuleFactory("name_of_the_po_file") ); + * typedef KGenericFactory<YourTDECModule, TQWidget> YourTDECModuleFactory; + * K_EXPORT_COMPONENT_FACTORY( yourLibName, YourTDECModuleFactory("name_of_the_po_file") ); * \endcode * * The parameter "name_of_the_po_file" has to correspond with the messages target @@ -66,7 +66,7 @@ class TDEInstance; * * @author Matthias Hoelzer-Kluepfel <hoelzer@kde.org> */ -class TDEUI_EXPORT KCModule : public TQWidget +class TDEUI_EXPORT TDECModule : public TQWidget { Q_OBJECT @@ -76,7 +76,7 @@ public: * An enumeration type for the buttons used by this module. * You should only use Help, Default and Apply. The rest is obsolete. * - * @see KCModule::buttons @see KCModule::setButtons + * @see TDECModule::buttons @see TDECModule::setButtons */ enum Button {Help=1, Default=2, Apply=16, Reset=4, /* obsolete, do not use! */ @@ -89,14 +89,14 @@ public: * Make sure you have a TQStringList argument in your * implementation. */ - KCModule(TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList() ); + TDECModule(TQWidget *parent=0, const char *name=0, const TQStringList &args=TQStringList() ); - KCModule(TDEInstance *instance, TQWidget *parent=0, const TQStringList &args=TQStringList() ); + TDECModule(TDEInstance *instance, TQWidget *parent=0, const TQStringList &args=TQStringList() ); /* * Destroys the module. */ - ~KCModule(); + ~TDECModule(); /** * Load the configuration data into the module. @@ -111,9 +111,9 @@ public: * center, to undo all of his changes and restore the currently valid * settings. * - * If you use KConfigXT, loading is taken care of automatically and + * If you use TDEConfigXT, loading is taken care of automatically and * you do not need to do it manually. However, if you for some reason reimplement it and - * also are using KConfigXT, you must call this function otherwise the loading of KConfigXT + * also are using TDEConfigXT, you must call this function otherwise the loading of TDEConfigXT * options will not work. * */ @@ -134,9 +134,9 @@ public: * * save is called when the user clicks "Apply" or "Ok". * - * If you use KConfigXT, saving is taken care off automatically and + * If you use TDEConfigXT, saving is taken care off automatically and * you do not need to load manually. However, if you for some reason reimplement it and - * also are using KConfigXT, you must call this function, otherwise the saving of KConfigXT + * also are using TDEConfigXT, you must call this function, otherwise the saving of TDEConfigXT * options will not work. Call it at the very end of your reimplementation, to avoid * changed() signals getting emitted when you modify widgets. */ @@ -148,9 +148,9 @@ public: * This method is called when the user clicks the "Default" * button. It should set the display to useful values. * - * If you use KConfigXT, you do not have to reimplement this function since + * If you use TDEConfigXT, you do not have to reimplement this function since * the fetching and settings of default values is done automatically. However, if you - * reimplement and also are using KConfigXT, remember to call the base function at the + * reimplement and also are using TDEConfigXT, remember to call the base function at the * very end of your reimplementation. */ virtual void defaults(); @@ -198,7 +198,7 @@ public: * The return value is a value or'ed together from * the Button enumeration type. * - * @see KCModule::setButtons + * @see TDECModule::setButtons */ int buttons() const { return _btn; } @@ -212,7 +212,7 @@ public: * customized message. If none has been set, a default message * will be used. * - * @see KCModule::setRootOnlyMsg + * @see TDECModule::setRootOnlyMsg */ TQString rootOnlyMsg() const; @@ -224,30 +224,30 @@ public: * appear (for example if it has already one). This function * tells KControl if a RootOnly message should be shown * - * @see KCModule::setUseRootOnlyMsg + * @see TDECModule::setUseRootOnlyMsg */ bool useRootOnlyMsg() const; TDEInstance *instance() const; /** - * @return a list of @ref KConfigDialogManager's in use, if any. + * @return a list of @ref TDEConfigDialogManager's in use, if any. * @since 3.4 */ - const TQPtrList<KConfigDialogManager>& configs() const; + const TQPtrList<TDEConfigDialogManager>& configs() const; protected: /** - * Adds a KConfigskeleton @p config to watch the widget @p widget + * Adds a TDEConfigskeleton @p config to watch the widget @p widget * * This function is useful if you need to handle multiple configuration files. * * @since 3.3 - * @return a pointer to the KConfigDialogManager in use - * @param config the KConfigSkeleton to use + * @return a pointer to the TDEConfigDialogManager in use + * @param config the TDEConfigSkeleton to use * @param widget the widget to watch */ - KConfigDialogManager* addConfig( KConfigSkeleton *config, TQWidget* widget ); + TDEConfigDialogManager* addConfig( TDEConfigSkeleton *config, TQWidget* widget ); /** * Sets the quick help. @@ -304,7 +304,7 @@ protected: * * If Apply is not specified, kcmshell will show a "Close" button. * - * @see KCModule::buttons + * @see TDECModule::buttons */ void setButtons(int btn) { _btn = btn; } @@ -315,7 +315,7 @@ protected: * corresponding desktop file contains the line X-TDE-RootOnly=true. * If no message is set, a default one will be used. * - * @see KCModule::rootOnlyMsg + * @see TDECModule::rootOnlyMsg */ void setRootOnlyMsg(const TQString& msg); @@ -325,7 +325,7 @@ protected: * Following the value of @p on, the RootOnly message will be * shown or not. * - * @see KCModule::useRootOnlyMsg + * @see TDECModule::useRootOnlyMsg */ void setUseRootOnlyMsg(bool on); @@ -348,7 +348,7 @@ private: protected: virtual void virtual_hook( int id, void* data ); private: - KCModulePrivate *d; + TDECModulePrivate *d; /** * Internal function for initialization of the class. diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp index 7db3807a7..2651fd05d 100644 --- a/tdeui/kcolordialog.cpp +++ b/tdeui/kcolordialog.cpp @@ -1254,7 +1254,7 @@ void KColorDialog::slotDefaultColorClicked() void KColorDialog::readSettings() { - KConfigGroup group( TDEGlobal::config(), "Colors" ); + TDEConfigGroup group( TDEGlobal::config(), "Colors" ); TQString palette = group.readEntry("CurrentPalette"); d->table->setPalette(palette); @@ -1263,7 +1263,7 @@ KColorDialog::readSettings() void KColorDialog::slotWriteSettings() { - KConfigGroup group( TDEGlobal::config(), "Colors" ); + TDEConfigGroup group( TDEGlobal::config(), "Colors" ); TQString palette = d->table->palette(); if (!group.hasDefault("CurrentPalette") && diff --git a/tdeui/kcombobox.h b/tdeui/kcombobox.h index 41963a56b..e0ff8e6e4 100644 --- a/tdeui/kcombobox.h +++ b/tdeui/kcombobox.h @@ -599,7 +599,7 @@ public: * You won't have the benefit of weighted completion though, so normally * you should do something like * \code - * KConfig *config = kapp->config(); + * TDEConfig *config = kapp->config(); * TQStringList list; * * // load the history and completion list after creating the history combo @@ -618,7 +618,7 @@ public: * config->writeEntry( "History list", list ); * \endcode * - * Be sure to use different names for saving with KConfig if you have more + * Be sure to use different names for saving with TDEConfig if you have more * than one KHistoryCombo. * * Note: When @p setCompletionList is true, the items are inserted into the diff --git a/tdeui/kconfigdialog.cpp b/tdeui/kconfigdialog.cpp index ccbba1cf0..9707bc26a 100644 --- a/tdeui/kconfigdialog.cpp +++ b/tdeui/kconfigdialog.cpp @@ -31,30 +31,30 @@ #include <tqvbox.h> #include <tqmap.h> -TQAsciiDict<KConfigDialog> KConfigDialog::openDialogs; +TQAsciiDict<TDEConfigDialog> TDEConfigDialog::openDialogs; // This class is here purly so we don't break binary compatibility down the road. -class KConfigDialog::KConfigDialogPrivate +class TDEConfigDialog::TDEConfigDialogPrivate { public: - KConfigDialogPrivate(KDialogBase::DialogType t) + TDEConfigDialogPrivate(KDialogBase::DialogType t) : shown(false), type(t), manager(0) { } bool shown; KDialogBase::DialogType type; - KConfigDialogManager *manager; - TQMap<TQWidget *, KConfigDialogManager *> managerForPage; + TDEConfigDialogManager *manager; + TQMap<TQWidget *, TDEConfigDialogManager *> managerForPage; }; -KConfigDialog::KConfigDialog( TQWidget *parent, const char *name, - KConfigSkeleton *config, +TDEConfigDialog::TDEConfigDialog( TQWidget *parent, const char *name, + TDEConfigSkeleton *config, DialogType dialogType, int dialogButtons, ButtonCode defaultButton, bool modal ) : KDialogBase( dialogType, (WFlags)TQt::WStyle_DialogBorder, parent, name, modal, i18n("Configure"), dialogButtons, defaultButton ), - d(new KConfigDialogPrivate(dialogType)) + d(new TDEConfigDialogPrivate(dialogType)) { if ( name ) { openDialogs.insert(name, this); @@ -71,19 +71,19 @@ KConfigDialog::KConfigDialog( TQWidget *parent, const char *name, connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateWidgetsDefault())); connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateButtons())); - d->manager = new KConfigDialogManager(this, config); + d->manager = new TDEConfigDialogManager(this, config); setupManagerConnections(d->manager); enableButton(Apply, false); } -KConfigDialog::~KConfigDialog() +TDEConfigDialog::~TDEConfigDialog() { openDialogs.remove(name()); delete d; } -void KConfigDialog::addPage(TQWidget *page, +void TDEConfigDialog::addPage(TQWidget *page, const TQString &itemName, const TQString &pixmapName, const TQString &header, @@ -94,25 +94,25 @@ void KConfigDialog::addPage(TQWidget *page, d->manager->addWidget(page); } -void KConfigDialog::addPage(TQWidget *page, - KConfigSkeleton *config, +void TDEConfigDialog::addPage(TQWidget *page, + TDEConfigSkeleton *config, const TQString &itemName, const TQString &pixmapName, const TQString &header) { addPageInternal(page, itemName, pixmapName, header); - d->managerForPage[page] = new KConfigDialogManager(page, config); + d->managerForPage[page] = new TDEConfigDialogManager(page, config); setupManagerConnections(d->managerForPage[page]); } -void KConfigDialog::addPageInternal(TQWidget *page, +void TDEConfigDialog::addPageInternal(TQWidget *page, const TQString &itemName, const TQString &pixmapName, const TQString &header) { if(d->shown) { - kdDebug(240) << "KConfigDialog::addPage: can not add a page after the dialog has been shown."; + kdDebug(240) << "TDEConfigDialog::addPage: can not add a page after the dialog has been shown."; return; } switch(d->type) @@ -144,11 +144,11 @@ void KConfigDialog::addPageInternal(TQWidget *page, break; default: - kdDebug(240) << "KConfigDialog::addpage: unknown type."; + kdDebug(240) << "TDEConfigDialog::addpage: unknown type."; } } -void KConfigDialog::setupManagerConnections(KConfigDialogManager *manager) +void TDEConfigDialog::setupManagerConnections(TDEConfigDialogManager *manager) { connect(manager, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChangedSlot())); connect(manager, TQT_SIGNAL(widgetModified()), this, TQT_SLOT(updateButtons())); @@ -158,26 +158,26 @@ void KConfigDialog::setupManagerConnections(KConfigDialogManager *manager) connect(this, TQT_SIGNAL(defaultClicked()), manager, TQT_SLOT(updateWidgetsDefault())); } -KConfigDialog* KConfigDialog::exists(const char* name) +TDEConfigDialog* TDEConfigDialog::exists(const char* name) { return openDialogs.find(name); } -bool KConfigDialog::showDialog(const char* name) +bool TDEConfigDialog::showDialog(const char* name) { - KConfigDialog *dialog = exists(name); + TDEConfigDialog *dialog = exists(name); if(dialog) dialog->show(); return (dialog != NULL); } -void KConfigDialog::updateButtons() +void TDEConfigDialog::updateButtons() { static bool only_once = false; if (only_once) return; only_once = true; - TQMap<TQWidget *, KConfigDialogManager *>::iterator it; + TQMap<TQWidget *, TDEConfigDialogManager *>::iterator it; bool has_changed = d->manager->hasChanged() || hasChanged(); for (it = d->managerForPage.begin(); @@ -203,7 +203,7 @@ void KConfigDialog::updateButtons() only_once = false; } -void KConfigDialog::settingsChangedSlot() +void TDEConfigDialog::settingsChangedSlot() { // Update the buttons updateButtons(); @@ -211,9 +211,9 @@ void KConfigDialog::settingsChangedSlot() emit settingsChanged(name()); } -void KConfigDialog::show() +void TDEConfigDialog::show() { - TQMap<TQWidget *, KConfigDialogManager *>::iterator it; + TQMap<TQWidget *, TDEConfigDialogManager *>::iterator it; updateWidgets(); d->manager->updateWidgets(); @@ -243,15 +243,15 @@ void KConfigDialog::show() KDialogBase::show(); } -void KConfigDialog::updateSettings() +void TDEConfigDialog::updateSettings() { } -void KConfigDialog::updateWidgets() +void TDEConfigDialog::updateWidgets() { } -void KConfigDialog::updateWidgetsDefault() +void TDEConfigDialog::updateWidgetsDefault() { } diff --git a/tdeui/kconfigdialog.h b/tdeui/kconfigdialog.h index 9268ab1f2..f7cc10e26 100644 --- a/tdeui/kconfigdialog.h +++ b/tdeui/kconfigdialog.h @@ -21,35 +21,35 @@ #ifndef KCONFIGDIALOG_H #define KCONFIGDIALOG_H -class KConfig; -class KConfigSkeleton; -class KConfigDialogManager; +class TDEConfig; +class TDEConfigSkeleton; +class TDEConfigDialogManager; #include <kdialogbase.h> #include <tqasciidict.h> /** * \short Standard %KDE configuration dialog class * - * The KConfigDialog class provides an easy and uniform means of displaying - * a settings dialog using KDialogBase, KConfigDialogManager and a - * KConfigSkeleton derived settings class. + * The TDEConfigDialog class provides an easy and uniform means of displaying + * a settings dialog using KDialogBase, TDEConfigDialogManager and a + * TDEConfigSkeleton derived settings class. * - * KConfigDialog handles the enabling and disabling of buttons, creation + * TDEConfigDialog handles the enabling and disabling of buttons, creation * of the dialog, and deletion of the widgets. Because of - * KConfigDialogManager, this class also manages: restoring + * TDEConfigDialogManager, this class also manages: restoring * the settings, reseting them to the default values, and saving them. This * requires that the names of the widgets corresponding to configuration entries * have to have the same name plus an additional "kcfg_" prefix. For example the * widget named "kcfg_MyOption" would be associated with the configuration entry * "MyOption". * - * Here is an example usage of KConfigDialog: + * Here is an example usage of TDEConfigDialog: * * \code * void KCoolApp::showSettings(){ - * if(KConfigDialog::showDialog("settings")) + * if(TDEConfigDialog::showDialog("settings")) * return; - * KConfigDialog *dialog = new KConfigDialog(this, "settings", MySettings::self(), KDialogBase::IconList); + * TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", MySettings::self(), KDialogBase::IconList); * dialog->addPage(new General(0, "General"), i18n("General") ); * dialog->addPage(new Appearance(0, "Style"), i18n("Appearance") ); * connect(dialog, TQT_SIGNAL(settingsChanged()), mainWidget, TQT_SLOT(loadSettings())); @@ -65,11 +65,11 @@ class KConfigDialogManager; * Please note that using the setMainWidget method inherited from KDialogBase * currently yields broken behaviour at runtime; use @ref addPage() instead. * - * @see KConfigSkeleton + * @see TDEConfigSkeleton * @author Waldo Bastian <bastian@kde.org> * @since 3.2 */ -class TDEUI_EXPORT KConfigDialog : public KDialogBase { +class TDEUI_EXPORT TDEConfigDialog : public KDialogBase { Q_OBJECT signals: @@ -87,7 +87,7 @@ signals: /** * One or more of the settings have been permanently changed such as if * the user clicked on the Apply or Ok button. - * This signal is useful when using KConfigDialog to configure + * This signal is useful when using TDEConfigDialog to configure * items in a list. When emitted the main class would then know what * item in the list was actually changed. * @param dialogName the name of the dialog. @@ -116,12 +116,12 @@ public: * @param modal - Whether the dialog should be modal. To prevent more than one * non-modal settings dialog from showing the static function showDialog() can be * used in determining if the settings dialog already exists before creating - * a new KConfigDialog object. + * a new TDEConfigDialog object. */ // KDE4: Add the "separator" parameter as in KDialogBase // Make "dialogType" an int - KConfigDialog( TQWidget *parent, const char *name, - KConfigSkeleton *config, + TDEConfigDialog( TQWidget *parent, const char *name, + TDEConfigSkeleton *config, DialogType dialogType = IconList, int dialogButtons = Default|Ok|Apply|Cancel|Help, ButtonCode defaultButton = Ok, @@ -132,10 +132,10 @@ public: * Deletes private class. * @see exists() */ - ~KConfigDialog(); + ~TDEConfigDialog(); /** - * Adds page to the dialog and to KConfigDialogManager. When an + * Adds page to the dialog and to TDEConfigDialogManager. When an * application is done adding pages show() should be called to * display the dialog. * Note that after you call show() you can not add any more pages @@ -146,7 +146,7 @@ public: * @param pixmapName - Name of the pixmap that should be used if needed. * @param header - Header text use in the list modes. Ignored in Tabbed * mode. If empty, the itemName text is used when needed. - * @param manage - Whether KConfigDialogManager should manage the page or not. + * @param manage - Whether TDEConfigDialogManager should manage the page or not. */ // KDE4: Add a default value for itemName & pixmapName void addPage( TQWidget *page, const TQString &itemName, @@ -155,9 +155,9 @@ public: bool manage=true ); /** - * Adds page to the dialog that is managed by a custom KConfigDialogManager. + * Adds page to the dialog that is managed by a custom TDEConfigDialogManager. * This is useful for dialogs that contain settings spread over more than - * one configuration file and thus have/need more than one KConfigSkeleton. + * one configuration file and thus have/need more than one TDEConfigSkeleton. * When an application is done adding pages show() should be called to * display the dialog. * Note that after you call show() you can not add any more pages @@ -171,7 +171,7 @@ public: * mode. If empty, the itemName text is used when needed. */ // KDE4: Add a default value for itemName & pixmapName - void addPage( TQWidget *page, KConfigSkeleton *config, + void addPage( TQWidget *page, TDEConfigSkeleton *config, const TQString &itemName, const TQString &pixmapName, const TQString &header=TQString::null ); @@ -182,7 +182,7 @@ public: * @param name - Dialog name to look for. * @return Pointer to widget or NULL if it does not exist. */ - static KConfigDialog* exists( const char* name ); + static TDEConfigDialog* exists( const char* name ); /** * Attempts to show the dialog with the name 'name'. @@ -260,19 +260,19 @@ private: * Sets the connections from a manager to the dialog (and the other * way round) up. */ - void setupManagerConnections(KConfigDialogManager *manager); + void setupManagerConnections(TDEConfigDialogManager *manager); private: /** * The list of existing dialogs. */ - static TQAsciiDict<KConfigDialog> openDialogs; + static TQAsciiDict<TDEConfigDialog> openDialogs; - class KConfigDialogPrivate; + class TDEConfigDialogPrivate; /** * Private class. */ - KConfigDialogPrivate *d; + TDEConfigDialogPrivate *d; }; #endif //KCONFIGDIALOG_H diff --git a/tdeui/kcursor.cpp b/tdeui/kcursor.cpp index d09b4e9ee..4bd337c35 100644 --- a/tdeui/kcursor.cpp +++ b/tdeui/kcursor.cpp @@ -46,8 +46,8 @@ TQCursor KCursor::handCursor() if (!hand_cursor) { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "General" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "General" ); #ifndef Q_WS_WIN // this mask doesn't work too well on win32 if ( config->readEntry("handCursorStyle", "Windows") == "Windows" ) @@ -369,8 +369,8 @@ KCursorPrivate::KCursorPrivate() { hideCursorDelay = 5000; // 5s default value - KConfig *kc = TDEGlobal::config(); - KConfigGroupSaver ks( kc, TQString::fromLatin1("KDE") ); + TDEConfig *kc = TDEGlobal::config(); + TDEConfigGroupSaver ks( kc, TQString::fromLatin1("KDE") ); enabled = kc->readBoolEntry( TQString::fromLatin1("Autohiding cursor enabled"), true ); } diff --git a/tdeui/kdialog.cpp b/tdeui/kdialog.cpp index 0b99c550c..3821e6a26 100644 --- a/tdeui/kdialog.cpp +++ b/tdeui/kdialog.cpp @@ -178,7 +178,7 @@ void KDialog::resizeLayout( TQLayoutItem *lay, int margin, int spacing ) static TQRect screenRect( TQWidget *w, int screen ) { TQDesktopWidget *desktop = TQApplication::desktop(); - KConfig gc("kdeglobals", false, false); + TDEConfig gc("kdeglobals", false, false); gc.setGroup("Windows"); if (desktop->isVirtualDesktop() && gc.readBoolEntry("XineramaEnabled", true) && diff --git a/tdeui/kdialogbase.cpp b/tdeui/kdialogbase.cpp index c18bead0a..3a7be7a94 100644 --- a/tdeui/kdialogbase.cpp +++ b/tdeui/kdialogbase.cpp @@ -1744,7 +1744,7 @@ TQSize KDialogBase::configDialogSize( const TQString& groupName ) const } -TQSize KDialogBase::configDialogSize( KConfig& config, +TQSize KDialogBase::configDialogSize( TDEConfig& config, const TQString& groupName ) const { int w, h; @@ -1754,7 +1754,7 @@ TQSize KDialogBase::configDialogSize( KConfig& config, w = sizeHint().width(); h = sizeHint().height(); - KConfigGroupSaver cs(&config, groupName); + TDEConfigGroupSaver cs(&config, groupName); w = config.readNumEntry( TQString::fromLatin1("Width %1").arg( desk.width()), w ); h = config.readNumEntry( TQString::fromLatin1("Height %1").arg( desk.height()), h ); @@ -1768,13 +1768,13 @@ void KDialogBase::saveDialogSize( const TQString& groupName, bool global ) } -void KDialogBase::saveDialogSize( KConfig& config, const TQString& groupName, +void KDialogBase::saveDialogSize( TDEConfig& config, const TQString& groupName, bool global ) const { int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); - KConfigGroupSaver cs(&config, groupName); + TDEConfigGroupSaver cs(&config, groupName); TQSize sizeToSave = size(); config.writeEntry( TQString::fromLatin1("Width %1").arg( desk.width()), diff --git a/tdeui/kdialogbase.h b/tdeui/kdialogbase.h index 893e049f7..1bc910fd6 100644 --- a/tdeui/kdialogbase.h +++ b/tdeui/kdialogbase.h @@ -839,12 +839,12 @@ class TDEUI_EXPORT KDialogBase : public KDialog * read the dialogs size from the configuration according to the screen size. * If no size is saved for one dimension of the screen, sizeHint() is returned. * - * @param config The KConfig object to read from + * @param config The TDEConfig object to read from * @param groupName Name of the group to read from. The old group * of TDEGlobal::config is preserved. * @since 3.2 */ - TQSize configDialogSize( KConfig& config, const TQString& groupName ) const; + TQSize configDialogSize( TDEConfig& config, const TQString& groupName ) const; /** * save the dialogs size dependant on the screen dimension either to the @@ -860,14 +860,14 @@ class TDEUI_EXPORT KDialogBase : public KDialog /** * save the dialogs size dependant on the screen dimension. * - * @param config The KConfig object to write to. + * @param config The TDEConfig object to write to. * @param groupName The group to which the dialogs size is saved. See * configDialogSize to read the size. * @param global Set to true if the entry should go to the global config. * Default is false. * @since 3.2 */ - void saveDialogSize( KConfig& config, const TQString& groupName, + void saveDialogSize( TDEConfig& config, const TQString& groupName, bool global=false ) const; /** diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index 192c24b05..a1ef8aad1 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -165,12 +165,12 @@ void KDockMainWindow::readDockConfig(TQDomElement &base) } #ifndef NO_KDE2 -void KDockMainWindow::writeDockConfig( KConfig* c, TQString group ) +void KDockMainWindow::writeDockConfig( TDEConfig* c, TQString group ) { dockManager->writeConfig( c, group ); } -void KDockMainWindow::readDockConfig( KConfig* c, TQString group ) +void KDockMainWindow::readDockConfig( TDEConfig* c, TQString group ) { dockManager->readConfig( c, group ); } @@ -420,12 +420,12 @@ void KDockWidgetHeader::setDragEnabled(bool b) } #ifndef NO_KDE2 -void KDockWidgetHeader::saveConfig( KConfig* c ) +void KDockWidgetHeader::saveConfig( TDEConfig* c ) { c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() ); } -void KDockWidgetHeader::loadConfig( KConfig* c ) +void KDockWidgetHeader::loadConfig( TDEConfig* c ) { setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) ); } @@ -2528,7 +2528,7 @@ void KDockManager::setReadDockConfigMode(int mode) } #ifndef NO_KDE2 -void KDockManager::writeConfig( KConfig* c, TQString group ) +void KDockManager::writeConfig( TDEConfig* c, TQString group ) { //debug("BEGIN Write Config"); if ( !c ) c = TDEGlobal::config(); @@ -2670,7 +2670,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) //debug("END Write Config"); } #include <tqmessagebox.h> -void KDockManager::readConfig( KConfig* c, TQString group ) +void KDockManager::readConfig( TDEConfig* c, TQString group ) { if ( !c ) c = TDEGlobal::config(); if ( group.isEmpty() ) group = "dock_setting_default"; @@ -3134,12 +3134,12 @@ void KDockArea::resizeEvent(TQResizeEvent *rsize) } #ifndef NO_KDE2 -void KDockArea::writeDockConfig( KConfig* c, TQString group ) +void KDockArea::writeDockConfig( TDEConfig* c, TQString group ) { dockManager->writeConfig( c, group ); } -void KDockArea::readDockConfig( KConfig* c, TQString group ) +void KDockArea::readDockConfig( TDEConfig* c, TQString group ) { dockManager->readConfig( c, group ); } @@ -3261,8 +3261,8 @@ void KDockContainer::removeWidget (KDockWidget *dw){ void KDockContainer::undockWidget (KDockWidget *){;} void KDockContainer::setToolTip(KDockWidget *, TQString &){;} void KDockContainer::setPixmap(KDockWidget*,const TQPixmap&){;} -void KDockContainer::load (KConfig*, const TQString&){;} -void KDockContainer::save (KConfig*, const TQString&){;} +void KDockContainer::load (TDEConfig*, const TQString&){;} +void KDockContainer::save (TDEConfig*, const TQString&){;} void KDockContainer::load (TQDomElement&){;} void KDockContainer::save (TQDomElement&){;} void KDockContainer::prepareSave(TQStringList &names) diff --git a/tdeui/kdockwidget.h b/tdeui/kdockwidget.h index 8f5c288ec..27b7f2b74 100644 --- a/tdeui/kdockwidget.h +++ b/tdeui/kdockwidget.h @@ -81,7 +81,7 @@ class TQPixmap; #ifndef NO_KDE2 class KToolBar; -class KConfig; +class TDEConfig; #else class TQToolBar; #endif @@ -128,12 +128,12 @@ public: /** * Provides saving the current configuration. Must be overridden by an inheriting class. */ - virtual void saveConfig( KConfig* ){} + virtual void saveConfig( TDEConfig* ){} /** * Provides loading the current configuration. Must be overridden by an inheriting class */ - virtual void loadConfig( KConfig* ){} + virtual void loadConfig( TDEConfig* ){} #endif protected: @@ -291,14 +291,14 @@ public: * * @param c the configuration safe */ - virtual void saveConfig( KConfig* c); + virtual void saveConfig( TDEConfig* c); /** * Loads the current button state from a KDE config container object. * * @param c the configuration safe */ - virtual void loadConfig( KConfig* c); + virtual void loadConfig( TDEConfig* c); #endif /*@since 3.2 @@ -906,7 +906,7 @@ private: * that can be called within a KDockMainWindow or a KDockWidget . * * An important feature is the ability to read or save the current state of all things concerning to - * dockwidgets to KConfig . + * dockwidgets to TDEConfig . * * The dockmanager is also often used when a certain dockwidget or a child of such dockwidget must be found. * @@ -954,9 +954,9 @@ public: * last but not least some necessary things for recovering the dockmainwindow state. * * @param c the KDE configuration saver - * @param group the name of the section in KConfig + * @param group the name of the section in TDEConfig */ - void writeConfig( KConfig* c = 0L, TQString group = TQString::null ); + void writeConfig( TDEConfig* c = 0L, TQString group = TQString::null ); /** * Like writeConfig but reads the whole stuff in. @@ -972,9 +972,9 @@ public: * to work, each widget must have a unique name. * * @param c the KDE configuration saver - * @param group the name of the section in KConfig + * @param group the name of the section in TDEConfig */ - void readConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void readConfig ( TDEConfig* c = 0L, TQString group = TQString::null ); #endif /// @since 3.1 @@ -1390,20 +1390,20 @@ public: #ifndef NO_KDE2 /** - * It writes the current dock state in the given section of KConfig. + * It writes the current dock state in the given section of TDEConfig. * * @param c KDE class for saving configurations * @param group name of section to write to */ - void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); + void writeDockConfig( TDEConfig* c = 0L, TQString group = TQString::null ); /** - * It reads the current dock state from the given section of KConfig. + * It reads the current dock state from the given section of TDEConfig. * * @param c KDE class for saving configurations * @param group name of section to read from */ - void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void readDockConfig ( TDEConfig* c = 0L, TQString group = TQString::null ); #endif /** @@ -1509,8 +1509,8 @@ public: void readDockConfig(TQDomElement &base); #ifndef NO_KDE2 - void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); - void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); + void writeDockConfig( TDEConfig* c = 0L, TQString group = TQString::null ); + void readDockConfig ( TDEConfig* c = 0L, TQString group = TQString::null ); #endif diff --git a/tdeui/kdockwidget_p.h b/tdeui/kdockwidget_p.h index 9ee9e8e73..471c4d9b2 100644 --- a/tdeui/kdockwidget_p.h +++ b/tdeui/kdockwidget_p.h @@ -50,9 +50,9 @@ public: virtual void showWidget(KDockWidget *); virtual void removeWidget(KDockWidget*); virtual void undockWidget(KDockWidget*); - virtual void save(KConfig *cfg,const TQString& group_or_prefix); + virtual void save(TDEConfig *cfg,const TQString& group_or_prefix); virtual void save(TQDomElement& dockElement); - virtual void load(KConfig *cfg,const TQString& group_or_prefix); + virtual void load(TDEConfig *cfg,const TQString& group_or_prefix); virtual void load(TQDomElement& dockElement); virtual void setToolTip (KDockWidget *, TQString &); virtual void setPixmap(KDockWidget*,const TQPixmap&); diff --git a/tdeui/kfontcombo.cpp b/tdeui/kfontcombo.cpp index 54b2932aa..1923f6cb9 100644 --- a/tdeui/kfontcombo.cpp +++ b/tdeui/kfontcombo.cpp @@ -373,7 +373,7 @@ void KFontCombo::updateFonts() bool KFontCombo::displayFonts() { - KConfigGroupSaver saver(TDEGlobal::config(), "KDE"); + TDEConfigGroupSaver saver(TDEGlobal::config(), "KDE"); return TDEGlobal::config()->readBoolEntry("DisplayFontItems", true); } diff --git a/tdeui/kfontdialog.cpp b/tdeui/kfontdialog.cpp index 23d514092..01073521d 100644 --- a/tdeui/kfontdialog.cpp +++ b/tdeui/kfontdialog.cpp @@ -330,8 +330,8 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, if( sizeIsRelativeState && sizeIsRelativeCheckBox ) setSizeIsRelative( *sizeIsRelativeState ); - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver(config, TQString::fromLatin1("General")); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver(config, TQString::fromLatin1("General")); showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false)); } diff --git a/tdeui/kkeydialog.cpp b/tdeui/kkeydialog.cpp index d9ae693f3..b83cc6d53 100644 --- a/tdeui/kkeydialog.cpp +++ b/tdeui/kkeydialog.cpp @@ -675,12 +675,12 @@ void KKeyChooser::listSync() }*/ } -void KKeyChooser::syncToConfig( const TQString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset ) +void KKeyChooser::syncToConfig( const TQString& sConfigGroup, TDEConfigBase* pConfig, bool bClearUnset ) { kdDebug(125) << "KKeyChooser::syncToConfig( \"" << sConfigGroup << "\", " << pConfig << " ) start" << endl; if( !pConfig ) pConfig = TDEGlobal::config(); - KConfigGroupSaver cgs( pConfig, sConfigGroup ); + TDEConfigGroupSaver cgs( pConfig, sConfigGroup ); TQListViewItemIterator it( d->pList ); for( ; it.current(); ++it ) { @@ -1094,7 +1094,7 @@ KKeyDialog::KKeyDialog( KKeyChooser::ActionType type, bool bAllowLetterShortcuts setMainWidget( m_pKeyChooser ); connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) ); - KConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); + TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); TQSize sz = size(); resize( group.readSizeEntry( "Dialog Size", &sz ) ); } @@ -1106,14 +1106,14 @@ KKeyDialog::KKeyDialog( bool bAllowLetterShortcuts, TQWidget *parent, const char setMainWidget( m_pKeyChooser ); connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) ); - KConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); + TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); TQSize sz = size(); resize( group.readSizeEntry( "Dialog Size", &sz ) ); } KKeyDialog::~KKeyDialog() { - KConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); + TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); group.writeEntry( "Dialog Size", size(), true, true ); } diff --git a/tdeui/kkeydialog.h b/tdeui/kkeydialog.h index b457f133b..eba8d0069 100644 --- a/tdeui/kkeydialog.h +++ b/tdeui/kkeydialog.h @@ -34,7 +34,7 @@ class TQRadioButton; class KAccel; class KAccelActions; class KActionCollection; -class KConfigBase; +class TDEConfigBase; class TDEGlobalAccel; class KKeySequence; class KShortcut; @@ -98,7 +98,7 @@ class TDEUI_EXPORT KKeyChooser : public TQWidget */ bool insert( KActionCollection *, const TQString &title); - void syncToConfig( const TQString& sConfigGroup, KConfigBase* pConfig, bool bClearUnset ); + void syncToConfig( const TQString& sConfigGroup, TDEConfigBase* pConfig, bool bClearUnset ); /** * This function writes any shortcut changes back to the original @@ -337,7 +337,7 @@ public: /** * This is an overloaded member function, provided for convenience. * It behaves essentially like the above function, except that settings - * are saved to a *.rc file using KConfig. + * are saved to a *.rc file using TDEConfig. */ static int configure( KAccel* keys, TQWidget* parent = 0, bool bSaveSettings = true ); diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp index ece9a3ffe..d70485b09 100644 --- a/tdeui/klineedit.cpp +++ b/tdeui/klineedit.cpp @@ -62,7 +62,7 @@ public: if ( !initialized ) { - KConfigGroup config( TDEGlobal::config(), "General" ); + TDEConfigGroup config( TDEGlobal::config(), "General" ); backspacePerformsCompletion = config.readBoolEntry( "Backspace performs completion", false ); initialized = true; diff --git a/tdeui/klistview.cpp b/tdeui/klistview.cpp index 8aff145b8..b604658f1 100644 --- a/tdeui/klistview.cpp +++ b/tdeui/klistview.cpp @@ -2015,9 +2015,9 @@ bool KListView::shadeSortColumn() const return d->shadeSortColumn; } -void KListView::saveLayout(KConfig *config, const TQString &group) const +void KListView::saveLayout(TDEConfig *config, const TQString &group) const { - KConfigGroupSaver saver(config, group); + TDEConfigGroupSaver saver(config, group); TQStringList widths, order; const int colCount = columns(); @@ -2033,9 +2033,9 @@ void KListView::saveLayout(KConfig *config, const TQString &group) const config->writeEntry("SortAscending", d->sortAscending); } -void KListView::restoreLayout(KConfig *config, const TQString &group) +void KListView::restoreLayout(TDEConfig *config, const TQString &group) { - KConfigGroupSaver saver(config, group); + TDEConfigGroupSaver saver(config, group); TQStringList cols = config->readListEntry("ColumnWidths"); int i = 0; { // scope the iterators diff --git a/tdeui/klistview.h b/tdeui/klistview.h index e60ae70b8..ee283aa5f 100644 --- a/tdeui/klistview.h +++ b/tdeui/klistview.h @@ -26,7 +26,7 @@ #include <tdelibs_export.h> class TQDragObject; -class KConfig; +class TDEConfig; class KLineEdit; /** * This Widget extends the functionality of TQListView to honor the system @@ -350,20 +350,20 @@ public: /** * Saves the list view's layout (column widtsh, column order, sort column) - * to a KConfig group + * to a TDEConfig group * - * @param config the KConfig object to write to + * @param config the TDEConfig object to write to * @param group the config group to use */ - void saveLayout(KConfig *config, const TQString &group) const; + void saveLayout(TDEConfig *config, const TQString &group) const; /** - * Reads the list view's layout from a KConfig group as stored with + * Reads the list view's layout from a TDEConfig group as stored with * saveLayout * - * @param config the KConfig object to read from + * @param config the TDEConfig object to read from * @param group the config group to use */ - void restoreLayout(KConfig *config, const TQString &group); + void restoreLayout(TDEConfig *config, const TQString &group); /** * Reimplemented to remember the current sort column and order. * @param column is the column to be sorted, or -1 to sort in order of diff --git a/tdeui/kmainwindow.cpp b/tdeui/kmainwindow.cpp index 487d4f197..14f6f6bea 100644 --- a/tdeui/kmainwindow.cpp +++ b/tdeui/kmainwindow.cpp @@ -92,7 +92,7 @@ public: } bool saveState( TQSessionManager& ) { - KConfig* config = TDEApplication::kApplication()->sessionConfig(); + TDEConfig* config = TDEApplication::kApplication()->sessionConfig(); if ( KMainWindow::memberList->first() ){ // According to Jochen Wilhelmy <digisnap@cs.tu-berlin.de>, this // hook is useful for better document orientation @@ -353,7 +353,7 @@ bool KMainWindow::canBeRestored( int number ) { if ( !kapp->isRestored() ) return false; - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); if ( !config ) return false; config->setGroup( TQString::fromLatin1("Number") ); @@ -365,7 +365,7 @@ const TQString KMainWindow::classNameOfToplevel( int number ) { if ( !kapp->isRestored() ) return TQString::null; - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); if ( !config ) return TQString::null; TQString s; @@ -412,7 +412,7 @@ bool KMainWindow::restore( int number, bool show ) { if ( !canBeRestored( number ) ) return false; - KConfig *config = kapp->sessionConfig(); + TDEConfig *config = kapp->sessionConfig(); if ( readPropertiesInternal( config, number ) ){ if ( show ) KMainWindow::show(); @@ -671,11 +671,11 @@ bool KMainWindow::queryClose() return true; } -void KMainWindow::saveGlobalProperties( KConfig* ) +void KMainWindow::saveGlobalProperties( TDEConfig* ) { } -void KMainWindow::readGlobalProperties( KConfig* ) +void KMainWindow::readGlobalProperties( TDEConfig* ) { } @@ -689,7 +689,7 @@ void KMainWindow::showAboutApplication() { } -void KMainWindow::savePropertiesInternal( KConfig *config, int number ) +void KMainWindow::savePropertiesInternal( TDEConfig *config, int number ) { bool oldASWS = d->autoSaveWindowSize; d->autoSaveWindowSize = true; // make saveMainWindowSettings save the window size @@ -713,7 +713,7 @@ void KMainWindow::savePropertiesInternal( KConfig *config, int number ) d->autoSaveWindowSize = oldASWS; } -void KMainWindow::saveMainWindowSettings(KConfig *config, const TQString &configGroup) +void KMainWindow::saveMainWindowSettings(TDEConfig *config, const TQString &configGroup) { kdDebug(200) << "KMainWindow::saveMainWindowSettings " << configGroup << endl; TQString oldGroup; @@ -802,7 +802,7 @@ void KMainWindow::createStandardStatusBarAction(){ } } -bool KMainWindow::readPropertiesInternal( KConfig *config, int number ) +bool KMainWindow::readPropertiesInternal( TDEConfig *config, int number ) { if ( number == 1 ) readGlobalProperties( config ); @@ -826,16 +826,16 @@ bool KMainWindow::readPropertiesInternal( KConfig *config, int number ) return true; } -void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &configGroup) +void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup) { return applyMainWindowSettings(config,configGroup,false); } -void KMainWindow::applyMainWindowSettings(KConfig *config, const TQString &configGroup,bool force) +void KMainWindow::applyMainWindowSettings(TDEConfig *config, const TQString &configGroup,bool force) { kdDebug(200) << "KMainWindow::applyMainWindowSettings" << endl; - KConfigGroupSaver saver( config, configGroup.isEmpty() ? config->group() : configGroup ); + TDEConfigGroupSaver saver( config, configGroup.isEmpty() ? config->group() : configGroup ); restoreWindowSize(config); @@ -899,7 +899,7 @@ void KMainWindow::finalizeGUI( bool force ) d->settingsDirty = false; } -void KMainWindow::saveWindowSize( KConfig * config ) const +void KMainWindow::saveWindowSize( TDEConfig * config ) const { int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); @@ -931,7 +931,7 @@ void KMainWindow::saveWindowSize( KConfig * config ) const config->writeEntry(heightString, h ); } -void KMainWindow::restoreWindowSize( KConfig * config ) +void KMainWindow::restoreWindowSize( TDEConfig * config ) { if (d->care_about_geometry) { parseGeometry(true); diff --git a/tdeui/kmainwindow.h b/tdeui/kmainwindow.h index a90d3dc12..a66eb8327 100644 --- a/tdeui/kmainwindow.h +++ b/tdeui/kmainwindow.h @@ -30,7 +30,7 @@ class KPopupMenu; class KXMLGUIFactory; -class KConfig; +class TDEConfig; class KHelpMenu; class KStatusBar; class TQStatusBar; @@ -489,9 +489,9 @@ public: * group name is used. * @param force if set, even default settings are re-applied */ - void applyMainWindowSettings(KConfig *config, const TQString &groupName, bool force); + void applyMainWindowSettings(TDEConfig *config, const TQString &groupName, bool force); // KDE4 merge with force=false - void applyMainWindowSettings(KConfig *config, const TQString &groupName = TQString::null); + void applyMainWindowSettings(TDEConfig *config, const TQString &groupName = TQString::null); /** * Save settings for statusbar, menubar and toolbar to their respective @@ -501,7 +501,7 @@ public: * @param groupName Group name to use. If not specified, the last used * group name is used */ - void saveMainWindowSettings(KConfig *config, const TQString &groupName = TQString::null); + void saveMainWindowSettings(TDEConfig *config, const TQString &groupName = TQString::null); /** * Sets whether KMainWindow should provide a menu that allows showing/hiding @@ -881,12 +881,12 @@ protected: * in this function! * */ - virtual void saveProperties( KConfig* ) {} + virtual void saveProperties( TDEConfig* ) {} /** * Read your instance-specific properties. */ - virtual void readProperties( KConfig* ) {} + virtual void readProperties( TDEConfig* ) {} /** * Save your application-wide properties. The function is @@ -904,16 +904,16 @@ protected: * * Default implementation does nothing. */ - virtual void saveGlobalProperties( KConfig* sessionConfig ); + virtual void saveGlobalProperties( TDEConfig* sessionConfig ); /** * The counterpart of saveGlobalProperties(). * * Read the application-specific properties in again. */ - virtual void readGlobalProperties( KConfig* sessionConfig ); - void savePropertiesInternal( KConfig*, int ); - bool readPropertiesInternal( KConfig*, int ); + virtual void readGlobalProperties( TDEConfig* sessionConfig ); + void savePropertiesInternal( TDEConfig*, int ); + bool readPropertiesInternal( TDEConfig*, int ); /** * For inherited classes @@ -927,13 +927,13 @@ protected: * For inherited classes * Note that the group must be set before calling */ - void saveWindowSize( KConfig * config ) const; + void saveWindowSize( TDEConfig * config ) const; /** * For inherited classes * Note that the group must be set before calling, and that * a -geometry on the command line has priority. */ - void restoreWindowSize( KConfig * config ); + void restoreWindowSize( TDEConfig * config ); /// parse the geometry from the geometry command line argument void parseGeometry(bool parsewidth); diff --git a/tdeui/kmenubar.cpp b/tdeui/kmenubar.cpp index 7266d8d91..f6cac81ab 100644 --- a/tdeui/kmenubar.cpp +++ b/tdeui/kmenubar.cpp @@ -235,8 +235,8 @@ void KMenuBar::show() void KMenuBar::slotReadConfig() { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver saver( config, "KDE" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver saver( config, "KDE" ); setTopLevelMenuInternal( config->readBoolEntry( "macStyle", false ) ); } @@ -329,7 +329,7 @@ void KMenuBar::selectionTimeout() if ( d->topLevel ) { d->fallback_mode = true; // KMenuBar is handling its position itself - KConfigGroup xineramaConfig(TDEGlobal::config(),"Xinerama"); + TDEConfigGroup xineramaConfig(TDEGlobal::config(),"Xinerama"); int screen = xineramaConfig.readNumEntry("MenubarScreen", TQApplication::desktop()->screenNumber(TQPoint(0,0)) ); TQRect area; diff --git a/tdeui/kmessagebox.cpp b/tdeui/kmessagebox.cpp index 4037ffdcc..524636089 100644 --- a/tdeui/kmessagebox.cpp +++ b/tdeui/kmessagebox.cpp @@ -343,8 +343,8 @@ KMessageBox::shouldBeShownYesNo(const TQString &dontShowAgainName, { if ( dontShowAgainName.isEmpty() ) return true; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); TQString dontAsk = config->readEntry(dontShowAgainName).lower(); if (dontAsk == "yes") { result = Yes; @@ -362,8 +362,8 @@ KMessageBox::shouldBeShownContinue(const TQString &dontShowAgainName) { if ( dontShowAgainName.isEmpty() ) return true; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); return config->readBoolEntry(dontShowAgainName, true); } @@ -373,8 +373,8 @@ KMessageBox::saveDontShowAgainYesNo(const TQString &dontShowAgainName, { if ( dontShowAgainName.isEmpty() ) return; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); config->writeEntry( dontShowAgainName, result==Yes ? "yes" : "no", true, (dontShowAgainName[0] == ':')); config->sync(); } @@ -384,15 +384,15 @@ KMessageBox::saveDontShowAgainContinue(const TQString &dontShowAgainName) { if ( dontShowAgainName.isEmpty() ) return; TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); config->writeEntry( dontShowAgainName, false, true, (dontShowAgainName[0] == ':')); config->sync(); } -KConfig* KMessageBox::againConfig = NULL; +TDEConfig* KMessageBox::againConfig = NULL; void -KMessageBox::setDontShowAskAgainConfig(KConfig* cfg) +KMessageBox::setDontShowAskAgainConfig(TDEConfig* cfg) { againConfig = cfg; } @@ -935,12 +935,12 @@ KMessageBox::informationListWId(WId parent_id,const TQString &text, const TQStri void KMessageBox::enableAllMessages() { - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); if (!config->hasGroup(grpNotifMsgs)) return; - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); typedef TQMap<TQString, TQString> configMap; @@ -955,12 +955,12 @@ KMessageBox::enableAllMessages() void KMessageBox::enableMessage(const TQString &dontShowAgainName) { - KConfig *config = againConfig ? againConfig : TDEGlobal::config(); + TDEConfig *config = againConfig ? againConfig : TDEGlobal::config(); TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages"); if (!config->hasGroup(grpNotifMsgs)) return; - KConfigGroupSaver saver( config, grpNotifMsgs ); + TDEConfigGroupSaver saver( config, grpNotifMsgs ); config->deleteEntry(dontShowAgainName); config->sync(); diff --git a/tdeui/kmessagebox.h b/tdeui/kmessagebox.h index 574ae9ea8..b7724f5ce 100644 --- a/tdeui/kmessagebox.h +++ b/tdeui/kmessagebox.h @@ -27,7 +27,7 @@ class TQWidget; class TQStringList; -class KConfig; +class TDEConfig; class KDialogBase; /** @@ -1097,7 +1097,7 @@ public: * If @p cfg is 0 (default) TDEGlobal::config() will be used. * @since 3.2 */ - static void setDontShowAskAgainConfig(KConfig* cfg); + static void setDontShowAskAgainConfig(TDEConfig* cfg); /** * Create content and layout of a standard dialog @@ -1160,7 +1160,7 @@ public: TQMessageBox::Icon notifyType=TQMessageBox::Information); private: - static KConfig* againConfig; + static TDEConfig* againConfig; }; #endif diff --git a/tdeui/kpanelapplet.h b/tdeui/kpanelapplet.h index 50a16fd27..2ef893927 100644 --- a/tdeui/kpanelapplet.h +++ b/tdeui/kpanelapplet.h @@ -27,7 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqframe.h> #include <kconfig.h> -class KConfig; +class TDEConfig; class TQPopupMenu; /** @@ -176,7 +176,7 @@ public: virtual int heightForWidth(int width) const { return width; } /** - * Always use this KConfig object to save/load your applet's configuration. + * Always use this TDEConfig object to save/load your applet's configuration. * * For unique applets this config object will write to a config file called * \<appletname\>rc in the user's local %KDE directory. @@ -184,7 +184,7 @@ public: * For normal applets this config object will write to a instance specific config file * called \<appletname\>\<instanceid\>rc in the user's local %KDE directory. **/ - KConfig* config() const { return _config; } + TDEConfig* config() const { return _config; } KSharedConfig::Ptr sharedConfig() const; /** @@ -384,7 +384,7 @@ private: Type _type; Position _position; Alignment _alignment; - KConfig* _config; + TDEConfig* _config; int _actions; protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kpanelextension.cpp b/tdeui/kpanelextension.cpp index 47ddd7d95..aae989c2e 100644 --- a/tdeui/kpanelextension.cpp +++ b/tdeui/kpanelextension.cpp @@ -55,7 +55,7 @@ KPanelExtension::KPanelExtension(const TQString& configFile, Type type, { d = new KPanelExtensionPrivate; setFrameStyle(NoFrame); - _config = new KConfig(configFile); + _config = new TDEConfig(configFile); } KPanelExtension::~KPanelExtension() diff --git a/tdeui/kpanelextension.h b/tdeui/kpanelextension.h index 437f3795e..f97e85482 100644 --- a/tdeui/kpanelextension.h +++ b/tdeui/kpanelextension.h @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdelibs_export.h> class TQPopupMenu; -class KConfig; +class TDEConfig; class KPanelExtensionPrivate; /** @@ -139,7 +139,7 @@ public: virtual TQSize sizeHint(Position /*p*/, TQSize maxsize) const { return maxsize; } /** - * Always use this KConfig object to save/load your extensions configuration. + * Always use this TDEConfig object to save/load your extensions configuration. * * For unique extensions this config object will write to a config file called * \<extensionname\>rc in the users local KDE directory. @@ -147,7 +147,7 @@ public: * For normal extensions this config object will write to a instance specific config file * called \<extensionname\>\<instanceid\>rc in the users local KDE directory. **/ - KConfig* config() const { return _config; } + TDEConfig* config() const { return _config; } /** * @return Type indicating the extensions type. @@ -334,7 +334,7 @@ private: Type _type; Position _position; Alignment _alignment; - KConfig* _config; + TDEConfig* _config; int _actions; protected: virtual void virtual_hook( int id, void* data ); diff --git a/tdeui/kpanelmenu.cpp b/tdeui/kpanelmenu.cpp index 194801ff2..101d2aba0 100644 --- a/tdeui/kpanelmenu.cpp +++ b/tdeui/kpanelmenu.cpp @@ -63,7 +63,7 @@ void KPanelMenu::init(const TQString& path) connect(this, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow())); // setup cache timer - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); config->setGroup("menus"); d->clearDelay = config->readNumEntry("MenuCacheTime", 60000); // 1 minute diff --git a/tdeui/kpassdlg.cpp b/tdeui/kpassdlg.cpp index 3b3d74be2..5803ca477 100644 --- a/tdeui/kpassdlg.cpp +++ b/tdeui/kpassdlg.cpp @@ -110,8 +110,8 @@ KPasswordEdit::KPasswordEdit(TQWidget *parent, const char *name) { init(); - KConfig* const cfg = TDEGlobal::config(); - KConfigGroupSaver saver(cfg, "Passwords"); + TDEConfig* const cfg = TDEGlobal::config(); + TDEConfigGroupSaver saver(cfg, "Passwords"); const TQString val = cfg->readEntry("EchoMode", "OneStar"); if (val == "ThreeStars") @@ -338,8 +338,8 @@ void KPasswordDialog::init() { m_Row = 0; - KConfig* const cfg = TDEGlobal::config(); - const KConfigGroupSaver saver(cfg, "Passwords"); + TDEConfig* const cfg = TDEGlobal::config(); + const TDEConfigGroupSaver saver(cfg, "Passwords"); bool def = ( qstrcmp( tqAppName(), "tdesu" ) == 0 ? defKeep : false ); if (m_Keep && cfg->readBoolEntry("Keep", def)) ++m_Keep; diff --git a/tdeui/kpixmapio.cpp b/tdeui/kpixmapio.cpp index 4164e7db2..004a51349 100644 --- a/tdeui/kpixmapio.cpp +++ b/tdeui/kpixmapio.cpp @@ -87,7 +87,7 @@ KPixmapIO::KPixmapIO() #ifdef HAVE_MITSHM setShmPolicy(ShmDontKeep); - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); if (!config->readBoolEntry("UseMitShm", true)) return; diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp index 824e92bfc..c5ec9dcf0 100644 --- a/tdeui/ksconfig.cpp +++ b/tdeui/ksconfig.cpp @@ -181,7 +181,7 @@ KSpellConfig::dictFromList() const bool KSpellConfig::readGlobalSettings() { - KConfigGroupSaver cs( kc,"KSpell" ); + TDEConfigGroupSaver cs( kc,"KSpell" ); setNoRootAffix ( kc->readNumEntry("KSpell_NoRootAffix", 0) ); setRunTogether ( kc->readNumEntry("KSpell_RunTogether", 0) ); @@ -196,7 +196,7 @@ KSpellConfig::readGlobalSettings() bool KSpellConfig::writeGlobalSettings () { - KConfigGroupSaver cs( kc,"KSpell" ); + TDEConfigGroupSaver cs( kc,"KSpell" ); kc->writeEntry ("KSpell_NoRootAffix",(int) noRootAffix(), true, true); kc->writeEntry ("KSpell_RunTogether", (int) runTogether(), true, true); diff --git a/tdeui/ksconfig.h b/tdeui/ksconfig.h index b9cabe220..941405854 100644 --- a/tdeui/ksconfig.h +++ b/tdeui/ksconfig.h @@ -28,7 +28,7 @@ class TQCheckBox; class TQComboBox; class TQLabel; -class KConfig; +class TDEConfig; class KSpellConfigPrivate; /** @@ -264,7 +264,7 @@ class TDEUI_EXPORT KSpellConfig : public TQWidget TQString qspdict; // -p [dict] TQStringList ignorelist; enum {rdictlist=3, rencoding=4, rhelp=6}; - KConfig *kc; + TDEConfig *kc; int iclient; // defaults to ispell, may be aspell, too TQCheckBox *cb1, *cb2; diff --git a/tdeui/kscrollview.cpp b/tdeui/kscrollview.cpp index 5750c8832..fe865d31e 100644 --- a/tdeui/kscrollview.cpp +++ b/tdeui/kscrollview.cpp @@ -54,7 +54,7 @@ KScrollView::~KScrollView() void KScrollView::scrollBy(int dx, int dy) { - KConfigGroup cfg( TDEGlobal::config(), "KDE" ); + TDEConfigGroup cfg( TDEGlobal::config(), "KDE" ); if( !cfg.readBoolEntry( "SmoothScrolling", true )) { TQScrollView::scrollBy( dx, dy ); return; diff --git a/tdeui/kshortcutdialog.cpp b/tdeui/kshortcutdialog.cpp index 1ed3b7df7..c93194e77 100644 --- a/tdeui/kshortcutdialog.cpp +++ b/tdeui/kshortcutdialog.cpp @@ -119,7 +119,7 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T setShortcut( shortcut ); resize( 0, 0 ); - s_showMore = KConfigGroup(TDEGlobal::config(), "General").readBoolEntry("ShowAlternativeShortcutConfig", s_showMore); + s_showMore = TDEConfigGroup(TDEGlobal::config(), "General").readBoolEntry("ShowAlternativeShortcutConfig", s_showMore); updateDetails(); #ifdef Q_WS_X11 @@ -129,7 +129,7 @@ KShortcutDialog::KShortcutDialog( const KShortcut& shortcut, bool bQtShortcut, T KShortcutDialog::~KShortcutDialog() { - KConfigGroup group(TDEGlobal::config(), "General"); + TDEConfigGroup group(TDEGlobal::config(), "General"); group.writeEntry("ShowAlternativeShortcutConfig", s_showMore); } diff --git a/tdeui/kstatusbar.cpp b/tdeui/kstatusbar.cpp index 444f34c6b..7d7856a34 100644 --- a/tdeui/kstatusbar.cpp +++ b/tdeui/kstatusbar.cpp @@ -63,7 +63,7 @@ KStatusBar::KStatusBar( TQWidget *parent, const char *name ) { // make the size grip stuff configurable // ...but off by default (sven) - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); TQString group(config->group()); config->setGroup(TQString::fromLatin1("StatusBar style")); bool grip_enabled = config->readBoolEntry(TQString::fromLatin1("SizeGripEnabled"), false); diff --git a/tdeui/kstdguiitem.h b/tdeui/kstdguiitem.h index 3014737ab..0a59d5969 100644 --- a/tdeui/kstdguiitem.h +++ b/tdeui/kstdguiitem.h @@ -86,7 +86,7 @@ public: static KGuiItem overwrite(); /** * Returns a KGuiItem suiting for cases where code or functionality - * runs under root privileges. Used in conjunction with KConfig Modules. + * runs under root privileges. Used in conjunction with TDEConfig Modules. */ static KGuiItem adminMode(); diff --git a/tdeui/kswitchlanguagedialog.cpp b/tdeui/kswitchlanguagedialog.cpp index 5ce1bc074..f86083d0a 100644 --- a/tdeui/kswitchlanguagedialog.cpp +++ b/tdeui/kswitchlanguagedialog.cpp @@ -207,12 +207,12 @@ void KSwitchLanguageDialog::slotOk() first = false; } - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); if (d->applicationLanguageList().join(":") != languageString) { //list is different from defaults or saved languages list - KConfigGroup group(config, "Locale"); + TDEConfigGroup group(config, "Locale"); group.writeEntry("Language", languageString); config->sync(); @@ -258,12 +258,12 @@ void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *but TQStringList KSwitchLanguageDialogPrivate::applicationLanguageList() { - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); TQStringList languagesList; if (config->hasGroup("Locale")) { - KConfigGroupSaver saver(config, "Locale"); + TDEConfigGroupSaver saver(config, "Locale"); if (config->hasKey("Language")) { diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index 66b43e26f..50f594c89 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -290,8 +290,8 @@ KDictSpellingHighlighter::KDictSpellingHighlighter( TQTextEdit *textEdit, d->checksDone = 0; d->completeRehighlightRequired = false; - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver cs( config, "KSpell" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs( config, "KSpell" ); d->disablePercentage = config->readNumEntry( "KSpell_AsYouTypeDisablePercentage", 42 ); d->disablePercentage = QMIN( d->disablePercentage, 101 ); d->disableWordCount = config->readNumEntry( "KSpell_AsYouTypeDisableWordCount", 100 ); @@ -335,7 +335,7 @@ KDictSpellingHighlighter::~KDictSpellingHighlighter() void KDictSpellingHighlighter::slotSpellReady( KSpell *spell ) { kdDebug(0) << "KDictSpellingHighlighter::slotSpellReady( " << spell << " )" << endl; - KConfigGroup cg( TDEGlobal::config(),"KSpell" ); + TDEConfigGroup cg( TDEGlobal::config(),"KSpell" ); if ( cg.readEntry("KSpell_DoSpellChecking") != "0" ) { if ( d->globalConfig ) { @@ -539,8 +539,8 @@ void KDictSpellingHighlighter::slotLocalSpellConfigChanged() TQString KDictSpellingHighlighter::spellKey() { - KConfig *config = TDEGlobal::config(); - KConfigGroupSaver cs( config, "KSpell" ); + TDEConfig *config = TDEGlobal::config(); + TDEConfigGroupSaver cs( config, "KSpell" ); config->reparseConfiguration(); TQString key; key += TQString::number( config->readNumEntry( "KSpell_NoRootAffix", 0 )); diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp index e24fde38a..717d5c574 100644 --- a/tdeui/ksystemtray.cpp +++ b/tdeui/ksystemtray.cpp @@ -314,8 +314,8 @@ KActionCollection* KSystemTray::actionCollection() TQPixmap KSystemTray::loadIcon( const TQString &icon, TDEInstance *instance ) { - KConfig *appCfg = kapp->config(); - KConfigGroupSaver configSaver(appCfg, "System Tray"); + TDEConfig *appCfg = kapp->config(); + TDEConfigGroupSaver configSaver(appCfg, "System Tray"); int iconWidth = appCfg->readNumEntry("systrayIconWidth", 22); return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth ); } diff --git a/tdeui/ktabwidget.cpp b/tdeui/ktabwidget.cpp index 1be5985ad..aff96f9a5 100644 --- a/tdeui/ktabwidget.cpp +++ b/tdeui/ktabwidget.cpp @@ -42,7 +42,7 @@ public: KTabWidgetPrivate() { m_automaticResizeTabs = false; - KConfigGroupSaver groupsaver(TDEGlobal::config(), "General"); + TDEConfigGroupSaver groupsaver(TDEGlobal::config(), "General"); m_maxLength = TDEGlobal::config()->readNumEntry("MaximumTabLength", 30); m_minLength = TDEGlobal::config()->readNumEntry("MinimumTabLength", 3); m_CurrentMaxLength = m_minLength; diff --git a/tdeui/ktip.cpp b/tdeui/ktip.cpp index b9e3bc594..085aba857 100644 --- a/tdeui/ktip.cpp +++ b/tdeui/ktip.cpp @@ -301,7 +301,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) ok->setDefault(true); hbox2->addWidget(ok); - KConfigGroup config(kapp->config(), "TipOfDay"); + TDEConfigGroup config(kapp->config(), "TipOfDay"); mTipOnStart->setChecked(config.readBoolEntry("RunOnStart", true)); connect(next, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextTip())); @@ -332,7 +332,7 @@ void KTipDialog::showTip(TQWidget *parent, const TQString &tipFile, bool force) void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bool force) { - KConfigGroup configGroup(kapp->config(), "TipOfDay"); + TDEConfigGroup configGroup(kapp->config(), "TipOfDay"); const bool runOnStart = configGroup.readBoolEntry("RunOnStart", true); @@ -418,7 +418,7 @@ static TQString fixTip(TQString tip) void KTipDialog::setShowOnStart(bool on) { - KConfigGroup config(kapp->config(), "TipOfDay"); + TDEConfigGroup config(kapp->config(), "TipOfDay"); config.writeEntry("RunOnStart", on); config.sync(); } diff --git a/tdeui/ktoolbar.cpp b/tdeui/ktoolbar.cpp index b6c67568d..41d416f01 100644 --- a/tdeui/ktoolbar.cpp +++ b/tdeui/ktoolbar.cpp @@ -1020,7 +1020,7 @@ void KToolBar::saveState() } // if that didn't work, we save to the config file - KConfig *config = TDEGlobal::config(); + TDEConfig *config = TDEGlobal::config(); saveSettings(config, TQString::null); config->sync(); } @@ -1040,7 +1040,7 @@ TQString KToolBar::settingsGroup() const return configGroup; } -void KToolBar::saveSettings(KConfig *config, const TQString &_configGroup) +void KToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) { TQString configGroup = _configGroup; if (configGroup.isEmpty()) @@ -1053,7 +1053,7 @@ void KToolBar::saveSettings(KConfig *config, const TQString &_configGroup) //kdDebug(220) << name() << " position=" << position << " index=" << index << " offset=" << offset() << " newLine=" << newLine() << endl; - KConfigGroupSaver saver(config, configGroup); + TDEConfigGroupSaver saver(config, configGroup); if(!config->hasDefault("Position") && position == d->PositionDefault ) config->revertToDefault("Position"); @@ -1487,7 +1487,7 @@ void KToolBar::slotAppearanceChanged() bool KToolBar::highlightSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - KConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); + TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); return TDEGlobal::config()->readBoolEntry(TQString::fromLatin1("Highlighting"),true); } @@ -1495,7 +1495,7 @@ bool KToolBar::highlightSetting() bool KToolBar::transparentSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - KConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); + TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); return TDEGlobal::config()->readBoolEntry(TQString::fromLatin1("TransparentMoving"),true); } @@ -1503,7 +1503,7 @@ bool KToolBar::transparentSetting() KToolBar::IconText KToolBar::iconTextSetting() { TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - KConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); + TDEConfigGroupSaver saver(TDEGlobal::config(), grpToolbar); TQString icontext = TDEGlobal::config()->readEntry(TQString::fromLatin1("IconText"),TQString::fromLatin1("IconOnly")); if ( icontext == "IconTextRight" ) return IconTextRight; @@ -1515,7 +1515,7 @@ KToolBar::IconText KToolBar::iconTextSetting() return IconOnly; } -void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configGroup, bool forceGlobal) +void KToolBar::applyAppearanceSettings(TDEConfig *config, const TQString &_configGroup, bool forceGlobal) { TQString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup; //kdDebug(220) << name() << " applyAppearanceSettings: configGroup=" << configGroup << " forceGlobal=" << forceGlobal << endl; @@ -1527,7 +1527,7 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG // This is the reason for the xmlgui tests below. bool xmlgui = d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty(); - KConfig *gconfig = TDEGlobal::config(); + TDEConfig *gconfig = TDEGlobal::config(); static const TQString &attrIconText = TDEGlobal::staticQString("IconText"); static const TQString &attrHighlight = TDEGlobal::staticQString("Highlighting"); @@ -1547,8 +1547,8 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG // this is the first iteration TQString grpToolbar(TQString::fromLatin1("Toolbar style")); - { // start block for KConfigGroupSaver - KConfigGroupSaver saver(gconfig, grpToolbar); + { // start block for TDEConfigGroupSaver + TDEConfigGroupSaver saver(gconfig, grpToolbar); // first, get the generic settings highlight = gconfig->readBoolEntry(attrHighlight, true); @@ -1590,7 +1590,7 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG } // revert back to the old group - } // end block for KConfigGroupSaver + } // end block for TDEConfigGroupSaver bool doUpdate = false; @@ -1637,12 +1637,12 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const TQString &_configG updateGeometry(); } -void KToolBar::applySettings(KConfig *config, const TQString &_configGroup) +void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup) { return applySettings(config,_configGroup,false); } -void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool force) +void KToolBar::applySettings(TDEConfig *config, const TQString &_configGroup, bool force) { //kdDebug(220) << name() << " applySettings group=" << _configGroup << endl; @@ -1654,7 +1654,7 @@ void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool Global config / <appnamerc> user settings if no XMLGUI is used Global config / App-XML attributes / <appnamerc> user settings if XMLGUI is used - So in the first case, we simply read everything from KConfig as below, + So in the first case, we simply read everything from TDEConfig as below, but in the second case we don't do anything here if there is no app-specific config, and the XMLGUI-related code (loadState()) uses the static methods of this class to get the global defaults. @@ -1668,7 +1668,7 @@ void KToolBar::applySettings(KConfig *config, const TQString &_configGroup, bool // ...and now the position stuff if ( config->hasGroup(configGroup) || force ) { - KConfigGroupSaver cgs(config, configGroup); + TDEConfigGroupSaver cgs(config, configGroup); static const TQString &attrPosition = TDEGlobal::staticQString("Position"); static const TQString &attrIndex = TDEGlobal::staticQString("Index"); @@ -1801,9 +1801,9 @@ void KToolBar::loadState( const TQDomElement &element ) This method is called in order to load toolbar settings from XML. However this can be used in two rather different cases: - for the initial loading of the app's XML. In that case the settings - are only the defaults, the user's KConfig settings will override them + are only the defaults, the user's TDEConfig settings will override them (KDE4 TODO: how about saving those user settings into the local XML file instead? - Then this whole thing would be simpler, no KConfig settings to apply afterwards. + Then this whole thing would be simpler, no TDEConfig settings to apply afterwards. OTOH we'd have to migrate those settings when the .rc version increases, like we do for shortcuts) diff --git a/tdeui/ktoolbar.h b/tdeui/ktoolbar.h index 5fffdd592..2a86b0687 100644 --- a/tdeui/ktoolbar.h +++ b/tdeui/ktoolbar.h @@ -905,20 +905,20 @@ public: /** * Save the toolbar settings to group @p configGroup in @p config. */ - void saveSettings(KConfig *config, const TQString &configGroup); + void saveSettings(TDEConfig *config, const TQString &configGroup); /** * Read the toolbar settings from group @p configGroup in @p config * and apply them. Even default settings are re-applied if @p force is set. */ - void applySettings(KConfig *config, const TQString &configGroup,bool force); + void applySettings(TDEConfig *config, const TQString &configGroup,bool force); // KDE4 merge with force=false - void applySettings(KConfig *config, const TQString &configGroup); + void applySettings(TDEConfig *config, const TQString &configGroup); /* * Tell the toolbar what XML-GUI resource file it should use to save * it's state. The state of the toolbar (position, size, etc) is - * saved in KConfig files if the application does not use XML-GUI + * saved in TDEConfig files if the application does not use XML-GUI * but if the app does, then it's saved the XML file. This function * allows this to happen. * @@ -1090,7 +1090,7 @@ protected: void showEvent( TQShowEvent *e ); void resizeEvent( TQResizeEvent *e ); bool event( TQEvent *e ); - void applyAppearanceSettings(KConfig *config, const TQString &_configGroup, bool forceGlobal = false); + void applyAppearanceSettings(TDEConfig *config, const TQString &_configGroup, bool forceGlobal = false); TQString settingsGroup() const; private slots: diff --git a/tdeui/tests/kcolordlgtest.cpp b/tdeui/tests/kcolordlgtest.cpp index 83f29a70e..a6dadcfd3 100644 --- a/tdeui/tests/kcolordlgtest.cpp +++ b/tdeui/tests/kcolordlgtest.cpp @@ -29,7 +29,7 @@ int main( int argc, char *argv[] ) KLocale::setMainCatalogue("tdelibs"); TQApplication::setColorMode( TQApplication::CustomColors ); TDEApplication a( argc, argv, "KColorDialogTest" ); - KConfig aConfig; + TDEConfig aConfig; aConfig.setGroup( "KColorDialog-test" ); color = aConfig.readColorEntry( "Chosen" ); diff --git a/tdeui/tests/kdockwidgetdemo.cpp b/tdeui/tests/kdockwidgetdemo.cpp index 1720ca09a..8b2ecb829 100644 --- a/tdeui/tests/kdockwidgetdemo.cpp +++ b/tdeui/tests/kdockwidgetdemo.cpp @@ -81,7 +81,7 @@ static const char *preview_xpm[] = { SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const char* name ) :TQDialog(0L,name,true) { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup( TQString::fromLatin1("SFileDialogData:") + name ); if ( initially.isNull() ){ initially = config->readPathEntry( "InitiallyDir", TQDir::currentDirPath() ); @@ -166,7 +166,7 @@ void SFileDialog::dockChange() SFileDialog::~SFileDialog() { - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup( TQString("SFileDialogData:") + name() ); config->writeEntry( "Bookmarks", fd->getBookmark() ); @@ -188,7 +188,7 @@ void SFileDialog::setDockDefaultPos( KDockWidget* d ) void SFileDialog::changeDir( const TQString& f ) { if ( !f.isEmpty() ){ - KConfig* config = kapp->config(); + TDEConfig* config = kapp->config(); config->setGroup( TQString("SFileDialogData:") + name() ); config->writePathEntry( "InitiallyDir", f ); } diff --git a/tdeui/tests/kfontdialogtest.cpp b/tdeui/tests/kfontdialogtest.cpp index 4ef49fec7..14edee074 100644 --- a/tdeui/tests/kfontdialogtest.cpp +++ b/tdeui/tests/kfontdialogtest.cpp @@ -33,7 +33,7 @@ { TDEApplication app( argc, argv, "KFontDialogTest" ); - KConfig aConfig; + TDEConfig aConfig; aConfig.setGroup( "KFontDialog-test" ); app.setFont(TQFont("Helvetica",12)); |