summaryrefslogtreecommitdiffstats
path: root/kutils
diff options
context:
space:
mode:
Diffstat (limited to 'kutils')
-rw-r--r--kutils/kcmodulecontainer.cpp60
-rw-r--r--kutils/kcmodulecontainer.h32
-rw-r--r--kutils/kcmoduleinfo.cpp24
-rw-r--r--kutils/kcmoduleinfo.h40
-rw-r--r--kutils/kcmoduleloader.cpp78
-rw-r--r--kutils/kcmoduleloader.h32
-rw-r--r--kutils/kcmoduleproxy.cpp152
-rw-r--r--kutils/kcmoduleproxy.h38
-rw-r--r--kutils/kcmoduleproxyIface.h4
-rw-r--r--kutils/kcmoduleproxyIfaceImpl.cpp32
-rw-r--r--kutils/kcmoduleproxyIfaceImpl.h12
-rw-r--r--kutils/kcmultidialog.cpp78
-rw-r--r--kutils/kcmultidialog.h24
-rw-r--r--kutils/kfind.cpp88
-rw-r--r--kutils/kfind.h46
-rw-r--r--kutils/kfinddialog.cpp154
-rw-r--r--kutils/kfinddialog.h74
-rw-r--r--kutils/kmultitabbar.cpp244
-rw-r--r--kutils/kmultitabbar.h64
-rw-r--r--kutils/kmultitabbar_p.h24
-rw-r--r--kutils/kplugininfo.cpp86
-rw-r--r--kutils/kplugininfo.h52
-rw-r--r--kutils/kpluginselector.cpp242
-rw-r--r--kutils/kpluginselector.h30
-rw-r--r--kutils/kpluginselector_p.h28
-rw-r--r--kutils/kreplace.cpp44
-rw-r--r--kutils/kreplace.h26
-rw-r--r--kutils/kreplacedialog.cpp38
-rw-r--r--kutils/kreplacedialog.h22
-rw-r--r--kutils/ksettings/componentsdialog.cpp72
-rw-r--r--kutils/ksettings/componentsdialog.h8
-rw-r--r--kutils/ksettings/dialog.cpp134
-rw-r--r--kutils/ksettings/dialog.h32
-rw-r--r--kutils/ksettings/dispatcher.cpp36
-rw-r--r--kutils/ksettings/dispatcher.h28
-rw-r--r--kutils/ksettings/pluginpage.cpp18
-rw-r--r--kutils/ksettings/pluginpage.h8
-rw-r--r--kutils/tests/kfindtest.cpp40
-rw-r--r--kutils/tests/kfindtest.h22
-rw-r--r--kutils/tests/kreplacetest.cpp64
-rw-r--r--kutils/tests/kreplacetest.h20
41 files changed, 1175 insertions, 1175 deletions
diff --git a/kutils/kcmodulecontainer.cpp b/kutils/kcmodulecontainer.cpp
index 000189e0d..e75ecc3cf 100644
--- a/kutils/kcmodulecontainer.cpp
+++ b/kutils/kcmodulecontainer.cpp
@@ -17,12 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
-#include <qtabwidget.h>
-#include <qtooltip.h>
-#include <qvaluelist.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
+#include <tqtabwidget.h>
+#include <tqtooltip.h>
+#include <tqvaluelist.h>
#include <kcmodule.h>
#include <kcmoduleinfo.h>
@@ -43,7 +43,7 @@
class KCModuleContainer::KCModuleContainerPrivate
{
public:
- KCModuleContainerPrivate( const QStringList& mods )
+ KCModuleContainerPrivate( const TQStringList& mods )
: modules( mods )
, tabWidget( 0 )
, buttons( 0 )
@@ -53,13 +53,13 @@ class KCModuleContainer::KCModuleContainerPrivate
, topLayout( 0 )
{}
- QStringList modules;
- QTabWidget *tabWidget;
+ TQStringList modules;
+ TQTabWidget *tabWidget;
int buttons;
bool hasRootKCM: 1;
KPushButton *btnRootMode;
- QHBoxLayout *btnLayout;
- QVBoxLayout *topLayout;
+ TQHBoxLayout *btnLayout;
+ TQVBoxLayout *topLayout;
};
@@ -70,16 +70,16 @@ class KCModuleContainer::KCModuleContainerPrivate
/***********************************************************************/
-KCModuleContainer::KCModuleContainer( QWidget* parent, const char* name,
- const QString& mods )
+KCModuleContainer::KCModuleContainer( TQWidget* parent, const char* name,
+ const TQString& mods )
: KCModule( parent, name )
{
- d = new KCModuleContainerPrivate( QStringList::split( ",", QString(mods).remove( " " )) );
+ d = new KCModuleContainerPrivate( TQStringList::split( ",", TQString(mods).remove( " " )) );
init();
}
-KCModuleContainer::KCModuleContainer( QWidget* parent, const char* name,
- const QStringList& mods )
+KCModuleContainer::KCModuleContainer( TQWidget* parent, const char* name,
+ const TQStringList& mods )
: KCModule( parent, name ), d( new KCModuleContainerPrivate( mods ) )
{
init();
@@ -87,16 +87,16 @@ KCModuleContainer::KCModuleContainer( QWidget* parent, const char* name,
void KCModuleContainer::init()
{
- d->topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint(), "topLayout" );
- d->tabWidget = new QTabWidget(this, "tabWidget");
+ d->topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint(), "topLayout" );
+ d->tabWidget = new TQTabWidget(this, "tabWidget");
d->tabWidget->setMargin(KDialog::marginHint());
- connect( d->tabWidget, SIGNAL( currentChanged( QWidget* ) ), SLOT( tabSwitched( QWidget* ) ));
+ connect( d->tabWidget, TQT_SIGNAL( currentChanged( TQWidget* ) ), TQT_SLOT( tabSwitched( TQWidget* ) ));
d->topLayout->addWidget( d->tabWidget );
if ( !d->modules.isEmpty() )
{
/* Add our modules */
- for ( QStringList::Iterator it = d->modules.begin(); it != d->modules.end(); ++it )
+ for ( TQStringList::Iterator it = d->modules.begin(); it != d->modules.end(); ++it )
addModule( (*it) );
finalize();
@@ -111,7 +111,7 @@ void KCModuleContainer::finalize()
{
if(!d->btnLayout) /* It could already be added */
{
- d->btnLayout = new QHBoxLayout(this, 0, 0, "btnLayout");
+ d->btnLayout = new TQHBoxLayout(this, 0, 0, "btnLayout");
d->btnRootMode = new KPushButton(KStdGuiItem::adminMode(), this, "btnRootMode");
d->btnLayout->addWidget( d->btnRootMode );
@@ -121,7 +121,7 @@ void KCModuleContainer::finalize()
}
}
-void KCModuleContainer::addModule( const QString& module )
+void KCModuleContainer::addModule( const TQString& module )
{
/* In case it doesn't exist we just silently drop it.
* This allows people to easily extend containers.
@@ -140,14 +140,14 @@ void KCModuleContainer::addModule( const QString& module )
KCModuleProxy* proxy = new KCModuleProxy( module, false, d->tabWidget, module.latin1());
allModules.append( proxy );
- d->tabWidget->addTab( proxy, QIconSet(KGlobal::iconLoader()->loadIcon(
+ d->tabWidget->addTab( proxy, TQIconSet(KGlobal::iconLoader()->loadIcon(
proxy->moduleInfo().icon(), KIcon::Desktop)),
/* QT eats ampersands for dinner. But not this time. */
proxy->moduleInfo().moduleName().replace( "&", "&&" ));
d->tabWidget->setTabToolTip( proxy, proxy->moduleInfo().comment() );
- connect( proxy, SIGNAL(changed(KCModuleProxy *)), SLOT(moduleChanged(KCModuleProxy *)));
+ connect( proxy, TQT_SIGNAL(changed(KCModuleProxy *)), TQT_SLOT(moduleChanged(KCModuleProxy *)));
/* Collect our buttons - we go for the common deliminator */
d->buttons = d->buttons | proxy->realModule()->buttons();
@@ -159,7 +159,7 @@ void KCModuleContainer::addModule( const QString& module )
}
-void KCModuleContainer::tabSwitched( QWidget * module )
+void KCModuleContainer::tabSwitched( TQWidget * module )
{
if ( !d->hasRootKCM )
return;
@@ -173,10 +173,10 @@ void KCModuleContainer::tabSwitched( QWidget * module )
if ( mod->moduleInfo().needsRootPrivileges() && !mod->rootMode() )
{
d->btnRootMode->setEnabled( true );
- connect( d->btnRootMode, SIGNAL( clicked() ),
- SLOT( runAsRoot() ));
- connect( mod, SIGNAL( childClosed() ),
- SLOT ( rootExited() ));
+ connect( d->btnRootMode, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( runAsRoot() ));
+ connect( mod, TQT_SIGNAL( childClosed() ),
+ TQT_SLOT ( rootExited() ));
}
else
d->btnRootMode->setEnabled( false );
@@ -195,7 +195,7 @@ void KCModuleContainer::runAsRoot()
void KCModuleContainer::rootExited()
{
- connect( d->btnRootMode, SIGNAL( clicked() ), SLOT( runAsRoot() ));
+ connect( d->btnRootMode, TQT_SIGNAL( clicked() ), TQT_SLOT( runAsRoot() ));
d->btnRootMode->setEnabled( true );
}
diff --git a/kutils/kcmodulecontainer.h b/kutils/kcmodulecontainer.h
index 6b23a16c9..38318da92 100644
--- a/kutils/kcmodulecontainer.h
+++ b/kutils/kcmodulecontainer.h
@@ -20,9 +20,9 @@
#ifndef KCMODULECONTAINER_H
#define KCMODULECONTAINER_H
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kcmodule.h>
#include <kcmoduleloader.h>
@@ -58,20 +58,20 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
* Creates a KCModuleContainer with tabs, each one containing one of the
* specified modules in @p mods.
*
- * @param parent the parent QWidget.
+ * @param parent the parent TQWidget.
* @param name the module's name.
* @param mods The list of KCModules to be loaded. The name of each
* KCModule is its service name, that is the name of the desktop file without
* the ".desktop" part
*
*/
- KCModuleContainer( QWidget* parent, const char* name, const QStringList& mods );
+ KCModuleContainer( TQWidget* parent, const char* name, const TQStringList& mods );
/**
- * This is a convenience function, instead of building a QStringList you
- * can specify the modules in a comma separated QString. For example;
+ * This is a convenience function, instead of building a TQStringList you
+ * can specify the modules in a comma separated TQString. For example;
* \code
- * KCModuleContainer* cont = KCModuleContainer( this, "kcm_misc", QString("kcm_energy, kcm_keyboard ,kcm_useraccount, kcm_mouse") );
+ * KCModuleContainer* cont = KCModuleContainer( this, "kcm_misc", TQString("kcm_energy, kcm_keyboard ,kcm_useraccount, kcm_mouse") );
* \endcode
* The other constructor takes its modules in a QStringlist which also can be constructed from a
* string and thus you will have to be explicit on the data type.
@@ -84,7 +84,7 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
* @param mods The modules to load
* @return The KCModule containing the requested modules.
*/
- KCModuleContainer( QWidget *parent, const char* name, const QString& mods = QString() );
+ KCModuleContainer( TQWidget *parent, const char* name, const TQString& mods = TQString() );
/**
* Adds the specified module to the tab widget. Setting the tab icon, text,
@@ -93,7 +93,7 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
* @param module the name of the module to add. The name is the desktop file's name
* without the ".desktop" part.
*/
- void addModule( const QString& module );
+ void addModule( const TQString& module );
/**
* Default destructor.
@@ -128,7 +128,7 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
*/
void finalize();
- typedef QValueList<KCModuleProxy*> ModuleList;
+ typedef TQValueList<KCModuleProxy*> ModuleList;
/**
* A list containing KCModuleProxy objects which
@@ -146,7 +146,7 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
/**
* Enables/disables the Admin Mode button, as appropriate.
*/
- void tabSwitched( QWidget * module );
+ void tabSwitched( TQWidget * module );
void moduleChanged(KCModuleProxy *proxy);
@@ -188,15 +188,15 @@ class KUTILS_EXPORT KCModuleContainer : public KCModule
#define KCMODULECONTAINER( modules, factoryName ) \
extern "C" \
{ \
- KCModule *create_## factoryName(QWidget *parent, const char *name) \
+ KCModule *create_## factoryName(TQWidget *parent, const char *name) \
{ \
- return new KCModuleContainer( parent, name, QString( modules ) ); \
+ return new KCModuleContainer( parent, name, TQString( modules ) ); \
} \
\
bool test_## factoryName() \
{ \
- QStringList modList = QStringList::split( ",", QString(modules).remove( " " )); \
- for ( QStringList::Iterator it = modList.begin(); it != modList.end(); ++it ) \
+ TQStringList modList = TQStringList::split( ",", TQString(modules).remove( " " )); \
+ for ( TQStringList::Iterator it = modList.begin(); it != modList.end(); ++it ) \
if ( KCModuleLoader::testModule( *it ) ) \
return true; \
return false; \
diff --git a/kutils/kcmoduleinfo.cpp b/kutils/kcmoduleinfo.cpp
index 2de4142d4..fe2545a39 100644
--- a/kutils/kcmoduleinfo.cpp
+++ b/kutils/kcmoduleinfo.cpp
@@ -21,7 +21,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qvariant.h>
+#include <tqvariant.h>
#include <kdesktopfile.h>
#include <kdebug.h>
@@ -40,7 +40,7 @@ class KCModuleInfo::KCModuleInfoPrivate
~KCModuleInfoPrivate()
{ }
- QString factoryName;
+ TQString factoryName;
bool testModule;
};
@@ -51,7 +51,7 @@ KCModuleInfo::KCModuleInfo()
d = new KCModuleInfoPrivate;
}
-KCModuleInfo::KCModuleInfo(const QString& desktopFile)
+KCModuleInfo::KCModuleInfo(const TQString& desktopFile)
{
KService::Ptr service = KService::serviceByStorageId(desktopFile);
if(!service) setName(desktopFile);
@@ -92,11 +92,11 @@ KCModuleInfo &KCModuleInfo::operator=( const KCModuleInfo &rhs )
return *this;
}
-QString KCModuleInfo::factoryName() const
+TQString KCModuleInfo::factoryName() const
{
if( d->factoryName.isEmpty() )
{
- d->factoryName = _service->property("X-KDE-FactoryName", QVariant::String).toString();
+ d->factoryName = _service->property("X-KDE-FactoryName", TQVariant::String).toString();
if ( d->factoryName.isEmpty() )
d->factoryName = library();
}
@@ -155,27 +155,27 @@ KCModuleInfo::loadAll()
_allLoaded = true;
// library and factory
- setHandle(_service->property("X-KDE-FactoryName", QVariant::String).toString());
+ setHandle(_service->property("X-KDE-FactoryName", TQVariant::String).toString());
- QVariant tmp;
+ TQVariant tmp;
// read weight
- tmp = _service->property( "X-KDE-Weight", QVariant::Int );
+ tmp = _service->property( "X-KDE-Weight", TQVariant::Int );
setWeight( tmp.isValid() ? tmp.toInt() : 100 );
// does the module need super user privileges?
- tmp = _service->property( "X-KDE-RootOnly", QVariant::Bool );
+ tmp = _service->property( "X-KDE-RootOnly", TQVariant::Bool );
setNeedsRootPrivileges( tmp.isValid() ? tmp.toBool() : false );
// does the module need to be shown to root only?
// Deprecated ! KDE 4
- tmp = _service->property( "X-KDE-IsHiddenByDefault", QVariant::Bool );
+ tmp = _service->property( "X-KDE-IsHiddenByDefault", TQVariant::Bool );
setIsHiddenByDefault( tmp.isValid() ? tmp.toBool() : false );
// get the documentation path
- setDocPath( _service->property( "DocPath", QVariant::String ).toString() );
+ setDocPath( _service->property( "DocPath", TQVariant::String ).toString() );
- tmp = _service->property( "X-KDE-Test-Module", QVariant::Bool );
+ tmp = _service->property( "X-KDE-Test-Module", TQVariant::Bool );
setNeedsTest( tmp.isValid() ? tmp.asBool() : false );
}
diff --git a/kutils/kcmoduleinfo.h b/kutils/kcmoduleinfo.h
index 7ccaceb94..96b6e7c4a 100644
--- a/kutils/kcmoduleinfo.h
+++ b/kutils/kcmoduleinfo.h
@@ -58,7 +58,7 @@ public:
* @param desktopFile the desktop file representing the module, or
* the name of the module.
*/
- KCModuleInfo(const QString& desktopFile);
+ KCModuleInfo(const TQString& desktopFile);
/**
* Same as above but takes a KService::Ptr as argument.
@@ -110,12 +110,12 @@ public:
/**
* @return the filename of the .desktop file that describes the KCM
*/
- QString fileName() const { return _fileName; }
+ TQString fileName() const { return _fileName; }
/**
* @return the keywords associated with this KCM.
*/
- const QStringList &keywords() const { return _keywords; }
+ const TQStringList &keywords() const { return _keywords; }
/**
* Returns the module's factory name, if it's set. If not, the library
@@ -123,13 +123,13 @@ public:
* @returns the module's factory name
* @since 3.4
*/
- QString factoryName() const;
+ TQString factoryName() const;
/**
* @return the module\'s (translated) name
*/
- QString moduleName() const { return _name; }
- // changed from name() to avoid ambiguity with QObject::name() on multiple inheritance
+ TQString moduleName() const { return _name; }
+ // changed from name() to avoid ambiguity with TQObject::name() on multiple inheritance
/**
* @return a KSharedPtr to KService created from the modules .desktop file
@@ -139,27 +139,27 @@ public:
/**
* @return the module's (translated) comment field
*/
- QString comment() const { return _comment; }
+ TQString comment() const { return _comment; }
/**
* @return the module's icon name
*/
- QString icon() const { return _icon; }
+ TQString icon() const { return _icon; }
/**
* @return the path of the module's documentation
*/
- QString docPath() const;
+ TQString docPath() const;
/**
* @return the library name
*/
- QString library() const { return _lib; }
+ TQString library() const { return _lib; }
/**
* @return a handle (usually the contents of the FactoryName field)
*/
- QString handle() const;
+ TQString handle() const;
/**
* @return the weight of the module which determines the order of the pages in
@@ -193,37 +193,37 @@ protected:
* Sets the object's keywords.
* @param keyword the new keywords
*/
- void setKeywords(const QStringList &keyword) { _keywords = keyword; }
+ void setKeywords(const TQStringList &keyword) { _keywords = keyword; }
/**
* Sets the object's name.
* @param name the new name
*/
- void setName(const QString &name) { _name = name; }
+ void setName(const TQString &name) { _name = name; }
/**
* Sets the object's name.
* @param comment the new comment
*/
- void setComment(const QString &comment) { _comment = comment; }
+ void setComment(const TQString &comment) { _comment = comment; }
/**
* Sets the object's icon.
* @param icon the name of the new icon
*/
- void setIcon(const QString &icon) { _icon = icon; }
+ void setIcon(const TQString &icon) { _icon = icon; }
/**
* Set the object's library
* @param lib the name of the new library without any extensions or prefixs.
*/
- void setLibrary(const QString &lib) { _lib = lib; }
+ void setLibrary(const TQString &lib) { _lib = lib; }
/**
* Sets the factory name
* @param handle The new factory name
*/
- void setHandle(const QString &handle) { _handle = handle; }
+ void setHandle(const TQString &handle) { _handle = handle; }
/**
* Sets the object's weight property which determines in what
@@ -259,7 +259,7 @@ protected:
* Sets the object's documentation path
* @param p the new documentation path
*/
- void setDocPath(const QString &p) { _doc = p; }
+ void setDocPath(const TQString &p) { _doc = p; }
/**
* Reads the service entries specific for KCModule from the desktop file.
@@ -277,8 +277,8 @@ private:
private:
// KDE4 These needs to be moved to KCModuleInfoPrivate
- QStringList _keywords;
- QString _name, _icon, _lib, _handle, _fileName, _doc, _comment;
+ TQStringList _keywords;
+ TQString _name, _icon, _lib, _handle, _fileName, _doc, _comment;
bool _needsRootPrivileges : 1;
bool _isHiddenByDefault : 1;
bool _allLoaded : 1;
diff --git a/kutils/kcmoduleloader.cpp b/kutils/kcmoduleloader.cpp
index 0cc06d25f..de1843b7c 100644
--- a/kutils/kcmoduleloader.cpp
+++ b/kutils/kcmoduleloader.cpp
@@ -21,9 +21,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -42,12 +42,12 @@
class KCMError : public KCModule
{
public:
- KCMError( const QString& msg, const QString& details, QWidget* parent )
+ KCMError( const TQString& msg, const TQString& details, TQWidget* parent )
: KCModule( parent, "KCMError" )
{
- QVBoxLayout* topLayout = new QVBoxLayout( this );
- topLayout->addWidget( new QLabel( msg, this ) );
- topLayout->addWidget( new QLabel( details, this ) );
+ TQVBoxLayout* topLayout = new TQVBoxLayout( this );
+ topLayout->addWidget( new TQLabel( msg, this ) );
+ topLayout->addWidget( new TQLabel( details, this ) );
}
};
/***************************************************************/
@@ -55,19 +55,19 @@ class KCMError : public KCModule
-KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const QString &libname,
- KLibLoader *loader, ErrorReporting report, QWidget * parent,
- const char * name, const QStringList & args )
+KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const TQString &libname,
+ KLibLoader *loader, ErrorReporting report, TQWidget * parent,
+ const char * name, const TQStringList & args )
{
// attempt to load modules with ComponentFactory, only if the symbol init_<lib> exists
// (this is because some modules, e.g. kcmkio with multiple modules in the library,
// cannot be ported to KGenericFactory)
- KLibrary *lib = loader->library(QFile::encodeName(libname.arg(mod.library())));
+ KLibrary *lib = loader->library(TQFile::encodeName(libname.arg(mod.library())));
if (lib) {
- QString initSym("init_");
+ TQString initSym("init_");
initSym += libname.arg(mod.library());
- if ( lib->hasSymbol(QFile::encodeName(initSym)) )
+ if ( lib->hasSymbol(TQFile::encodeName(initSym)) )
{
KLibFactory *factory = lib->factory();
if ( factory )
@@ -81,19 +81,19 @@ KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const QString &libname,
}
// get the create_ function
- QString factory("create_%1");
- void *create = lib->symbol(QFile::encodeName(factory.arg(mod.handle())));
+ TQString factory("create_%1");
+ void *create = lib->symbol(TQFile::encodeName(factory.arg(mod.handle())));
if (create)
{
// create the module
- KCModule* (*func)(QWidget *, const char *);
- func = (KCModule* (*)(QWidget *, const char *)) create;
+ KCModule* (*func)(TQWidget *, const char *);
+ func = (KCModule* (*)(TQWidget *, const char *)) create;
return func( parent, name ? name : mod.handle().latin1() );
}
else
{
- QString libFileName = lib->fileName();
+ TQString libFileName = lib->fileName();
lib->unload();
return reportError( report, i18n("<qt>There was an error when loading the module '%1'.<br><br>"
"The desktop file (%2) as well as the library (%3) was found but "
@@ -103,22 +103,22 @@ KCModule* KCModuleLoader::load(const KCModuleInfo &mod, const QString &libname,
.arg( mod.moduleName() )
.arg( mod.fileName() )
.arg( libFileName ),
- QString::null, parent );
+ TQString::null, parent );
}
lib->unload();
}
return reportError( report, i18n("The specified library %1 could not be found.")
- .arg( mod.library() ), QString::null, parent );
+ .arg( mod.library() ), TQString::null, parent );
return 0;
}
-KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, bool withfallback, QWidget * parent, const char * name, const QStringList & args )
+KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args )
{
return loadModule( mod, None, withfallback, parent, name, args );
}
-KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting report, bool withfallback, QWidget * parent, const char * name, const QStringList & args )
+KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting report, bool withfallback, TQWidget * parent, const char * name, const TQStringList & args )
{
/*
* Simple libraries as modules are the easiest case:
@@ -158,13 +158,13 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting rep
* Only try to load libkcm_* if it exists, otherwise KLibLoader::lastErrorMessage would say
* "libkcm_foo not found" instead of the real problem with loading kcm_foo.
*/
- if (!KLibLoader::findLibrary( QCString( "libkcm_" ) + QFile::encodeName( mod.library() ) ).isEmpty() )
+ if (!KLibLoader::findLibrary( TQCString( "libkcm_" ) + TQFile::encodeName( mod.library() ) ).isEmpty() )
module = load(mod, "libkcm_%1", loader, report, parent, name, args );
if (module)
return module;
return reportError( report,
i18n("The module %1 could not be loaded.")
- .arg( mod.moduleName() ), QString::null, parent );
+ .arg( mod.moduleName() ), TQString::null, parent );
}
/*
@@ -177,7 +177,7 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting rep
*/
if(withfallback)
{
- KApplication::startServiceByDesktopPath(mod.fileName(), QString::null);
+ KApplication::startServiceByDesktopPath(mod.fileName(), TQString::null);
}
else
{
@@ -189,14 +189,14 @@ KCModule* KCModuleLoader::loadModule(const KCModuleInfo &mod, ErrorReporting rep
return 0;
}
-KCModule* KCModuleLoader::loadModule(const QString &module, QWidget *parent,
- const char *name, const QStringList & args)
+KCModule* KCModuleLoader::loadModule(const TQString &module, TQWidget *parent,
+ const char *name, const TQStringList & args)
{
return loadModule(KCModuleInfo(module), None, false, parent, name, args);
}
-KCModule* KCModuleLoader::loadModule(const QString &module, ErrorReporting
- report, QWidget *parent, const char *name, const QStringList & args)
+KCModule* KCModuleLoader::loadModule(const TQString &module, ErrorReporting
+ report, TQWidget *parent, const char *name, const TQStringList & args)
{
return loadModule(KCModuleInfo(module), report, false, parent, name, args);
}
@@ -207,14 +207,14 @@ void KCModuleLoader::unloadModule(const KCModuleInfo &mod)
KLibLoader *loader = KLibLoader::self();
// try to unload the library
- QString libname("libkcm_%1");
- loader->unloadLibrary(QFile::encodeName(libname.arg(mod.library())));
+ TQString libname("libkcm_%1");
+ loader->unloadLibrary(TQFile::encodeName(libname.arg(mod.library())));
libname = "kcm_%1";
- loader->unloadLibrary(QFile::encodeName(libname.arg(mod.library())));
+ loader->unloadLibrary(TQFile::encodeName(libname.arg(mod.library())));
}
-void KCModuleLoader::showLastLoaderError(QWidget *parent)
+void KCModuleLoader::showLastLoaderError(TQWidget *parent)
{
KMessageBox::detailedError(parent,
i18n("There was an error loading the module."),i18n("<qt><p>The diagnostics is:<br>%1"
@@ -227,7 +227,7 @@ void KCModuleLoader::showLastLoaderError(QWidget *parent)
}
-bool KCModuleLoader::testModule( const QString& module )
+bool KCModuleLoader::testModule( const TQString& module )
{
return testModule( KCModuleInfo( module ) );
}
@@ -240,7 +240,7 @@ bool KCModuleLoader::testModule( const KCModuleInfo& module )
return true;
}
- bool doLoad = module.service()->property( "X-KDE-Test-Module", QVariant::Bool ).toBool();
+ bool doLoad = module.service()->property( "X-KDE-Test-Module", TQVariant::Bool ).toBool();
if( !doLoad )
{
return true;
@@ -254,10 +254,10 @@ bool KCModuleLoader::testModule( const KCModuleInfo& module )
* a corresponding KCMError.
* */
KLibLoader* loader = KLibLoader::self();
- KLibrary* library = loader->library( QFile::encodeName((QString("kcm_%1").arg(module.library()))) );
+ KLibrary* library = loader->library( TQFile::encodeName((TQString("kcm_%1").arg(module.library()))) );
if( library )
{
- void *test_func = library->symbol( QString("test_%1").arg(module.factoryName()).utf8() );
+ void *test_func = library->symbol( TQString("test_%1").arg(module.factoryName()).utf8() );
if( test_func )
{
bool (*func)() = (bool(*)())test_func;
@@ -281,8 +281,8 @@ bool KCModuleLoader::testModule( const KCModuleInfo& module )
}
}
-KCModule* KCModuleLoader::reportError( ErrorReporting report, const QString & text,
- QString details, QWidget * parent )
+KCModule* KCModuleLoader::reportError( ErrorReporting report, const TQString & text,
+ TQString details, TQWidget * parent )
{
if( details.isNull() )
details = i18n("<qt><p>The diagnostics is:<br>%1"
diff --git a/kutils/kcmoduleloader.h b/kutils/kcmoduleloader.h
index 8aa6aac69..efd4a5b50 100644
--- a/kutils/kcmoduleloader.h
+++ b/kutils/kcmoduleloader.h
@@ -61,8 +61,8 @@ class KUTILS_EXPORT KCModuleLoader
* method
*/
static KCModule *loadModule(const KCModuleInfo &module, bool withFallback=true,
- QWidget * parent = 0, const char * name = 0,
- const QStringList & args = QStringList() ) KDE_DEPRECATED;
+ TQWidget * parent = 0, const char * name = 0,
+ const TQStringList & args = TQStringList() ) KDE_DEPRECATED;
/**
* Loads a @ref KCModule. If loading fails a zero pointer is returned.
@@ -75,8 +75,8 @@ class KUTILS_EXPORT KCModuleLoader
* @deprecated use the function which explicitly states the error reporting
* method
*/
- static KCModule *loadModule(const QString &module, QWidget *parent = 0,
- const char *name = 0, const QStringList & args = QStringList()) KDE_DEPRECATED;
+ static KCModule *loadModule(const TQString &module, TQWidget *parent = 0,
+ const char *name = 0, const TQStringList & args = TQStringList()) KDE_DEPRECATED;
/**
* Determines the way errors are reported
@@ -115,8 +115,8 @@ class KUTILS_EXPORT KCModuleLoader
* @since 3.4
*/
static KCModule *loadModule(const KCModuleInfo &module, ErrorReporting
- report, bool withFallback=true, QWidget * parent = 0,
- const char * name = 0, const QStringList & args = QStringList() );
+ report, bool withFallback=true, TQWidget * parent = 0,
+ const char * name = 0, const TQStringList & args = TQStringList() );
/**
* Loads a @ref KCModule. If loading fails a zero pointer is returned.
@@ -130,9 +130,9 @@ class KUTILS_EXPORT KCModuleLoader
* @return a pointer to the loaded @ref KCModule
* @since 3.4
*/
- static KCModule *loadModule(const QString &module, ErrorReporting
- report, QWidget *parent = 0, const char *name = 0,
- const QStringList & args = QStringList());
+ static KCModule *loadModule(const TQString &module, ErrorReporting
+ report, TQWidget *parent = 0, const char *name = 0,
+ const TQStringList & args = TQStringList());
/**
* Unloads the module's library
@@ -147,7 +147,7 @@ class KUTILS_EXPORT KCModuleLoader
* @deprecated Use a constructor with ErrorReporting set to Dialog to show a
* message box like this function did.
*/
- static void showLastLoaderError(QWidget *parent) KDE_DEPRECATED;
+ static void showLastLoaderError(TQWidget *parent) KDE_DEPRECATED;
/**
@@ -178,7 +178,7 @@ class KUTILS_EXPORT KCModuleLoader
* @returns true if the module should be loaded
* @since 3.4
*/
- static bool testModule( const QString& module );
+ static bool testModule( const TQString& module );
/**
* Convenience function, essentially the same as above.
@@ -200,8 +200,8 @@ class KUTILS_EXPORT KCModuleLoader
* @since 3.4
* @internal
*/
- static KCModule* reportError( ErrorReporting report, const QString & text,
- QString details, QWidget * parent );
+ static KCModule* reportError( ErrorReporting report, const TQString & text,
+ TQString details, TQWidget * parent );
private:
@@ -209,9 +209,9 @@ class KUTILS_EXPORT KCModuleLoader
* Internal loader called by the public loaders.
* @internal
*/
- static KCModule* load(const KCModuleInfo &mod, const QString &libname,
- KLibLoader *loader, ErrorReporting report, QWidget * parent = 0,
- const char * name = 0, const QStringList & args = QStringList() );
+ static KCModule* load(const KCModuleInfo &mod, const TQString &libname,
+ KLibLoader *loader, ErrorReporting report, TQWidget * parent = 0,
+ const char * name = 0, const TQStringList & args = TQStringList() );
};
diff --git a/kutils/kcmoduleproxy.cpp b/kutils/kcmoduleproxy.cpp
index 3822db841..9fd95f40f 100644
--- a/kutils/kcmoduleproxy.cpp
+++ b/kutils/kcmoduleproxy.cpp
@@ -17,20 +17,20 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qdatastream.h>
-#include <qevent.h>
-#include <qfileinfo.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpoint.h>
-#include <qscrollview.h>
-#include <qtextstream.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqdatastream.h>
+#include <tqevent.h>
+#include <tqfileinfo.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpoint.h>
+#include <tqscrollview.h>
+#include <tqtextstream.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
#include <dcopclient.h>
#include <qxembed.h>
@@ -97,7 +97,7 @@ class KCModuleProxy::KCModuleProxyPrivate
QVBox *embedFrame;
KCModuleProxyIfaceImpl *dcopObject;
DCOPClient *dcopClient;
- QVBoxLayout *topLayout; /* Contains QScrollView view, and root stuff */
+ QVBoxLayout *topLayout; /* Contains TQScrollView view, and root stuff */
KCModuleProxyRootCommunicatorImpl *rootCommunicator;
QLabel *rootInfo;
QCString dcopName;
@@ -155,14 +155,14 @@ KCModule * KCModuleProxy::realModule() const
if( d->rootMode )
return 0;
- QApplication::setOverrideCursor( Qt::WaitCursor );
+ TQApplication::setOverrideCursor( Qt::WaitCursor );
KCModuleProxy * that = const_cast<KCModuleProxy*>( this );
if( !d->isInitialized )
{
d->dcopName = moduleInfo().handle().prepend("KCModuleProxy-").utf8();
- d->topLayout = new QVBoxLayout( that, 0, 0, "topLayout" );
+ d->topLayout = new TQVBoxLayout( that, 0, 0, "topLayout" );
d->isInitialized = true;
}
@@ -185,13 +185,13 @@ KCModule * KCModuleProxy::realModule() const
d->kcm = KCModuleLoader::loadModule( moduleInfo(), KCModuleLoader::Inline, d->withFallback,
that, name(), d->args );
- connect( d->kcm, SIGNAL( changed( bool ) ),
- SLOT(moduleChanged(bool)) );
- connect( d->kcm, SIGNAL( destroyed() ),
- SLOT( moduleDestroyed() ) );
- connect( d->kcm, SIGNAL(quickHelpChanged()),
- SIGNAL(quickHelpChanged()));
- QWhatsThis::add( that, d->kcm->quickHelp() );
+ connect( d->kcm, TQT_SIGNAL( changed( bool ) ),
+ TQT_SLOT(moduleChanged(bool)) );
+ connect( d->kcm, TQT_SIGNAL( destroyed() ),
+ TQT_SLOT( moduleDestroyed() ) );
+ connect( d->kcm, TQT_SIGNAL(quickHelpChanged()),
+ TQT_SIGNAL(quickHelpChanged()));
+ TQWhatsThis::add( that, d->kcm->quickHelp() );
d->topLayout->addWidget( d->kcm );
@@ -200,13 +200,13 @@ KCModule * KCModuleProxy::realModule() const
!KUser().isSuperUser() ) /* Not necessary if we're root */
{
- d->rootInfo = new QLabel( that, "rootInfo" );
+ d->rootInfo = new TQLabel( that, "rootInfo" );
d->topLayout->insertWidget( 0, d->rootInfo );
- d->rootInfo->setFrameShape(QFrame::Box);
- d->rootInfo->setFrameShadow(QFrame::Raised);
+ d->rootInfo->setFrameShape(TQFrame::Box);
+ d->rootInfo->setFrameShadow(TQFrame::Raised);
- const QString msg = d->kcm->rootOnlyMsg();
+ const TQString msg = d->kcm->rootOnlyMsg();
if( msg.isEmpty() )
d->rootInfo->setText(i18n(
"<b>Changes in this section requires root access.</b><br />"
@@ -215,7 +215,7 @@ KCModule * KCModuleProxy::realModule() const
else
d->rootInfo->setText(msg);
- QWhatsThis::add( d->rootInfo, i18n(
+ TQWhatsThis::add( d->rootInfo, i18n(
"This section requires special permissions, probably "
"for system-wide changes; therefore, it is "
"required that you provide the root password to be "
@@ -233,14 +233,14 @@ KCModule * KCModuleProxy::realModule() const
d->dcopClient->attach();
d->dcopClient->setNotifications( true );
- connect( d->dcopClient, SIGNAL( applicationRemoved( const QCString& )),
- SLOT( applicationRemoved( const QCString& )));
+ connect( d->dcopClient, TQT_SIGNAL( applicationRemoved( const TQCString& )),
+ TQT_SLOT( applicationRemoved( const TQCString& )));
/* Figure out the name of where the module is already loaded */
- QByteArray replyData, data;
- QCString replyType;
- QString result;
- QDataStream arg, stream( replyData, IO_ReadOnly );
+ TQByteArray replyData, data;
+ TQCString replyType;
+ TQString result;
+ TQDataStream arg, stream( replyData, IO_ReadOnly );
if( d->dcopClient->call( d->dcopName, d->dcopName, "applicationName()",
data, replyType, replyData ))
@@ -257,17 +257,17 @@ KCModule * KCModuleProxy::realModule() const
{
kdDebug(711) << "Calling KCModuleProxy's DCOP interface for fetching the name failed." << endl;
d->bogusOccupier = true;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return realModule();
}
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return d->kcm;
}
-void KCModuleProxy::applicationRemoved( const QCString& app )
+void KCModuleProxy::applicationRemoved( const TQCString& app )
{
if( app == d->dcopName )
{
@@ -281,7 +281,7 @@ void KCModuleProxy::applicationRemoved( const QCString& app )
}
}
-void KCModuleProxy::showEvent( QShowEvent * ev )
+void KCModuleProxy::showEvent( TQShowEvent * ev )
{
kdDebug(711) << k_funcinfo << endl;
@@ -291,7 +291,7 @@ void KCModuleProxy::showEvent( QShowEvent * ev )
if( d->kcm )
d->kcm->show();
- QWidget::showEvent( ev );
+ TQWidget::showEvent( ev );
}
@@ -300,17 +300,17 @@ void KCModuleProxy::runAsRoot()
if ( !moduleInfo().needsRootPrivileges() )
return;
- QApplication::setOverrideCursor( Qt::WaitCursor );
+ TQApplication::setOverrideCursor( Qt::WaitCursor );
delete d->rootProcess;
delete d->embedWidget;
delete d->embedFrame;
- d->embedFrame = new QVBox( this, "embedFrame" );
- d->embedFrame->setFrameStyle( QFrame::Box | QFrame::Raised );
+ d->embedFrame = new TQVBox( this, "embedFrame" );
+ d->embedFrame->setFrameStyle( TQFrame::Box | TQFrame::Raised );
- QPalette pal( red );
- pal.setColor( QColorGroup::Background,
+ TQPalette pal( red );
+ pal.setColor( TQColorGroup::Background,
colorGroup().background() );
d->embedFrame->setPalette( pal );
d->embedFrame->setLineWidth( 2 );
@@ -321,7 +321,7 @@ void KCModuleProxy::runAsRoot()
d->embedFrame->show();
- QLabel *lblBusy = new QLabel(i18n("<big>Loading...</big>"), d->embedWidget, "lblBusy" );
+ TQLabel *lblBusy = new TQLabel(i18n("<big>Loading...</big>"), d->embedWidget, "lblBusy" );
lblBusy->setTextFormat(RichText);
lblBusy->setAlignment(AlignCenter);
lblBusy->setGeometry(0,0, d->kcm->width(), d->kcm->height());
@@ -340,7 +340,7 @@ void KCModuleProxy::runAsRoot()
*/
/* Prepare the process to run the kcmshell */
- QString cmd = moduleInfo().service()->exec().stripWhiteSpace();
+ TQString cmd = moduleInfo().service()->exec().stripWhiteSpace();
if (cmd.left(5) == "kdesu")
{
cmd = cmd.remove(0,5).stripWhiteSpace();
@@ -354,19 +354,19 @@ void KCModuleProxy::runAsRoot()
cmd = cmd.remove(0,8).stripWhiteSpace();
/* Run the process */
- QString kdesu = KStandardDirs::findExe("kdesu");
+ TQString kdesu = KStandardDirs::findExe("kdesu");
if (!kdesu.isEmpty())
{
d->rootProcess = new KProcess;
*d->rootProcess << kdesu;
- *d->rootProcess << "--nonewdcop" << "-n" << "-d" << QString( "-i%1" ).arg(moduleInfo().icon());
+ *d->rootProcess << "--nonewdcop" << "-n" << "-d" << TQString( "-i%1" ).arg(moduleInfo().icon());
- *d->rootProcess << QString("%1 %2 --embed-proxy %3 --lang %4").arg(locate("exe", "kcmshell"))
+ *d->rootProcess << TQString("%1 %2 --embed-proxy %3 --lang %4").arg(locate("exe", "kcmshell"))
.arg(cmd).arg(d->embedWidget->winId()).arg(KGlobal::locale()->language());
- connect(d->rootProcess, SIGNAL(processExited(KProcess*)), SLOT(rootExited()));
+ connect(d->rootProcess, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(rootExited()));
if ( !d->rootProcess->start( KProcess::NotifyOnExit ))
{
@@ -381,7 +381,7 @@ void KCModuleProxy::runAsRoot()
}
delete lblBusy;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return;
}
@@ -391,7 +391,7 @@ void KCModuleProxy::runAsRoot()
delete d->embedFrame;
d->embedFrame = 0;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void KCModuleProxy::rootExited()
@@ -418,7 +418,7 @@ void KCModuleProxy::rootExited()
d->topLayout->invalidate();
- QShowEvent ev;
+ TQShowEvent ev;
showEvent( &ev );
moduleChanged( false );
@@ -471,8 +471,8 @@ void KCModuleProxy::moduleDestroyed()
}
KCModuleProxy::KCModuleProxy( const KService::Ptr & service, bool withFallback,
- QWidget * parent, const char * name, const QStringList & args)
- : QWidget( parent, name )
+ TQWidget * parent, const char * name, const TQStringList & args)
+ : TQWidget( parent, name )
{
init( KCModuleInfo( service ));
d->args = args;
@@ -480,18 +480,18 @@ KCModuleProxy::KCModuleProxy( const KService::Ptr & service, bool withFallback,
}
KCModuleProxy::KCModuleProxy( const KCModuleInfo & info, bool withFallback,
- QWidget * parent, const char * name, const QStringList & args )
- : QWidget( parent, name )
+ TQWidget * parent, const char * name, const TQStringList & args )
+ : TQWidget( parent, name )
{
init( info );
d->args = args;
d->withFallback = withFallback;
}
-KCModuleProxy::KCModuleProxy( const QString& serviceName, bool withFallback,
- QWidget * parent, const char * name,
- const QStringList & args)
- : QWidget( parent, name )
+KCModuleProxy::KCModuleProxy( const TQString& serviceName, bool withFallback,
+ TQWidget * parent, const char * name,
+ const TQStringList & args)
+ : TQWidget( parent, name )
{
init( KCModuleInfo( serviceName ));
d->args = args;
@@ -535,10 +535,10 @@ void KCModuleProxy::save()
}
}
-void KCModuleProxy::callRootModule( const QCString& function )
+void KCModuleProxy::callRootModule( const TQCString& function )
{
- QByteArray sendData, replyData;
- QCString replyType;
+ TQByteArray sendData, replyData;
+ TQCString replyType;
/* Note, we don't use d->dcopClient here, because it's used for
* the loaded module(and it's not "us" when this function is called) */
@@ -556,32 +556,32 @@ void KCModuleProxy::defaults()
d->kcm->defaults();
}
-QString KCModuleProxy::quickHelp() const
+TQString KCModuleProxy::quickHelp() const
{
if( !d->rootMode )
- return realModule() ? realModule()->quickHelp() : QString::null;
+ return realModule() ? realModule()->quickHelp() : TQString::null;
else
{
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if (kapp->dcopClient()->call(d->dcopName, d->dcopName, "quickHelp()",
data, replyType, replyData))
kdDebug(711) << "Calling DCOP function bool changed() failed." << endl;
else
{
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QString")
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == "TQString")
{
- QString result;
+ TQString result;
reply >> result;
return result;
}
else
kdDebug(711) << "DCOP function changed() returned mumbo jumbo." << endl;
}
- return QString::null;
+ return TQString::null;
}
}
@@ -603,9 +603,9 @@ int KCModuleProxy::buttons() const
KCModule::Help | KCModule::Default | KCModule::Apply ;
}
-QString KCModuleProxy::rootOnlyMsg() const
+TQString KCModuleProxy::rootOnlyMsg() const
{
- return realModule() ? realModule()->rootOnlyMsg() : QString::null;
+ return realModule() ? realModule()->rootOnlyMsg() : TQString::null;
}
bool KCModuleProxy::useRootOnlyMsg() const
@@ -633,7 +633,7 @@ bool KCModuleProxy::rootMode() const
return d->rootMode;
}
-QCString KCModuleProxy::dcopName() const
+TQCString KCModuleProxy::dcopName() const
{
return d->dcopName;
}
diff --git a/kutils/kcmoduleproxy.h b/kutils/kcmoduleproxy.h
index b785bbaca..d615edc1e 100644
--- a/kutils/kcmoduleproxy.h
+++ b/kutils/kcmoduleproxy.h
@@ -21,8 +21,8 @@
#ifndef KCMODULEPROXY_H
#define KCMODULEPROXY_H
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
#include <kservice.h>
#include <kdelibs_export.h>
@@ -42,7 +42,7 @@ class KProcess;
* modules are to be displayed. It ensures layout is consistent, handles
* root/administrator modules and in general takes care of the details
* needed for making a module available in an interface. A KCModuleProxy
- * can be treated as a QWidget, without worrying about the details specific
+ * can be treated as a TQWidget, without worrying about the details specific
* for modules such as library loading. KCModuleProxy is not a sub class of KCModule
* but its API closely resembles KCModule's.\n
* Usually, an instance is created by passing one of the constructors a KService::Ptr,
@@ -81,14 +81,14 @@ public:
* a alternative will be tried, resulting in the module appearing in its
* own window, if at all.
* The embedded module will be load()ed.
- * @param parent the parent QWidget.
+ * @param parent the parent TQWidget.
* @param name the module's name.
* @param args This is used in the implementation and is internal.
* Use the default.
*/
KCModuleProxy( const KCModuleInfo & info, bool withFallback = true,
- QWidget * parent = 0, const char * name = 0,
- const QStringList & args = QStringList() );
+ TQWidget * parent = 0, const char * name = 0,
+ const TQStringList & args = TQStringList() );
/**
* Constructs a KCModuleProxy from a module's service name, which is
@@ -100,14 +100,14 @@ public:
* a alternative will be tried, resulting in the module appearing in its
* own window, if at all.
* The embedded module will be load()ed.
- * @param parent the parent QWidget.
+ * @param parent the parent TQWidget.
* @param name the module's name.
* @param args This is used in the implementation and is internal.
* Use the default.
*/
- KCModuleProxy( const QString& serviceName, bool withFallback = true,
- QWidget * parent = 0, const char * name = 0,
- const QStringList & args = QStringList() );
+ KCModuleProxy( const TQString& serviceName, bool withFallback = true,
+ TQWidget * parent = 0, const char * name = 0,
+ const TQStringList & args = TQStringList() );
/**
* Constructs a KCModuleProxy from KService. Otherwise equal to the one above.
@@ -117,14 +117,14 @@ public:
* a alternative will be tried, resulting in the module appearing in its
* own window, if at all.
* The embedded module will be load()ed.
- * @param parent the parent QWidget.
+ * @param parent the parent TQWidget.
* @param name the module's name.
* @param args This is used in the implementation and is internal.
* Use the default.
*/
KCModuleProxy( const KService::Ptr& service, bool withFallback = true,
- QWidget * parent = 0, const char * name = 0,
- const QStringList & args = QStringList() );
+ TQWidget * parent = 0, const char * name = 0,
+ const TQStringList & args = TQStringList() );
/**
* Default destructor
@@ -149,7 +149,7 @@ public:
/**
* @return the module's quickHelp();
*/
- QString quickHelp() const;
+ TQString quickHelp() const;
/**
* @return the module's aboutData()
@@ -167,7 +167,7 @@ public:
* message, if it has one
* @deprecated
*/
- QString rootOnlyMsg() const;
+ TQString rootOnlyMsg() const;
//KDE4 remove. There's a limit for convenience functions,
// this one's available via moduleInfo()-> and realModule()->
@@ -228,7 +228,7 @@ public:
*
* @since 3.4
*/
- QCString dcopName() const;
+ TQCString dcopName() const;
public slots:
@@ -292,7 +292,7 @@ protected:
* Reimplemented for internal purposes. Makes sure the encapsulated
* module is loaded before the show event is taken care of.
*/
- void showEvent( QShowEvent * );
+ void showEvent( TQShowEvent * );
/**
* Internal intialization function, called by the constructors.
@@ -318,7 +318,7 @@ private slots:
* @param function the function signature of the function to call.
* @since 3.4
*/
- void callRootModule( const QCString& function );
+ void callRootModule( const TQCString& function );
/**
* This is called when the module exits from root mode. It zeroes
@@ -345,7 +345,7 @@ private slots:
*
* @since 3.4
*/
- void applicationRemoved( const QCString& app );
+ void applicationRemoved( const TQCString& app );
private:
diff --git a/kutils/kcmoduleproxyIface.h b/kutils/kcmoduleproxyIface.h
index 8159a843f..ff597b5c6 100644
--- a/kutils/kcmoduleproxyIface.h
+++ b/kutils/kcmoduleproxyIface.h
@@ -45,7 +45,7 @@ k_dcop:
*
* @returns the host's name
*/
- virtual QString applicationName() = 0;
+ virtual TQString applicationName() = 0;
/**
* Save settings.
@@ -65,7 +65,7 @@ k_dcop:
/**
* Returns the module's quick help.
*/
- virtual QString quickHelp() = 0;
+ virtual TQString quickHelp() = 0;
/**
* @returns true if the module has unsaved
diff --git a/kutils/kcmoduleproxyIfaceImpl.cpp b/kutils/kcmoduleproxyIfaceImpl.cpp
index 5d1ae15fe..c9de5ba7a 100644
--- a/kutils/kcmoduleproxyIfaceImpl.cpp
+++ b/kutils/kcmoduleproxyIfaceImpl.cpp
@@ -16,8 +16,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <dcopclient.h>
@@ -28,17 +28,17 @@
#include "kcmoduleproxyIfaceImpl.h"
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
-KCModuleProxyIfaceImpl::KCModuleProxyIfaceImpl( const QCString& name,
+KCModuleProxyIfaceImpl::KCModuleProxyIfaceImpl( const TQCString& name,
KCModuleProxy* const client )
- : DCOPObject( name ), QObject( 0, name ),
+ : DCOPObject( name ), TQObject( 0, name ),
p( const_cast<KCModuleProxy *>( client ))
{
- connect( p, SIGNAL( changed(bool)),
- SLOT( changedRelay(bool)));
- connect( p, SIGNAL( quickHelpChanged()),
- SLOT( quickHelpRelay()));
+ connect( p, TQT_SIGNAL( changed(bool)),
+ TQT_SLOT( changedRelay(bool)));
+ connect( p, TQT_SIGNAL( quickHelpChanged()),
+ TQT_SLOT( quickHelpRelay()));
}
void KCModuleProxyIfaceImpl::save()
@@ -59,12 +59,12 @@ void KCModuleProxyIfaceImpl::defaults()
p->defaults();
}
-QString KCModuleProxyIfaceImpl::applicationName()
+TQString KCModuleProxyIfaceImpl::applicationName()
{
return kapp->caption();
}
-QString KCModuleProxyIfaceImpl::quickHelp()
+TQString KCModuleProxyIfaceImpl::quickHelp()
{
return p->quickHelp();
}
@@ -76,15 +76,15 @@ bool KCModuleProxyIfaceImpl::changed()
void KCModuleProxyIfaceImpl::changedRelay( bool c )
{
- QByteArray data;
- QDataStream stream(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream(data, IO_WriteOnly);
stream << c;
emitDCOPSignal( "changed(bool)", data );
}
void KCModuleProxyIfaceImpl::quickHelpRelay()
{
- QByteArray data;
+ TQByteArray data;
emitDCOPSignal( "quickHelpChanged()", data );
}
@@ -95,8 +95,8 @@ void KCModuleProxyIfaceImpl::quickHelpRelay()
/***************************************************************/
KCModuleProxyRootCommunicatorImpl::KCModuleProxyRootCommunicatorImpl
- ( const QCString& name, KCModuleProxy* const client )
- : DCOPObject( name ), QObject( 0, name ),
+ ( const TQCString& name, KCModuleProxy* const client )
+ : DCOPObject( name ), TQObject( 0, name ),
p( const_cast<KCModuleProxy *>( client ))
{
/*
diff --git a/kutils/kcmoduleproxyIfaceImpl.h b/kutils/kcmoduleproxyIfaceImpl.h
index 435c856ab..bbfe51a28 100644
--- a/kutils/kcmoduleproxyIfaceImpl.h
+++ b/kutils/kcmoduleproxyIfaceImpl.h
@@ -26,7 +26,7 @@ class KCModuleProxy;
/***************************************************************/
/** @internal
@ingroup internal */
-class KCModuleProxyIfaceImpl: public QObject, virtual public KCModuleProxyIface
+class KCModuleProxyIfaceImpl: public TQObject, virtual public KCModuleProxyIface
{
/* KDE4 Merge KCModuleProxyIfaceImpl with KCModuleProxy(MI)
* if it doesn't break what DCOPClient it binds to.
@@ -38,7 +38,7 @@ class KCModuleProxyIfaceImpl: public QObject, virtual public KCModuleProxyIface
public:
/* Reimplementations of DCOP members */
- KCModuleProxyIfaceImpl( const QCString& name, KCModuleProxy* const client );
+ KCModuleProxyIfaceImpl( const TQCString& name, KCModuleProxy* const client );
virtual void save();
@@ -46,9 +46,9 @@ public:
virtual void defaults();
- virtual QString applicationName();
+ virtual TQString applicationName();
- virtual QString quickHelp();
+ virtual TQString quickHelp();
virtual bool changed();
public slots:
@@ -76,13 +76,13 @@ private:
/***************************************************************/
/** @internal
@ingroup internal */
-class KCModuleProxyRootCommunicatorImpl: public QObject,
+class KCModuleProxyRootCommunicatorImpl: public TQObject,
virtual public KCModuleProxyRootDispatcher
{
Q_OBJECT
public:
- KCModuleProxyRootCommunicatorImpl( const QCString& name, KCModuleProxy* const client );
+ KCModuleProxyRootCommunicatorImpl( const TQCString& name, KCModuleProxy* const client );
/* Reimplementations of DCOP members */
virtual void changed( bool c );
diff --git a/kutils/kcmultidialog.cpp b/kutils/kcmultidialog.cpp
index f64a9e139..33f243529 100644
--- a/kutils/kcmultidialog.cpp
+++ b/kutils/kcmultidialog.cpp
@@ -21,10 +21,10 @@
*/
-#include <qcursor.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqcursor.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -55,7 +55,7 @@ class KCMultiDialog::KCMultiDialogPrivate
};
-KCMultiDialog::KCMultiDialog(QWidget *parent, const char *name, bool modal)
+KCMultiDialog::KCMultiDialog(TQWidget *parent, const char *name, bool modal)
: KDialogBase(IconList, i18n("Configure"), Help | Default |Cancel | Apply |
Ok | User1 | User2, Ok, parent, name, modal, true,
KStdGuiItem::reset(), KStdGuiItem::adminMode())
@@ -64,7 +64,7 @@ KCMultiDialog::KCMultiDialog(QWidget *parent, const char *name, bool modal)
init();
}
-KCMultiDialog::KCMultiDialog( int dialogFace, const QString & caption, QWidget * parent, const char * name, bool modal )
+KCMultiDialog::KCMultiDialog( int dialogFace, const TQString & caption, TQWidget * parent, const char * name, bool modal )
: KDialogBase( dialogFace, caption, Help | Default | Cancel | Apply | Ok |
User1 | User2, Ok, parent, name, modal, true,
KStdGuiItem::reset(), KStdGuiItem::adminMode())
@@ -74,8 +74,8 @@ KCMultiDialog::KCMultiDialog( int dialogFace, const QString & caption, QWidget *
}
KCMultiDialog::KCMultiDialog( int dialogFace, const KGuiItem &user2,
- const KGuiItem &user3, int buttonMask, const QString &caption,
- QWidget *parent, const char *name, bool modal )
+ const KGuiItem &user3, int buttonMask, const TQString &caption,
+ TQWidget *parent, const char *name, bool modal )
: KDialogBase( dialogFace, caption, buttonMask | Help | Default | Cancel |
Apply | Ok | User1, Ok, parent, name, modal, true,
KStdGuiItem::reset(), user2, user3 )
@@ -89,12 +89,12 @@ KCMultiDialog::KCMultiDialog( int dialogFace, const KGuiItem &user2,
inline void KCMultiDialog::init()
{
- connect( this, SIGNAL( finished()), SLOT( dialogClosed()));
+ connect( this, TQT_SIGNAL( finished()), TQT_SLOT( dialogClosed()));
showButton( User1, false );
showButton( User2, false );
enableButton(Apply, false);
- connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *)));
- setInitialSize(QSize(640,480));
+ connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget *)), this, TQT_SLOT(slotAboutToShow(TQWidget *)));
+ setInitialSize(TQSize(640,480));
moduleParentComponents.setAutoDelete( true );
}
@@ -113,7 +113,7 @@ void KCMultiDialog::slotDefault()
ModuleList::Iterator end = m_modules.end();
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
- if( pageIndex( ( QWidget * )( *it ).kcm->parent() ) == curPageIndex )
+ if( pageIndex( ( TQWidget * )( *it ).kcm->parent() ) == curPageIndex )
{
( *it ).kcm->defaults();
clientChanged( true );
@@ -127,7 +127,7 @@ void KCMultiDialog::slotUser1()
ModuleList::Iterator end = m_modules.end();
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
- if( pageIndex( ( QWidget * )( *it ).kcm->parent() ) == curPageIndex )
+ if( pageIndex( ( TQWidget * )( *it ).kcm->parent() ) == curPageIndex )
{
( *it ).kcm->load();
clientChanged( false );
@@ -137,7 +137,7 @@ void KCMultiDialog::slotUser1()
void KCMultiDialog::apply()
{
- QStringList updatedModules;
+ TQStringList updatedModules;
ModuleList::Iterator end = m_modules.end();
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
{
@@ -145,14 +145,14 @@ void KCMultiDialog::apply()
if( m->changed() )
{
m->save();
- QStringList * names = moduleParentComponents[ m ];
+ TQStringList * names = moduleParentComponents[ m ];
kdDebug(710) << k_funcinfo << *names << " saved and added to the list" << endl;
- for( QStringList::ConstIterator it = names->begin(); it != names->end(); ++it )
+ for( TQStringList::ConstIterator it = names->begin(); it != names->end(); ++it )
if( updatedModules.find( *it ) == updatedModules.end() )
updatedModules.append( *it );
}
}
- for( QStringList::const_iterator it = updatedModules.begin(); it != updatedModules.end(); ++it )
+ for( TQStringList::const_iterator it = updatedModules.begin(); it != updatedModules.end(); ++it )
{
kdDebug(710) << k_funcinfo << *it << " " << ( *it ).latin1() << endl;
emit configCommitted( ( *it ).latin1() );
@@ -162,7 +162,7 @@ void KCMultiDialog::apply()
void KCMultiDialog::slotApply()
{
- QPushButton *button = actionButton(Apply);
+ TQPushButton *button = actionButton(Apply);
if (button)
button->setFocus();
emit applyClicked();
@@ -172,7 +172,7 @@ void KCMultiDialog::slotApply()
void KCMultiDialog::slotOk()
{
- QPushButton *button = actionButton(Ok);
+ TQPushButton *button = actionButton(Ok);
if (button)
button->setFocus();
emit okClicked();
@@ -182,12 +182,12 @@ void KCMultiDialog::slotOk()
void KCMultiDialog::slotHelp()
{
- QString docPath;
+ TQString docPath;
int curPageIndex = activePageIndex();
ModuleList::Iterator end = m_modules.end();
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
- if( pageIndex( ( QWidget * )( *it ).kcm->parent() ) == curPageIndex )
+ if( pageIndex( ( TQWidget * )( *it ).kcm->parent() ) == curPageIndex )
{
docPath = ( *it ).kcm->moduleInfo().docPath();
break;
@@ -219,20 +219,20 @@ void KCMultiDialog::clientChanged(bool state)
enableButton( Apply, false );
}
-void KCMultiDialog::addModule(const QString& path, bool withfallback)
+void KCMultiDialog::addModule(const TQString& path, bool withfallback)
{
- QString complete = path;
+ TQString complete = path;
if( !path.endsWith( ".desktop" ))
complete += ".desktop";
KService::Ptr service = KService::serviceByStorageId( complete );
- addModule( KCModuleInfo( service ), QStringList(), withfallback);
+ addModule( KCModuleInfo( service ), TQStringList(), withfallback);
}
void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
- QStringList parentmodulenames, bool withfallback)
+ TQStringList parentmodulenames, bool withfallback)
{
kdDebug(710) << "KCMultiDialog::addModule "
<< moduleinfo.moduleName() << endl;
@@ -246,7 +246,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
if( !KCModuleLoader::testModule( moduleinfo ))
return;
- QFrame* page = 0;
+ TQFrame* page = 0;
if (!moduleinfo.service()->noDisplay())
switch( dialogface )
{
@@ -263,7 +263,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
break;
case Plain:
page = plainPage();
- ( new QHBoxLayout( page ) )->setAutoAdd( true );
+ ( new TQHBoxLayout( page ) )->setAutoAdd( true );
break;
default:
kdError( 710 ) << "unsupported dialog face for KCMultiDialog"
@@ -284,7 +284,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
kdDebug( 710 ) << "Use KCModule from the list of orphans for " <<
moduleinfo.moduleName() << ": " << module << endl;
- module->reparent( page, 0, QPoint( 0, 0 ), true );
+ module->reparent( page, 0, TQPoint( 0, 0 ), true );
if( module->changed() )
clientChanged( true );
@@ -295,12 +295,12 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
else
{
module = new KCModuleProxy( moduleinfo, withfallback, page );
- QStringList parentComponents = moduleinfo.service()->property(
+ TQStringList parentComponents = moduleinfo.service()->property(
"X-KDE-ParentComponents" ).toStringList();
moduleParentComponents.insert( module,
- new QStringList( parentComponents ) );
+ new TQStringList( parentComponents ) );
- connect(module, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool)));
+ connect(module, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(clientChanged(bool)));
if( m_modules.count() == 0 )
aboutToShowPage( page );
@@ -328,12 +328,12 @@ void KCMultiDialog::removeAllModules()
{
kdDebug( 710 ) << "remove 2" << endl;
KCModuleProxy * kcm = ( *it ).kcm;
- QObject * page = kcm->parent();
+ TQObject * page = kcm->parent();
kcm->hide();
if( page )
{
// I hate this
- kcm->reparent( 0, QPoint( 0, 0 ), false );
+ kcm->reparent( 0, TQPoint( 0, 0 ), false );
delete page;
}
m_orphanModules[ ( *it ).service ] = kcm;
@@ -350,11 +350,11 @@ void KCMultiDialog::show()
KDialogBase::show();
}
-void KCMultiDialog::slotAboutToShow(QWidget *page)
+void KCMultiDialog::slotAboutToShow(TQWidget *page)
{
kdDebug(710) << k_funcinfo << endl;
- QObject * obj = page->child( 0, "KCModuleProxy" );
+ TQObject * obj = page->child( 0, "KCModuleProxy" );
if( ! obj )
return;
@@ -369,15 +369,15 @@ void KCMultiDialog::slotAboutToShow(QWidget *page)
enableButton( KDialogBase::Default,
d->currentModule->buttons() & KCModule::Default );
- disconnect( this, SIGNAL(user2Clicked()), 0, 0 );
+ disconnect( this, TQT_SIGNAL(user2Clicked()), 0, 0 );
if (d->currentModule->moduleInfo().needsRootPrivileges())
{
if ( !d->currentModule->rootMode() )
{ /* Enable the Admin Mode button */
enableButton( User2, true );
- connect( this, SIGNAL(user2Clicked()), d->currentModule, SLOT( runAsRoot() ));
- connect( this, SIGNAL(user2Clicked()), SLOT( disableRModeButton() ));
+ connect( this, TQT_SIGNAL(user2Clicked()), d->currentModule, TQT_SLOT( runAsRoot() ));
+ connect( this, TQT_SIGNAL(user2Clicked()), TQT_SLOT( disableRModeButton() ));
}
else
enableButton( User2, false);
@@ -392,7 +392,7 @@ void KCMultiDialog::rootExit()
void KCMultiDialog::disableRModeButton()
{
enableButton( User2, false );
- connect ( d->currentModule, SIGNAL( childClosed() ), SLOT( rootExit() ));
+ connect ( d->currentModule, TQT_SIGNAL( childClosed() ), TQT_SLOT( rootExit() ));
}
void KCMultiDialog::dialogClosed()
diff --git a/kutils/kcmultidialog.h b/kutils/kcmultidialog.h
index 8461c5643..df1707a9a 100644
--- a/kutils/kcmultidialog.h
+++ b/kutils/kcmultidialog.h
@@ -23,7 +23,7 @@
#ifndef KCMULTIDIALOG_H
#define KCMULTIDIALOG_H
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -52,7 +52,7 @@ public:
* @param name The widget name
* @param modal If you pass true here, the dialog will be modal
**/
- KCMultiDialog( QWidget *parent=0, const char *name=0, bool modal=false );
+ KCMultiDialog( TQWidget *parent=0, const char *name=0, bool modal=false );
/**
* Construct a personalized KCMultiDialog.
@@ -67,7 +67,7 @@ public:
* program interface (example: other dialogs) is accessible while
* the dialog is open.
*/
- KCMultiDialog( int dialogFace, const QString & caption, QWidget * parent = 0,
+ KCMultiDialog( int dialogFace, const TQString & caption, TQWidget * parent = 0,
const char * name = 0, bool modal = false );
@@ -101,7 +101,7 @@ public:
*/
KCMultiDialog( int dialogFace, const KGuiItem &user2,
const KGuiItem &user3=KGuiItem(), int buttonMask=User2,
- const QString &caption=i18n("Configure"), QWidget *parent=0,
+ const TQString &caption=i18n("Configure"), TQWidget *parent=0,
const char *name=0, bool modal=false ) KDE_DEPRECATED;
// KDE4 remove the user3 argument, and instead initialize it to KStdGuiItem::adminMode.
@@ -119,7 +119,7 @@ public:
* @param withfallback Try harder to load the module. Might result
* in the module appearing outside the dialog.
**/
- void addModule(const QString& module, bool withfallback=true);
+ void addModule(const TQString& module, bool withfallback=true);
/**
* Add a module.
@@ -137,7 +137,7 @@ public:
* in the module appearing outside the dialog.
**/
void addModule(const KCModuleInfo& moduleinfo, QStringList
- parentmodulenames = QStringList(), bool withfallback=false);
+ parentmodulenames = TQStringList(), bool withfallback=false);
/**
* Remove all modules from the dialog.
@@ -174,7 +174,7 @@ signals:
* @param instanceName The name of the instance that needs to reload its
* configuration.
*/
- void configCommitted( const QCString & instanceName );
+ void configCommitted( const TQCString & instanceName );
protected slots:
/**
@@ -223,7 +223,7 @@ protected slots:
private slots:
- void slotAboutToShow(QWidget *);
+ void slotAboutToShow(TQWidget *);
void clientChanged(bool state);
@@ -265,14 +265,14 @@ private:
KService::Ptr service;
/* KDE 4 Move to Private class */
};
- typedef QValueList<CreatedModule> ModuleList;
+ typedef TQValueList<CreatedModule> ModuleList;
ModuleList m_modules;
- typedef QMap<KService::Ptr, KCModuleProxy*> OrphanMap;
+ typedef TQMap<KService::Ptr, KCModuleProxy*> OrphanMap;
OrphanMap m_orphanModules;
- QPtrDict<QStringList> moduleParentComponents;
- QString _docPath;
+ TQPtrDict<TQStringList> moduleParentComponents;
+ TQString _docPath;
int dialogface;
class KCMultiDialogPrivate;
diff --git a/kutils/kfind.cpp b/kutils/kfind.cpp
index a6eb8dd46..7b2da6899 100644
--- a/kutils/kfind.cpp
+++ b/kutils/kfind.cpp
@@ -24,11 +24,11 @@
#include <kapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qstylesheet.h>
-#include <qguardedptr.h>
-#include <qptrvector.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqstylesheet.h>
+#include <tqguardedptr.h>
+#include <tqptrvector.h>
#include <kdebug.h>
//#define DEBUG_FIND
@@ -38,11 +38,11 @@
class KFindNextDialog : public KDialogBase
{
public:
- KFindNextDialog(const QString &pattern, QWidget *parent);
+ KFindNextDialog(const TQString &pattern, TQWidget *parent);
};
// Create the dialog.
-KFindNextDialog::KFindNextDialog(const QString &pattern, QWidget *parent) :
+KFindNextDialog::KFindNextDialog(const TQString &pattern, TQWidget *parent) :
KDialogBase(parent, 0, false, // non-modal!
i18n("Find Next"),
User1 | Close,
@@ -50,7 +50,7 @@ KFindNextDialog::KFindNextDialog(const QString &pattern, QWidget *parent) :
false,
KStdGuiItem::find())
{
- setMainWidget( new QLabel( i18n("<qt>Find next occurrence of '<b>%1</b>'?</qt>").arg(pattern), this ) );
+ setMainWidget( new TQLabel( i18n("<qt>Find next occurrence of '<b>%1</b>'?</qt>").arg(pattern), this ) );
}
////
@@ -92,39 +92,39 @@ struct KFind::Private
struct Data
{
Data() : id(-1), dirty(false) { }
- Data(int id, const QString &text, bool dirty = false) :
+ Data(int id, const TQString &text, bool dirty = false) :
id(id),
text(text),
dirty(dirty)
{ }
int id;
- QString text;
+ TQString text;
bool dirty;
};
- QGuardedPtr<QWidget> findDialog;
+ TQGuardedPtr<TQWidget> findDialog;
bool patternChanged;
- QString matchedPattern;
- QDict<Match> incrementalPath;
+ TQString matchedPattern;
+ TQDict<Match> incrementalPath;
Match * emptyMatch;
- QPtrVector<Data> data;
+ TQPtrVector<Data> data;
int currentId;
bool customIds;
};
////
-KFind::KFind( const QString &pattern, long options, QWidget *parent )
- : QObject( parent )
+KFind::KFind( const TQString &pattern, long options, TQWidget *parent )
+ : TQObject( parent )
{
d = new KFind::Private;
m_options = options;
init( pattern );
}
-KFind::KFind( const QString &pattern, long options, QWidget *parent, QWidget *findDialog )
- : QObject( parent )
+KFind::KFind( const TQString &pattern, long options, TQWidget *parent, TQWidget *findDialog )
+ : TQObject( parent )
{
d = new KFind::Private;
d->findDialog = findDialog;
@@ -132,7 +132,7 @@ KFind::KFind( const QString &pattern, long options, QWidget *parent, QWidget *fi
init( pattern );
}
-void KFind::init( const QString& pattern )
+void KFind::init( const TQString& pattern )
{
m_matches = 0;
m_pattern = pattern;
@@ -141,7 +141,7 @@ void KFind::init( const QString& pattern )
m_index = INDEX_NOMATCH;
m_lastResult = NoMatch;
if (m_options & KFindDialog::RegularExpression)
- m_regExp = new QRegExp(pattern, m_options & KFindDialog::CaseSensitive);
+ m_regExp = new TQRegExp(pattern, m_options & KFindDialog::CaseSensitive);
else {
m_regExp = 0;
}
@@ -166,12 +166,12 @@ bool KFind::needData() const
return m_index == INDEX_NOMATCH;
}
-void KFind::setData( const QString& data, int startPos )
+void KFind::setData( const TQString& data, int startPos )
{
setData( -1, data, startPos );
}
-void KFind::setData( int id, const QString& data, int startPos )
+void KFind::setData( int id, const TQString& data, int startPos )
{
// cache the data for incremental find
if ( m_options & KFindDialog::FindIncremental )
@@ -212,8 +212,8 @@ KDialogBase* KFind::findNextDialog( bool create )
if ( !m_dialog && create )
{
m_dialog = new KFindNextDialog( m_pattern, parentWidget() );
- connect( m_dialog, SIGNAL( user1Clicked() ), this, SLOT( slotFindNext() ) );
- connect( m_dialog, SIGNAL( finished() ), this, SLOT( slotDialogClosed() ) );
+ connect( m_dialog, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( slotFindNext() ) );
+ connect( m_dialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogClosed() ) );
}
return m_dialog;
}
@@ -244,7 +244,7 @@ KFind::Result KFind::find()
if ( m_pattern.length() < d->matchedPattern.length() )
{
Private::Match *match = m_pattern.isEmpty() ? d->emptyMatch : d->incrementalPath[m_pattern];
- QString previousPattern = d->matchedPattern;
+ TQString previousPattern = d->matchedPattern;
d->matchedPattern = m_pattern;
if ( match != 0 )
{
@@ -306,7 +306,7 @@ KFind::Result KFind::find()
if ( m_index == INDEX_NOMATCH )
return NoMatch;
- QString temp = m_pattern;
+ TQString temp = m_pattern;
m_pattern.truncate(d->matchedPattern.length() + 1);
d->matchedPattern = temp;
}
@@ -409,7 +409,7 @@ KFind::Result KFind::find()
{
if ( m_options & KFindDialog::FindIncremental )
{
- QString temp = m_pattern;
+ TQString temp = m_pattern;
temp.truncate(temp.length() - 1);
m_pattern = d->matchedPattern;
d->matchedPattern = temp;
@@ -432,7 +432,7 @@ void KFind::startNewIncrementalSearch()
Private::Match *match = d->emptyMatch;
if(match == 0)
{
- m_text = QString::null;
+ m_text = TQString::null;
m_index = 0;
d->currentId = 0;
}
@@ -447,16 +447,16 @@ void KFind::startNewIncrementalSearch()
delete d->emptyMatch;
d->emptyMatch = 0;
d->matchedPattern = m_pattern;
- m_pattern = QString::null;
+ m_pattern = TQString::null;
}
// static
-int KFind::find(const QString &text, const QString &pattern, int index, long options, int *matchedLength)
+int KFind::find(const TQString &text, const TQString &pattern, int index, long options, int *matchedLength)
{
// Handle regular expressions in the appropriate way.
if (options & KFindDialog::RegularExpression)
{
- QRegExp regExp(pattern, options & KFindDialog::CaseSensitive);
+ TQRegExp regExp(pattern, options & KFindDialog::CaseSensitive);
return find(text, regExp, index, options, matchedLength);
}
@@ -522,7 +522,7 @@ int KFind::find(const QString &text, const QString &pattern, int index, long opt
}
// static
-int KFind::find(const QString &text, const QRegExp &pattern, int index, long options, int *matchedLength)
+int KFind::find(const TQString &text, const TQRegExp &pattern, int index, long options, int *matchedLength)
{
if (options & KFindDialog::WholeWordsOnly)
{
@@ -588,12 +588,12 @@ int KFind::find(const QString &text, const QRegExp &pattern, int index, long opt
return index;
}
-bool KFind::isInWord(QChar ch)
+bool KFind::isInWord(TQChar ch)
{
return ch.isLetter() || ch.isDigit() || ch == '_';
}
-bool KFind::isWholeWords(const QString &text, int starts, int matchedLength)
+bool KFind::isWholeWords(const TQString &text, int starts, int matchedLength)
{
if ((starts == 0) || (!isInWord(text[starts - 1])))
{
@@ -618,11 +618,11 @@ void KFind::slotDialogClosed()
void KFind::displayFinalDialog() const
{
- QString message;
+ TQString message;
if ( numMatches() )
message = i18n( "1 match found.", "%n matches found.", numMatches() );
else
- message = i18n("<qt>No matches found for '<b>%1</b>'.</qt>").arg(QStyleSheet::escape(m_pattern));
+ message = i18n("<qt>No matches found for '<b>%1</b>'.</qt>").arg(TQStyleSheet::escape(m_pattern));
KMessageBox::information(dialogsParent(), message);
}
@@ -636,13 +636,13 @@ bool KFind::shouldRestart( bool forceAsking, bool showNumMatches ) const
displayFinalDialog();
return false;
}
- QString message;
+ TQString message;
if ( showNumMatches )
{
if ( numMatches() )
message = i18n( "1 match found.", "%n matches found.", numMatches() );
else
- message = i18n("No matches found for '<b>%1</b>'.").arg(QStyleSheet::escape(m_pattern));
+ message = i18n("No matches found for '<b>%1</b>'.").arg(TQStyleSheet::escape(m_pattern));
}
else
{
@@ -659,8 +659,8 @@ bool KFind::shouldRestart( bool forceAsking, bool showNumMatches ) const
i18n("Continue from the end?")
: i18n("Continue from the beginning?");
- int ret = KMessageBox::questionYesNo( dialogsParent(), QString("<qt>")+message+QString("</qt>"),
- QString::null, KStdGuiItem::cont(), KStdGuiItem::stop() );
+ int ret = KMessageBox::questionYesNo( dialogsParent(), TQString("<qt>")+message+TQString("</qt>"),
+ TQString::null, KStdGuiItem::cont(), KStdGuiItem::stop() );
bool yes = ( ret == KMessageBox::Yes );
if ( yes )
const_cast<KFind*>(this)->m_options &= ~KFindDialog::FromCursor; // clear FromCursor option
@@ -673,7 +673,7 @@ void KFind::setOptions( long options )
delete m_regExp;
if (m_options & KFindDialog::RegularExpression)
- m_regExp = new QRegExp(m_pattern, m_options & KFindDialog::CaseSensitive);
+ m_regExp = new TQRegExp(m_pattern, m_options & KFindDialog::CaseSensitive);
else
m_regExp = 0;
}
@@ -690,7 +690,7 @@ int KFind::index() const
return m_index;
}
-void KFind::setPattern( const QString& pattern )
+void KFind::setPattern( const TQString& pattern )
{
if ( m_options & KFindDialog::FindIncremental && m_pattern != pattern )
d->patternChanged = true;
@@ -699,12 +699,12 @@ void KFind::setPattern( const QString& pattern )
setOptions( options() ); // rebuild m_regExp if necessary
}
-QWidget* KFind::dialogsParent() const
+TQWidget* KFind::dialogsParent() const
{
// If the find dialog is still up, it should get the focus when closing a message box
// Otherwise, maybe the "find next?" dialog is up
// Otherwise, the "view" is the parent.
- return d->findDialog ? (QWidget*)d->findDialog : ( m_dialog ? m_dialog : parentWidget() );
+ return d->findDialog ? (TQWidget*)d->findDialog : ( m_dialog ? m_dialog : parentWidget() );
}
#include "kfind.moc"
diff --git a/kutils/kfind.h b/kutils/kfind.h
index a2159f6b1..502708dd1 100644
--- a/kutils/kfind.h
+++ b/kutils/kfind.h
@@ -22,7 +22,7 @@
#define KFIND_H
#include <kdialogbase.h>
-#include <qrect.h>
+#include <tqrect.h>
/**
* @ingroup main
@@ -50,11 +50,11 @@
*
* // Connect highlight signal to code which handles highlighting
* // of found text.
- * connect( m_find, SIGNAL( highlight( const QString &, int, int ) ),
- * this, SLOT( slotHighlight( const QString &, int, int ) ) );
+ * connect( m_find, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ * this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
* // Connect findNext signal - called when pressing the button in the dialog
- * connect( m_find, SIGNAL( findNext() ),
- * this, SLOT( slotFindNext() ) );
+ * connect( m_find, TQT_SIGNAL( findNext() ),
+ * this, TQT_SLOT( slotFindNext() ) );
* \endcode
*
* If you are using a non-modal find dialog (the recommended new way
@@ -114,7 +114,7 @@ public:
* @param options Options for the find dialog. @see KFindDialog.
* @param parent The parent widget.
*/
- KFind(const QString &pattern, long options, QWidget *parent);
+ KFind(const TQString &pattern, long options, TQWidget *parent);
/**
* This is the recommended constructor if you also use KFindDialog (non-modal).
@@ -126,7 +126,7 @@ public:
* @param parent The parent widget.
* @param findDialog A pointer to the KFindDialog object.
*/
- KFind(const QString &pattern, long options, QWidget *parent, QWidget* findDialog);
+ KFind(const TQString &pattern, long options, TQWidget *parent, TQWidget* findDialog);
/**
* Destructor.
@@ -158,7 +158,7 @@ public:
* means "process all the data", i.e. either 0 or data.length()-1 depending
* on FindBackwards.
*/
- void setData( const QString& data, int startPos = -1 );
+ void setData( const TQString& data, int startPos = -1 );
/**
* Call this when needData returns @c true, before calling find(). The use of
@@ -173,7 +173,7 @@ public:
*
* @since 3.3
*/
- void setData( int id, const QString& data, int startPos = -1 );
+ void setData( int id, const TQString& data, int startPos = -1 );
/**
* Walk the text fragment (e.g. text-processor line, kspread cell) looking for matches.
@@ -205,13 +205,13 @@ public:
/**
* @return the pattern we're currently looking for
*/
- QString pattern() const { return m_pattern; }
+ TQString pattern() const { return m_pattern; }
/**
* Change the pattern we're looking for
* @param pattern The new pattern.
*/
- void setPattern( const QString& pattern );
+ void setPattern( const TQString& pattern );
/**
* Return the number of matches found (i.e. the number of times
@@ -240,7 +240,7 @@ public:
* @param index The starting index where the candidate match was found
* @param matchedlength The length of the candidate match
*/
- virtual bool validateMatch( const QString & text, int index, int matchedlength ) {
+ virtual bool validateMatch( const TQString & text, int index, int matchedlength ) {
Q_UNUSED(text); Q_UNUSED(index); Q_UNUSED(matchedlength); return true; }
/**
@@ -274,7 +274,7 @@ public:
* @param matchedlength The length of the string that was matched
* @return The index at which a match was found, or -1 if no match was found.
*/
- static int find( const QString &text, const QString &pattern, int index, long options, int *matchedlength );
+ static int find( const TQString &text, const TQString &pattern, int index, long options, int *matchedlength );
/**
* Search the given regular expression, and returns whether a match was found. If one is,
@@ -289,7 +289,7 @@ public:
* @param matchedlength The length of the string that was matched
* @return The index at which a match was found, or -1 if no match was found.
*/
- static int find( const QString &text, const QRegExp &pattern, int index, long options, int *matchedlength );
+ static int find( const TQString &text, const TQRegExp &pattern, int index, long options, int *matchedlength );
/**
* Displays the final dialog saying "no match was found", if that was the case.
@@ -344,7 +344,7 @@ signals:
* @param matchedLength The length of the matched text.
* @see setData()
*/
- void highlight(const QString &text, int matchingIndex, int matchedLength);
+ void highlight(const TQString &text, int matchingIndex, int matchedLength);
/**
* Connect to this signal to implement highlighting of found text during the find
@@ -388,8 +388,8 @@ signals:
protected:
- QWidget* parentWidget() const { return (QWidget *)parent(); }
- QWidget* dialogsParent() const;
+ TQWidget* parentWidget() const { return (TQWidget *)parent(); }
+ TQWidget* dialogsParent() const;
protected slots:
@@ -397,22 +397,22 @@ protected slots:
void slotDialogClosed();
private:
- void init( const QString& pattern );
+ void init( const TQString& pattern );
void startNewIncrementalSearch();
- static bool isInWord( QChar ch );
- static bool isWholeWords( const QString &text, int starts, int matchedLength );
+ static bool isInWord( TQChar ch );
+ static bool isWholeWords( const TQString &text, int starts, int matchedLength );
friend class KReplace;
- QString m_pattern;
- QRegExp *m_regExp;
+ TQString m_pattern;
+ TQRegExp *m_regExp;
KDialogBase* m_dialog;
long m_options;
unsigned m_matches;
- QString m_text; // the text set by setData
+ TQString m_text; // the text set by setData
int m_index;
int m_matchedLength;
bool m_dialogClosed;
diff --git a/kutils/kfinddialog.cpp b/kutils/kfinddialog.cpp
index 7a18111a3..7cc6dff46 100644
--- a/kutils/kfinddialog.cpp
+++ b/kutils/kfinddialog.cpp
@@ -19,20 +19,20 @@
*/
#include "kfinddialog.h"
-#include <qcheckbox.h>
-#include <qcursor.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqcursor.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
#include <kcombobox.h>
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <assert.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <kregexpeditorinterface.h>
#include <kparts/componentfactory.h>
@@ -43,15 +43,15 @@ public:
KFindDialogPrivate() : m_regexpDialog(0),
m_regexpDialogQueryDone(false),
m_enabled(WholeWordsOnly | FromCursor | SelectedText | CaseSensitive | FindBackwards | RegularExpression), m_initialShowDone(false) {}
- QDialog* m_regexpDialog;
+ TQDialog* m_regexpDialog;
bool m_regexpDialogQueryDone;
long m_enabled; // uses Options to define which search options are enabled
bool m_initialShowDone;
- QStringList findStrings;
- QString pattern;
+ TQStringList findStrings;
+ TQString pattern;
};
-KFindDialog::KFindDialog(QWidget *parent, const char *name, long options, const QStringList &findStrings, bool hasSelection) :
+KFindDialog::KFindDialog(TQWidget *parent, const char *name, long options, const TQStringList &findStrings, bool hasSelection) :
KDialogBase(parent, name, true, i18n("Find Text"), Ok | Cancel, Ok),
m_findExtension (0),
m_replaceExtension (0)
@@ -62,7 +62,7 @@ KFindDialog::KFindDialog(QWidget *parent, const char *name, long options, const
setButtonCancel( KStdGuiItem::close() );
}
-KFindDialog::KFindDialog(bool modal, QWidget *parent, const char *name, long options, const QStringList &findStrings, bool hasSelection) :
+KFindDialog::KFindDialog(bool modal, TQWidget *parent, const char *name, long options, const TQStringList &findStrings, bool hasSelection) :
KDialogBase(parent, name, modal, i18n("Find Text"), Ok | Cancel, Ok),
m_findExtension (0),
m_replaceExtension (0)
@@ -73,7 +73,7 @@ KFindDialog::KFindDialog(bool modal, QWidget *parent, const char *name, long opt
setButtonCancel( KStdGuiItem::close() );
}
-KFindDialog::KFindDialog(QWidget *parent, const char *name, bool /*forReplace*/) :
+KFindDialog::KFindDialog(TQWidget *parent, const char *name, bool /*forReplace*/) :
KDialogBase(parent, name, true, i18n("Replace Text"), Ok | Cancel, Ok),
m_findExtension (0),
m_replaceExtension (0)
@@ -87,48 +87,48 @@ KFindDialog::~KFindDialog()
delete d;
}
-QWidget *KFindDialog::findExtension()
+TQWidget *KFindDialog::findExtension()
{
if (!m_findExtension)
{
- m_findExtension = new QWidget(m_findGrp);
+ m_findExtension = new TQWidget(m_findGrp);
m_findLayout->addMultiCellWidget(m_findExtension, 3, 3, 0, 1);
}
return m_findExtension;
}
-QStringList KFindDialog::findHistory() const
+TQStringList KFindDialog::findHistory() const
{
return m_find->historyItems();
}
-void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool hasSelection)
+void KFindDialog::init(bool forReplace, const TQStringList &findStrings, bool hasSelection)
{
- QVBoxLayout *topLayout;
- QGridLayout *optionsLayout;
+ TQVBoxLayout *topLayout;
+ TQGridLayout *optionsLayout;
// Create common parts of dialog.
- QWidget *page = new QWidget(this);
+ TQWidget *page = new TQWidget(this);
setMainWidget(page);
- topLayout = new QVBoxLayout(page);
+ topLayout = new TQVBoxLayout(page);
topLayout->setSpacing( KDialog::spacingHint() );
topLayout->setMargin( 0 );
- m_findGrp = new QGroupBox(0, Qt::Vertical, i18n("Find"), page);
+ m_findGrp = new TQGroupBox(0, Qt::Vertical, i18n("Find"), page);
m_findGrp->layout()->setSpacing( KDialog::spacingHint() );
// m_findGrp->layout()->setMargin( KDialog::marginHint() );
- m_findLayout = new QGridLayout(m_findGrp->layout());
+ m_findLayout = new TQGridLayout(m_findGrp->layout());
m_findLayout->setSpacing( KDialog::spacingHint() );
// m_findLayout->setMargin( KDialog::marginHint() );
- m_findLabel = new QLabel(i18n("&Text to find:"), m_findGrp);
+ m_findLabel = new TQLabel(i18n("&Text to find:"), m_findGrp);
m_find = new KHistoryCombo(true, m_findGrp);
m_find->setMaxCount(10);
m_find->setDuplicatesEnabled(false);
- m_regExp = new QCheckBox(i18n("Regular e&xpression"), m_findGrp);
- m_regExpItem = new QPushButton(i18n("&Edit..."), m_findGrp);
+ m_regExp = new TQCheckBox(i18n("Regular e&xpression"), m_findGrp);
+ m_regExpItem = new TQPushButton(i18n("&Edit..."), m_findGrp);
m_regExpItem->setEnabled(false);
m_findLayout->addWidget(m_findLabel, 0, 0);
@@ -137,19 +137,19 @@ void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool has
m_findLayout->addWidget(m_regExpItem, 2, 1);
topLayout->addWidget(m_findGrp);
- m_replaceGrp = new QGroupBox(0, Qt::Vertical, i18n("Replace With"), page);
+ m_replaceGrp = new TQGroupBox(0, Qt::Vertical, i18n("Replace With"), page);
m_replaceGrp->layout()->setSpacing( KDialog::spacingHint() );
// m_replaceGrp->layout()->setMargin( KDialog::marginHint() );
- m_replaceLayout = new QGridLayout(m_replaceGrp->layout());
+ m_replaceLayout = new TQGridLayout(m_replaceGrp->layout());
m_replaceLayout->setSpacing( KDialog::spacingHint() );
// m_replaceLayout->setMargin( KDialog::marginHint() );
- m_replaceLabel = new QLabel(i18n("Replace&ment text:"), m_replaceGrp);
+ m_replaceLabel = new TQLabel(i18n("Replace&ment text:"), m_replaceGrp);
m_replace = new KHistoryCombo(true, m_replaceGrp);
m_replace->setMaxCount(10);
m_replace->setDuplicatesEnabled(false);
- m_backRef = new QCheckBox(i18n("Use p&laceholders"), m_replaceGrp);
- m_backRefItem = new QPushButton(i18n("Insert Place&holder"), m_replaceGrp);
+ m_backRef = new TQCheckBox(i18n("Use p&laceholders"), m_replaceGrp);
+ m_backRefItem = new TQPushButton(i18n("Insert Place&holder"), m_replaceGrp);
m_backRefItem->setEnabled(false);
m_replaceLayout->addWidget(m_replaceLabel, 0, 0);
@@ -158,25 +158,25 @@ void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool has
m_replaceLayout->addWidget(m_backRefItem, 2, 1);
topLayout->addWidget(m_replaceGrp);
- m_optionGrp = new QGroupBox(0, Qt::Vertical, i18n("Options"), page);
+ m_optionGrp = new TQGroupBox(0, Qt::Vertical, i18n("Options"), page);
m_optionGrp->layout()->setSpacing(KDialog::spacingHint());
// m_optionGrp->layout()->setMargin(KDialog::marginHint());
- optionsLayout = new QGridLayout(m_optionGrp->layout());
+ optionsLayout = new TQGridLayout(m_optionGrp->layout());
optionsLayout->setSpacing( KDialog::spacingHint() );
// optionsLayout->setMargin( KDialog::marginHint() );
- m_caseSensitive = new QCheckBox(i18n("C&ase sensitive"), m_optionGrp);
- m_wholeWordsOnly = new QCheckBox(i18n("&Whole words only"), m_optionGrp);
- m_fromCursor = new QCheckBox(i18n("From c&ursor"), m_optionGrp);
- m_findBackwards = new QCheckBox(i18n("Find &backwards"), m_optionGrp);
- m_selectedText = new QCheckBox(i18n("&Selected text"), m_optionGrp);
+ m_caseSensitive = new TQCheckBox(i18n("C&ase sensitive"), m_optionGrp);
+ m_wholeWordsOnly = new TQCheckBox(i18n("&Whole words only"), m_optionGrp);
+ m_fromCursor = new TQCheckBox(i18n("From c&ursor"), m_optionGrp);
+ m_findBackwards = new TQCheckBox(i18n("Find &backwards"), m_optionGrp);
+ m_selectedText = new TQCheckBox(i18n("&Selected text"), m_optionGrp);
setHasSelection( hasSelection );
// If we have a selection, we make 'find in selection' default
// and if we don't, then the option has to be unchecked, obviously.
m_selectedText->setChecked( hasSelection );
slotSelectedTextToggled( hasSelection );
- m_promptOnReplace = new QCheckBox(i18n("&Prompt on replace"), m_optionGrp);
+ m_promptOnReplace = new TQCheckBox(i18n("&Prompt on replace"), m_optionGrp);
m_promptOnReplace->setChecked( true );
optionsLayout->addWidget(m_caseSensitive, 0, 0);
@@ -192,13 +192,13 @@ void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool has
m_placeholders = 0L;
// signals and slots connections
- connect(m_selectedText, SIGNAL(toggled(bool)), this, SLOT(slotSelectedTextToggled(bool)));
- connect(m_regExp, SIGNAL(toggled(bool)), m_regExpItem, SLOT(setEnabled(bool)));
- connect(m_backRef, SIGNAL(toggled(bool)), m_backRefItem, SLOT(setEnabled(bool)));
- connect(m_regExpItem, SIGNAL(clicked()), this, SLOT(showPatterns()));
- connect(m_backRefItem, SIGNAL(clicked()), this, SLOT(showPlaceholders()));
+ connect(m_selectedText, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSelectedTextToggled(bool)));
+ connect(m_regExp, TQT_SIGNAL(toggled(bool)), m_regExpItem, TQT_SLOT(setEnabled(bool)));
+ connect(m_backRef, TQT_SIGNAL(toggled(bool)), m_backRefItem, TQT_SLOT(setEnabled(bool)));
+ connect(m_regExpItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPatterns()));
+ connect(m_backRefItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPlaceholders()));
- connect(m_find, SIGNAL(textChanged ( const QString & )),this, SLOT(textSearchChanged( const QString & )));
+ connect(m_find, TQT_SIGNAL(textChanged ( const TQString & )),this, TQT_SLOT(textSearchChanged( const TQString & )));
// tab order
setTabOrder(m_find, m_regExp);
@@ -228,7 +228,7 @@ void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool has
enableButtonOK( !pattern().isEmpty() );
if (forReplace)
{
- setButtonOK(KGuiItem( i18n("&Replace"), QString::null,
+ setButtonOK(KGuiItem( i18n("&Replace"), TQString::null,
i18n("Start replace"),
i18n("<qt>If you press the <b>Replace</b> button, the text you entered "
"above is searched for within the document and any occurrence is "
@@ -243,45 +243,45 @@ void KFindDialog::init(bool forReplace, const QStringList &findStrings, bool has
}
// QWhatsthis texts
- QWhatsThis::add ( m_find, i18n(
+ TQWhatsThis::add ( m_find, i18n(
"Enter a pattern to search for, or select a previous pattern from "
"the list.") );
- QWhatsThis::add ( m_regExp, i18n(
+ TQWhatsThis::add ( m_regExp, i18n(
"If enabled, search for a regular expression.") );
- QWhatsThis::add ( m_regExpItem, i18n(
+ TQWhatsThis::add ( m_regExpItem, i18n(
"Click here to edit your regular expression using a graphical editor.") );
- QWhatsThis::add ( m_replace, i18n(
+ TQWhatsThis::add ( m_replace, i18n(
"Enter a replacement string, or select a previous one from the list.") );
- QWhatsThis::add( m_backRef, i18n(
+ TQWhatsThis::add( m_backRef, i18n(
"<qt>If enabled, any occurrence of <code><b>\\N</b></code>, where "
"<code><b>N</b></code> is a integer number, will be replaced with "
"the corresponding capture (\"parenthesized substring\") from the "
"pattern.<p>To include (a literal <code><b>\\N</b></code> in your "
"replacement, put an extra backslash in front of it, like "
"<code><b>\\\\N</b></code>.</qt>") );
- QWhatsThis::add ( m_backRefItem, i18n(
+ TQWhatsThis::add ( m_backRefItem, i18n(
"Click for a menu of available captures.") );
- QWhatsThis::add ( m_wholeWordsOnly, i18n(
+ TQWhatsThis::add ( m_wholeWordsOnly, i18n(
"Require word boundaries in both ends of a match to succeed.") );
- QWhatsThis::add ( m_fromCursor, i18n(
+ TQWhatsThis::add ( m_fromCursor, i18n(
"Start searching at the current cursor location rather than at the top.") );
- QWhatsThis::add ( m_selectedText, i18n(
+ TQWhatsThis::add ( m_selectedText, i18n(
"Only search within the current selection.") );
- QWhatsThis::add ( m_caseSensitive, i18n(
+ TQWhatsThis::add ( m_caseSensitive, i18n(
"Perform a case sensitive search: entering the pattern "
"'Joe' will not match 'joe' or 'JOE', only 'Joe'.") );
- QWhatsThis::add ( m_findBackwards, i18n(
+ TQWhatsThis::add ( m_findBackwards, i18n(
"Search backwards.") );
- QWhatsThis::add ( m_promptOnReplace, i18n(
+ TQWhatsThis::add ( m_promptOnReplace, i18n(
"Ask before replacing each match found.") );
}
-void KFindDialog::textSearchChanged( const QString & text)
+void KFindDialog::textSearchChanged( const TQString & text)
{
enableButtonOK( !text.isEmpty() );
}
-void KFindDialog::showEvent( QShowEvent *e )
+void KFindDialog::showEvent( TQShowEvent *e )
{
if ( !d->m_initialShowDone )
{
@@ -289,11 +289,11 @@ void KFindDialog::showEvent( QShowEvent *e )
kdDebug() << "showEvent\n";
if (!d->findStrings.isEmpty())
setFindHistory(d->findStrings);
- d->findStrings = QStringList();
+ d->findStrings = TQStringList();
if (!d->pattern.isEmpty()) {
m_find->lineEdit()->setText( d->pattern );
m_find->lineEdit()->selectAll();
- d->pattern = QString::null;
+ d->pattern = TQString::null;
}
}
KDialogBase::showEvent(e);
@@ -318,12 +318,12 @@ long KFindDialog::options() const
return options;
}
-QString KFindDialog::pattern() const
+TQString KFindDialog::pattern() const
{
return m_find->currentText();
}
-void KFindDialog::setPattern (const QString &pattern)
+void KFindDialog::setPattern (const TQString &pattern)
{
m_find->lineEdit()->setText( pattern );
m_find->lineEdit()->selectAll();
@@ -331,7 +331,7 @@ void KFindDialog::setPattern (const QString &pattern)
kdDebug() << "setPattern " << pattern<<endl;
}
-void KFindDialog::setFindHistory(const QStringList &strings)
+void KFindDialog::setFindHistory(const TQStringList &strings)
{
if (strings.count() > 0)
{
@@ -423,7 +423,7 @@ void KFindDialog::showPatterns()
{
if ( !d->m_regexpDialogQueryDone )
{
- d->m_regexpDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this );
+ d->m_regexpDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this );
d->m_regexpDialogQueryDone = true;
}
@@ -433,7 +433,7 @@ void KFindDialog::showPatterns()
assert( iface );
iface->setRegExp( pattern() );
- if ( d->m_regexpDialog->exec() == QDialog::Accepted )
+ if ( d->m_regexpDialog->exec() == TQDialog::Accepted )
setPattern( iface->regExp() );
}
else // No complete regexp-editor available, bring up the old popupmenu
@@ -465,7 +465,7 @@ void KFindDialog::showPatterns()
// Populate the popup menu.
if (!m_patterns)
{
- m_patterns = new QPopupMenu(this);
+ m_patterns = new TQPopupMenu(this);
for (i = 0; (unsigned)i < sizeof(items) / sizeof(items[0]); i++)
{
m_patterns->insertItem(i18n(items[i].description), i, i);
@@ -476,7 +476,7 @@ void KFindDialog::showPatterns()
i = m_patterns->exec(m_regExpItem->mapToGlobal(m_regExpItem->rect().bottomLeft()));
if (i != -1)
{
- QLineEdit *editor = m_find->lineEdit();
+ TQLineEdit *editor = m_find->lineEdit();
editor->insert(items[i].regExp);
editor->setCursorPosition(editor->cursorPosition() + items[i].cursorAdjustment);
@@ -491,16 +491,16 @@ void KFindDialog::showPlaceholders()
// Populate the popup menu.
if (!m_placeholders)
{
- m_placeholders = new QPopupMenu(this);
- connect( m_placeholders, SIGNAL(aboutToShow()), this, SLOT(slotPlaceholdersAboutToShow()) );
+ m_placeholders = new TQPopupMenu(this);
+ connect( m_placeholders, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPlaceholdersAboutToShow()) );
}
// Insert the selection into the edit control.
int i = m_placeholders->exec(m_backRefItem->mapToGlobal(m_backRefItem->rect().bottomLeft()));
if (i != -1)
{
- QLineEdit *editor = m_replace->lineEdit();
- editor->insert( QString("\\%1").arg( i ) );
+ TQLineEdit *editor = m_replace->lineEdit();
+ editor->insert( TQString("\\%1").arg( i ) );
}
}
@@ -509,7 +509,7 @@ void KFindDialog::slotPlaceholdersAboutToShow()
m_placeholders->clear();
m_placeholders->insertItem( i18n("Complete Match"), 0 );
- QRegExp r( pattern() );
+ TQRegExp r( pattern() );
uint n = r.numCaptures();
for ( uint i=0; i < n; i++ )
m_placeholders->insertItem( i18n("Captured Text (%1)").arg( i+1 ), i+1 );
@@ -527,7 +527,7 @@ void KFindDialog::slotOk()
if (m_regExp->isChecked())
{
// Check for a valid regular expression.
- QRegExp regExp(pattern());
+ TQRegExp regExp(pattern());
if (!regExp.isValid())
{
diff --git a/kutils/kfinddialog.h b/kutils/kfinddialog.h
index ed63d5551..ebb9ff559 100644
--- a/kutils/kfinddialog.h
+++ b/kutils/kfinddialog.h
@@ -49,7 +49,7 @@ class QCheckBox;
*
* \code
* KFindDialog dlg(....)
- * if ( dlg.exec() != QDialog::Accepted )
+ * if ( dlg.exec() != TQDialog::Accepted )
* return;
*
* // proceed with KFind from here
@@ -62,7 +62,7 @@ class QCheckBox;
* else
* {
* m_findDia = new KFindDialog(false,...);
- * connect( m_findDia, SIGNAL(okClicked()), this, SLOT(findTextNext()) );
+ * connect( m_findDia, TQT_SIGNAL(okClicked()), this, TQT_SLOT(findTextNext()) );
* }
* \endcode
* Don't forget to delete and reset m_findDia when closed.
@@ -107,8 +107,8 @@ public:
* @param findStrings The find history, see findHistory()
* @param hasSelection Whether a selection exists
*/
- KFindDialog( QWidget *parent = 0, const char *name = 0, long options = 0,
- const QStringList &findStrings = QStringList(), bool hasSelection = false );
+ KFindDialog( TQWidget *parent = 0, const char *name = 0, long options = 0,
+ const TQStringList &findStrings = TQStringList(), bool hasSelection = false );
// KDE4: fix ambiguity with private constructor
// Maybe remove options (there's setOptions) and findStrings (setFindHistory) and hasSelection (setHasSelection)
@@ -122,8 +122,8 @@ public:
* @param findStrings The find history, see findHistory()
* @param hasSelection Whether a selection exists
*/
- KFindDialog( bool modal, QWidget *parent = 0, const char *name = 0, long options = 0,
- const QStringList &findStrings = QStringList(), bool hasSelection = false );
+ KFindDialog( bool modal, TQWidget *parent = 0, const char *name = 0, long options = 0,
+ const TQStringList &findStrings = TQStringList(), bool hasSelection = false );
// KDE4: consider simplifying
/**
@@ -139,7 +139,7 @@ public:
* @param history The find history.
* @see findHistory
*/
- void setFindHistory( const QStringList &history );
+ void setFindHistory( const TQStringList &history );
/**
* Returns the list of history items.
@@ -147,7 +147,7 @@ public:
* @return The find history.
* @see setFindHistory
*/
- QStringList findHistory() const;
+ TQStringList findHistory() const;
/**
* Enable/disable the 'search in selection' option, depending
@@ -227,22 +227,22 @@ public:
* Returns the pattern to find.
* @return The search text.
*/
- QString pattern() const;
+ TQString pattern() const;
/**
* Sets the pattern to find.
* @param pattern The new search pattern.
*/
- void setPattern ( const QString &pattern );
+ void setPattern ( const TQString &pattern );
/**
* Returns an empty widget which the user may fill with additional UI
* elements as required. The widget occupies the width of the dialog,
* and is positioned immediately below the regular expression support
* widgets for the pattern string.
- * @return An extensible QWidget.
+ * @return An extensible TQWidget.
*/
- QWidget *findExtension();
+ TQWidget *findExtension();
protected slots:
@@ -250,10 +250,10 @@ protected slots:
void slotSelectedTextToggled(bool);
void showPatterns();
void showPlaceholders();
- void textSearchChanged( const QString &);
+ void textSearchChanged( const TQString &);
protected:
- virtual void showEvent ( QShowEvent * );
+ virtual void showEvent ( TQShowEvent * );
private slots:
/**
@@ -264,22 +264,22 @@ private slots:
private:
- QGroupBox *m_findGrp;
- QLabel *m_findLabel;
+ TQGroupBox *m_findGrp;
+ TQLabel *m_findLabel;
KHistoryCombo *m_find;
- QCheckBox *m_regExp;
- QPushButton *m_regExpItem;
- QGridLayout *m_findLayout;
- QWidget *m_findExtension;
+ TQCheckBox *m_regExp;
+ TQPushButton *m_regExpItem;
+ TQGridLayout *m_findLayout;
+ TQWidget *m_findExtension;
- QGroupBox *m_optionGrp;
- QCheckBox *m_wholeWordsOnly;
- QCheckBox *m_fromCursor;
- QCheckBox *m_selectedText;
- QCheckBox *m_caseSensitive;
- QCheckBox *m_findBackwards;
+ TQGroupBox *m_optionGrp;
+ TQCheckBox *m_wholeWordsOnly;
+ TQCheckBox *m_fromCursor;
+ TQCheckBox *m_selectedText;
+ TQCheckBox *m_caseSensitive;
+ TQCheckBox *m_findBackwards;
- QPopupMenu *m_patterns;
+ TQPopupMenu *m_patterns;
// Our dirty little secret is that we also implement the "replace" dialog. But we
// keep that fact hidden from all but our friends.
@@ -292,20 +292,20 @@ private:
*
* @param forReplace Is this a replace dialog?
*/
- KFindDialog( QWidget *parent, const char *name, bool forReplace );
- void init( bool forReplace, const QStringList &findStrings, bool hasSelection );
+ KFindDialog( TQWidget *parent, const char *name, bool forReplace );
+ void init( bool forReplace, const TQStringList &findStrings, bool hasSelection );
- QGroupBox *m_replaceGrp;
- QLabel *m_replaceLabel;
+ TQGroupBox *m_replaceGrp;
+ TQLabel *m_replaceLabel;
KHistoryCombo *m_replace;
- QCheckBox* m_backRef;
- QPushButton* m_backRefItem;
- QGridLayout *m_replaceLayout;
- QWidget *m_replaceExtension;
+ TQCheckBox* m_backRef;
+ TQPushButton* m_backRefItem;
+ TQGridLayout *m_replaceLayout;
+ TQWidget *m_replaceExtension;
- QCheckBox* m_promptOnReplace;
+ TQCheckBox* m_promptOnReplace;
- QPopupMenu *m_placeholders;
+ TQPopupMenu *m_placeholders;
// Binary compatible extensibility.
class KFindDialogPrivate;
diff --git a/kutils/kmultitabbar.cpp b/kutils/kmultitabbar.cpp
index 18a123717..a9b648736 100644
--- a/kutils/kmultitabbar.cpp
+++ b/kutils/kmultitabbar.cpp
@@ -26,28 +26,28 @@
#include "kmultitabbar.moc"
#include "kmultitabbar_p.h"
#include "kmultitabbar_p.moc"
-#include <qbutton.h>
-#include <qpopupmenu.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qfontmetrics.h>
-#include <qstyle.h>
+#include <tqbutton.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqfontmetrics.h>
+#include <tqstyle.h>
#include <kiconloader.h>
#include <kdebug.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include <math.h>
#define NEARBYINT(i) ((int(float(i) + 0.5)))
class KMultiTabBarTabPrivate {
public:
- QPixmap pix;
+ TQPixmap pix;
};
-KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMultiTabBarMode bm):QScrollView(parent)
+KMultiTabBarInternal::KMultiTabBarInternal(TQWidget *parent, KMultiTabBar::KMultiTabBarMode bm):TQScrollView(parent)
{
m_expandedTabSize=-1;
m_showActiveTabTexts=false;
@@ -57,16 +57,16 @@ KMultiTabBarInternal::KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMulti
setVScrollBarMode(AlwaysOff);
if (bm==KMultiTabBar::Vertical)
{
- box=new QWidget(viewport());
- mainLayout=new QVBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQVBoxLayout(box);
mainLayout->setAutoAdd(true);
box->setFixedWidth(24);
setFixedWidth(24);
}
else
{
- box=new QWidget(viewport());
- mainLayout=new QHBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQHBoxLayout(box);
mainLayout->setAutoAdd(true);
box->setFixedHeight(24);
setFixedHeight(24);
@@ -92,15 +92,15 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style)
} else if (mainLayout==0) {
if (m_barMode==KMultiTabBar::Vertical)
{
- box=new QWidget(viewport());
- mainLayout=new QVBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQVBoxLayout(box);
box->setFixedWidth(24);
setFixedWidth(24);
}
else
{
- box=new QWidget(viewport());
- mainLayout=new QHBoxLayout(box);
+ box=new TQWidget(viewport());
+ mainLayout=new TQHBoxLayout(box);
box->setFixedHeight(24);
setFixedHeight(24);
}
@@ -113,9 +113,9 @@ void KMultiTabBarInternal::setStyle(enum KMultiTabBar::KMultiTabBarStyle style)
viewport()->repaint();
}
-void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy, int clipw, int cliph )
+void KMultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clipy, int clipw, int cliph )
{
- QScrollView::drawContents (paint , clipx, clipy, clipw, cliph );
+ TQScrollView::drawContents (paint , clipx, clipy, clipw, cliph );
if (m_position==KMultiTabBar::Right)
{
@@ -159,12 +159,12 @@ void KMultiTabBarInternal::drawContents ( QPainter * paint, int clipx, int clipy
}
-void KMultiTabBarInternal::contentsMousePressEvent(QMouseEvent *ev)
+void KMultiTabBarInternal::contentsMousePressEvent(TQMouseEvent *ev)
{
ev->ignore();
}
-void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev)
+void KMultiTabBarInternal::mousePressEvent(TQMouseEvent *ev)
{
ev->ignore();
}
@@ -186,11 +186,11 @@ void KMultiTabBarInternal::mousePressEvent(QMouseEvent *ev)
} else {diff=0; }
-void KMultiTabBarInternal::resizeEvent(QResizeEvent *ev) {
+void KMultiTabBarInternal::resizeEvent(TQResizeEvent *ev) {
/* kdDebug()<<"KMultiTabBarInternal::resizeEvent"<<endl;
kdDebug()<<"KMultiTabBarInternal::resizeEvent - box geometry"<<box->geometry()<<endl;
kdDebug()<<"KMultiTabBarInternal::resizeEvent - geometry"<<geometry()<<endl;*/
- if (ev) QScrollView::resizeEvent(ev);
+ if (ev) TQScrollView::resizeEvent(ev);
if ( (m_style==KMultiTabBar::KDEV3) ||
(m_style==KMultiTabBar::KDEV3ICON) ){
@@ -328,18 +328,18 @@ void KMultiTabBarInternal::showActiveTabTexts(bool show)
KMultiTabBarTab* KMultiTabBarInternal::tab(int id) const
{
- for (QPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarTab> it(m_tabs);it.current();++it){
if (it.current()->id()==id) return it.current();
}
return 0;
}
-bool KMultiTabBarInternal::eventFilter(QObject *, QEvent *e) {
- if (e->type()==QEvent::Resize) resizeEvent(0);
+bool KMultiTabBarInternal::eventFilter(TQObject *, TQEvent *e) {
+ if (e->type()==TQEvent::Resize) resizeEvent(0);
return false;
}
-int KMultiTabBarInternal::appendTab(const QPixmap &pic ,int id,const QString& text)
+int KMultiTabBarInternal::appendTab(const TQPixmap &pic ,int id,const TQString& text)
{
KMultiTabBarTab *tab;
m_tabs.append(tab= new KMultiTabBarTab(pic,text,id,box,m_position,m_style));
@@ -381,9 +381,9 @@ void KMultiTabBarInternal::setPosition(enum KMultiTabBar::KMultiTabBarPosition p
viewport()->repaint();
}
-KMultiTabBarButton::KMultiTabBarButton(const QPixmap& pic,const QString& text, QPopupMenu *popup,
- int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
- :QPushButton(QIconSet(),text,parent),m_style(style)
+KMultiTabBarButton::KMultiTabBarButton(const TQPixmap& pic,const TQString& text, TQPopupMenu *popup,
+ int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
+ :TQPushButton(TQIconSet(),text,parent),m_style(style)
{
setIconSet(pic);
setText(text);
@@ -393,13 +393,13 @@ KMultiTabBarButton::KMultiTabBarButton(const QPixmap& pic,const QString& text, Q
setFixedHeight(24);
setFixedWidth(24);
m_id=id;
- QToolTip::add(this,text);
- connect(this,SIGNAL(clicked()),this,SLOT(slotClicked()));
+ TQToolTip::add(this,text);
+ connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked()));
}
-KMultiTabBarButton::KMultiTabBarButton(const QString& text, QPopupMenu *popup,
- int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
- :QPushButton(QIconSet(),text,parent),m_style(style)
+KMultiTabBarButton::KMultiTabBarButton(const TQString& text, TQPopupMenu *popup,
+ int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style)
+ :TQPushButton(TQIconSet(),text,parent),m_style(style)
{
setText(text);
m_position=pos;
@@ -408,8 +408,8 @@ KMultiTabBarButton::KMultiTabBarButton(const QString& text, QPopupMenu *popup,
setFixedHeight(24);
setFixedWidth(24);
m_id=id;
- QToolTip::add(this,text);
- connect(this,SIGNAL(clicked()),this,SLOT(slotClicked()));
+ TQToolTip::add(this,text);
+ connect(this,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClicked()));
}
KMultiTabBarButton::~KMultiTabBarButton() {
@@ -419,11 +419,11 @@ int KMultiTabBarButton::id() const{
return m_id;
}
-void KMultiTabBarButton::setText(const QString& text)
+void KMultiTabBarButton::setText(const TQString& text)
{
- QPushButton::setText(text);
+ TQPushButton::setText(text);
m_text=text;
- QToolTip::add(this,text);
+ TQToolTip::add(this,text);
}
void KMultiTabBarButton::slotClicked()
@@ -443,20 +443,20 @@ void KMultiTabBarButton::setStyle(KMultiTabBar::KMultiTabBarStyle style)
repaint();
}
-void KMultiTabBarButton::hideEvent( QHideEvent* he) {
- QPushButton::hideEvent(he);
+void KMultiTabBarButton::hideEvent( TQHideEvent* he) {
+ TQPushButton::hideEvent(he);
KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
if (tb) tb->updateSeparator();
}
-void KMultiTabBarButton::showEvent( QShowEvent* he) {
- QPushButton::showEvent(he);
+void KMultiTabBarButton::showEvent( TQShowEvent* he) {
+ TQPushButton::showEvent(he);
KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
if (tb) tb->updateSeparator();
}
-QSize KMultiTabBarButton::sizeHint() const
+TQSize KMultiTabBarButton::sizeHint() const
{
constPolish();
@@ -465,39 +465,39 @@ QSize KMultiTabBarButton::sizeHint() const
// calculate contents size...
#ifndef QT_NO_ICONSET
if ( iconSet() && !iconSet()->isNull() ) {
- int iw = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4;
- int ih = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).height();
+ int iw = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
+ int ih = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).height();
w += iw;
h = QMAX( h, ih );
}
#endif
if ( isMenuButton() )
- w += style().pixelMetric(QStyle::PM_MenuButtonIndicator, this);
+ w += style().pixelMetric(TQStyle::PM_MenuButtonIndicator, this);
if ( pixmap() ) {
- QPixmap *pm = (QPixmap *)pixmap();
+ TQPixmap *pm = (TQPixmap *)pixmap();
w += pm->width();
h += pm->height();
} else {
- QString s( text() );
+ TQString s( text() );
bool empty = s.isEmpty();
if ( empty )
- s = QString::fromLatin1("XXXX");
- QFontMetrics fm = fontMetrics();
- QSize sz = fm.size( ShowPrefix, s );
+ s = TQString::fromLatin1("XXXX");
+ TQFontMetrics fm = fontMetrics();
+ TQSize sz = fm.size( ShowPrefix, s );
if(!empty || !w)
w += sz.width();
if(!empty || !h)
h = QMAX(h, sz.height());
}
- return (style().sizeFromContents(QStyle::CT_ToolButton, this, QSize(w, h)).
- expandedTo(QApplication::globalStrut()));
+ return (style().sizeFromContents(TQStyle::CT_ToolButton, this, TQSize(w, h)).
+ expandedTo(TQApplication::globalStrut()));
}
-KMultiTabBarTab::KMultiTabBarTab(const QPixmap& pic, const QString& text,
- int id,QWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,
+KMultiTabBarTab::KMultiTabBarTab(const TQPixmap& pic, const TQString& text,
+ int id,TQWidget *parent,KMultiTabBar::KMultiTabBarPosition pos,
KMultiTabBar::KMultiTabBarStyle style)
:KMultiTabBarButton(text,0,id,parent,pos,style),
m_showActiveTabText(false)
@@ -517,7 +517,7 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos)
{
if ((pos!=m_position) && ((pos==KMultiTabBar::Left) || (pos==KMultiTabBar::Right))) {
if (!d->pix.isNull()) {
- QWMatrix temp;// (1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F);
+ TQWMatrix temp;// (1.0F, 0.0F, 0.0F, -1.0F, 0.0F, 0.0F);
temp.rotate(180);
d->pix=d->pix.xForm(temp);
setIconSet(d->pix);
@@ -528,23 +528,23 @@ void KMultiTabBarTab::setTabsPosition(KMultiTabBar::KMultiTabBarPosition pos)
// repaint();
}
-void KMultiTabBarTab::setIcon(const QString& icon)
+void KMultiTabBarTab::setIcon(const TQString& icon)
{
- QPixmap pic=SmallIcon(icon);
+ TQPixmap pic=SmallIcon(icon);
setIcon(pic);
}
-void KMultiTabBarTab::setIcon(const QPixmap& icon)
+void KMultiTabBarTab::setIcon(const TQPixmap& icon)
{
if (m_style!=KMultiTabBar::KDEV3) {
if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right)) {
- QWMatrix rotateMatrix;
+ TQWMatrix rotateMatrix;
if (m_position==KMultiTabBar::Left)
rotateMatrix.rotate(90);
else
rotateMatrix.rotate(-90);
- QPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW
+ TQPixmap pic=icon.xForm(rotateMatrix); //TODO FIX THIS, THIS SHOWS WINDOW
d->pix=pic;
setIconSet(pic);
} else setIconSet(icon);
@@ -568,10 +568,10 @@ void KMultiTabBarTab::updateState()
if (m_style!=KMultiTabBar::KONQSBC) {
if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
- QPushButton::setText(m_text);
+ TQPushButton::setText(m_text);
} else {
- kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty QString***************"<<endl;
- QPushButton::setText(QString::null);
+ kdDebug()<<"KMultiTabBarTab::updateState(): setting text to an empty TQString***************"<<endl;
+ TQPushButton::setText(TQString::null);
}
if ((m_position==KMultiTabBar::Right || m_position==KMultiTabBar::Left)) {
@@ -597,13 +597,13 @@ void KMultiTabBarTab::updateState()
else
setFixedWidth(m_expandedSize);
}
- QApplication::sendPostedEvents(0,QEvent::Paint | QEvent::Move | QEvent::Resize | QEvent::LayoutHint);
- QApplication::flush();
+ TQApplication::sendPostedEvents(0,TQEvent::Paint | TQEvent::Move | TQEvent::Resize | TQEvent::LayoutHint);
+ TQApplication::flush();
}
int KMultiTabBarTab::neededSize()
{
- return (((m_style!=KMultiTabBar::KDEV3)?24:0)+QFontMetrics(QFont()).width(m_text)+6);
+ return (((m_style!=KMultiTabBar::KDEV3)?24:0)+TQFontMetrics(TQFont()).width(m_text)+6);
}
void KMultiTabBarTab::setSize(int size)
@@ -617,41 +617,41 @@ void KMultiTabBarTab::showActiveTabText(bool show)
m_showActiveTabText=show;
}
-void KMultiTabBarTab::drawButtonLabel(QPainter *p) {
+void KMultiTabBarTab::drawButtonLabel(TQPainter *p) {
drawButton(p);
}
-void KMultiTabBarTab::drawButton(QPainter *paint)
+void KMultiTabBarTab::drawButton(TQPainter *paint)
{
if (m_style!=KMultiTabBar::KONQSBC) drawButtonStyled(paint);
else drawButtonClassic(paint);
}
-void KMultiTabBarTab::drawButtonStyled(QPainter *paint) {
+void KMultiTabBarTab::drawButtonStyled(TQPainter *paint) {
- QSize sh;
+ TQSize sh;
const int width = 36; // rotated
const int height = 24;
if ((m_style==KMultiTabBar::KDEV3) || (m_style==KMultiTabBar::KDEV3ICON) || (isOn())) {
if ((m_position==KMultiTabBar::Left) || (m_position==KMultiTabBar::Right))
- sh=QSize(this->height(),this->width());//KMultiTabBarButton::sizeHint();
- else sh=QSize(this->width(),this->height());
+ sh=TQSize(this->height(),this->width());//KMultiTabBarButton::sizeHint();
+ else sh=TQSize(this->width(),this->height());
}
else
- sh=QSize(width,height);
+ sh=TQSize(width,height);
- QPixmap pixmap( sh.width(),height); ///,sh.height());
+ TQPixmap pixmap( sh.width(),height); ///,sh.height());
pixmap.fill(eraseColor());
- QPainter painter(&pixmap);
+ TQPainter painter(&pixmap);
- QStyle::SFlags st=QStyle::Style_Default;
+ TQStyle::SFlags st=TQStyle::Style_Default;
- st|=QStyle::Style_Enabled;
+ st|=TQStyle::Style_Enabled;
- if (isOn()) st|=QStyle::Style_On;
+ if (isOn()) st|=TQStyle::Style_On;
- style().drawControl(QStyle::CE_PushButton,&painter,this, QRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
- style().drawControl(QStyle::CE_PushButtonLabel,&painter,this, QRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
+ style().drawControl(TQStyle::CE_PushButton,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
+ style().drawControl(TQStyle::CE_PushButtonLabel,&painter,this, TQRect(0,0,pixmap.width(),pixmap.height()), colorGroup(),st);
switch (m_position) {
case KMultiTabBar::Left:
@@ -667,17 +667,17 @@ void KMultiTabBarTab::drawButtonStyled(QPainter *paint) {
paint->drawPixmap(0,0,pixmap);
break;
}
-// style().drawControl(QStyle::CE_PushButtonLabel,painter,this, QRect(0,0,pixmap.width(),pixmap.height()),
-// colorGroup(),QStyle::Style_Enabled);
+// style().drawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()),
+// colorGroup(),TQStyle::Style_Enabled);
}
-void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
+void KMultiTabBarTab::drawButtonClassic(TQPainter *paint)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if ( iconSet())
- pixmap = iconSet()->pixmap( QIconSet::Small, QIconSet::Normal );
+ pixmap = iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal );
paint->fillRect(0, 0, 24, 24, colorGroup().background());
if (!isOn())
@@ -685,7 +685,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
if (m_position==KMultiTabBar::Right)
{
- paint->fillRect(0,0,21,21,QBrush(colorGroup().background()));
+ paint->fillRect(0,0,21,21,TQBrush(colorGroup().background()));
paint->setPen(colorGroup().background().dark(150));
paint->drawLine(0,22,23,22);
@@ -701,7 +701,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
else
if ((m_position==KMultiTabBar::Bottom) || (m_position==KMultiTabBar::Top))
{
- paint->fillRect(0,1,23,22,QBrush(colorGroup().background()));
+ paint->fillRect(0,1,23,22,TQBrush(colorGroup().background()));
paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
@@ -722,7 +722,7 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
{
paint->setPen(colorGroup().background().dark(120));
paint->drawLine(0,23,23,23);
- paint->fillRect(0,0,23,21,QBrush(colorGroup().background()));
+ paint->fillRect(0,0,23,21,TQBrush(colorGroup().background()));
paint->drawPixmap(12-pixmap.width()/2,12-pixmap.height()/2,pixmap);
paint->setPen(colorGroup().light());
@@ -745,20 +745,20 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
paint->drawLine(0,height()-2,23,height()-2);
paint->drawLine(23,0,23,height()-1);
paint->drawLine(22,0,22,height()-1);
- paint->fillRect(0,0,21,height()-3,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,21,height()-3,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
if (height()<25+4) return;
- QPixmap tpixmap(height()-25-3, width()-2);
- QPainter painter(&tpixmap);
+ TQPixmap tpixmap(height()-25-3, width()-2);
+ TQPainter painter(&tpixmap);
- painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light()));
+ painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light()));
painter.setPen(colorGroup().text());
- painter.drawText(0,+width()/2+QFontMetrics(QFont()).height()/2,m_text);
+ painter.drawText(0,+width()/2+TQFontMetrics(TQFont()).height()/2,m_text);
paint->rotate(90);
kdDebug()<<"tpixmap.width:"<<tpixmap.width()<<endl;
@@ -769,12 +769,12 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
else
if (m_position==KMultiTabBar::Top)
{
- paint->fillRect(0,0,width()-1,23,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,width()-1,23,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
paint->setPen(colorGroup().text());
- paint->drawText(25,height()/2+QFontMetrics(QFont()).height()/2,m_text);
+ paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text);
}
}
else
@@ -783,12 +783,12 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
paint->setPen(colorGroup().shadow());
paint->drawLine(0,23,width()-1,23);
paint->drawLine(0,22,width()-1,22);
- paint->fillRect(0,0,width()-1,21,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,width()-1,21,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
paint->setPen(colorGroup().text());
- paint->drawText(25,height()/2+QFontMetrics(QFont()).height()/2,m_text);
+ paint->drawText(25,height()/2+TQFontMetrics(TQFont()).height()/2,m_text);
}
}
@@ -799,20 +799,20 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
paint->setPen(colorGroup().shadow());
paint->drawLine(0,height()-1,23,height()-1);
paint->drawLine(0,height()-2,23,height()-2);
- paint->fillRect(0,0,23,height()-3,QBrush(colorGroup().light()));
+ paint->fillRect(0,0,23,height()-3,TQBrush(colorGroup().light()));
paint->drawPixmap(10-pixmap.width()/2,10-pixmap.height()/2,pixmap);
if (m_showActiveTabText)
{
if (height()<25+4) return;
- QPixmap tpixmap(height()-25-3, width()-2);
- QPainter painter(&tpixmap);
+ TQPixmap tpixmap(height()-25-3, width()-2);
+ TQPainter painter(&tpixmap);
- painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),QBrush(colorGroup().light()));
+ painter.fillRect(0,0,tpixmap.width(),tpixmap.height(),TQBrush(colorGroup().light()));
painter.setPen(colorGroup().text());
- painter.drawText(tpixmap.width()-QFontMetrics(QFont()).width(m_text),+width()/2+QFontMetrics(QFont()).height()/2,m_text);
+ painter.drawText(tpixmap.width()-TQFontMetrics(TQFont()).width(m_text),+width()/2+TQFontMetrics(TQFont()).height()/2,m_text);
paint->rotate(-90);
kdDebug()<<"tpixmap.width:"<<tpixmap.width()<<endl;
@@ -832,19 +832,19 @@ void KMultiTabBarTab::drawButtonClassic(QPainter *paint)
-KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name):QWidget(parent,name)
+KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, TQWidget *parent,const char *name):TQWidget(parent,name)
{
m_buttons.setAutoDelete(false);
if (bm==Vertical)
{
- m_l=new QVBoxLayout(this);
- setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding, true);
+ m_l=new TQVBoxLayout(this);
+ setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding, true);
// setFixedWidth(24);
}
else
{
- m_l=new QHBoxLayout(this);
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed, true);
+ m_l=new TQHBoxLayout(this);
+ setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed, true);
// setFixedHeight(24);
}
m_l->setMargin(0);
@@ -856,9 +856,9 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name
// setStyle(KDEV3);
//setStyle(KONQSBC);
m_l->insertWidget(0,m_internal);
- m_l->insertWidget(0,m_btnTabSep=new QFrame(this));
+ m_l->insertWidget(0,m_btnTabSep=new TQFrame(this));
m_btnTabSep->setFixedHeight(4);
- m_btnTabSep->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+ m_btnTabSep->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
m_btnTabSep->setLineWidth(2);
m_btnTabSep->hide();
@@ -868,16 +868,16 @@ KMultiTabBar::KMultiTabBar(KMultiTabBarMode bm, QWidget *parent,const char *name
KMultiTabBar::~KMultiTabBar() {
}
-/*int KMultiTabBar::insertButton(QPixmap pic,int id ,const QString&)
+/*int KMultiTabBar::insertButton(TQPixmap pic,int id ,const TQString&)
{
(new KToolbarButton(pic,id,m_internal))->show();
return 0;
}*/
-int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,const QString&)
+int KMultiTabBar::appendButton(const TQPixmap &pic ,int id,TQPopupMenu *popup,const TQString&)
{
KMultiTabBarButton *btn;
- m_buttons.append(btn= new KMultiTabBarButton(pic,QString::null,
+ m_buttons.append(btn= new KMultiTabBarButton(pic,TQString::null,
popup,id,this,m_position,m_internal->m_style));
m_l->insertWidget(0,btn);
btn->show();
@@ -887,7 +887,7 @@ int KMultiTabBar::appendButton(const QPixmap &pic ,int id,QPopupMenu *popup,cons
void KMultiTabBar::updateSeparator() {
bool hideSep=true;
- for (QPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
if (it.current()->isVisibleTo(this)) {
hideSep=false;
break;
@@ -898,7 +898,7 @@ void KMultiTabBar::updateSeparator() {
}
-int KMultiTabBar::appendTab(const QPixmap &pic ,int id ,const QString& text)
+int KMultiTabBar::appendTab(const TQPixmap &pic ,int id ,const TQString& text)
{
m_internal->appendTab(pic,id,text);
return 0;
@@ -906,7 +906,7 @@ int KMultiTabBar::appendTab(const QPixmap &pic ,int id ,const QString& text)
KMultiTabBarButton* KMultiTabBar::button(int id) const
{
- for (QPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
+ for (TQPtrListIterator<KMultiTabBarButton> it(m_buttons);it.current();++it){
if (it.current()->id()==id) return it.current();
}
return 0;
@@ -985,13 +985,13 @@ KMultiTabBar::KMultiTabBarPosition KMultiTabBar::position() const
{
return m_position;
}
-void KMultiTabBar::fontChange(const QFont& /* oldFont */)
+void KMultiTabBar::fontChange(const TQFont& /* oldFont */)
{
for (uint i=0;i<tabs()->count();i++)
tabs()->at(i)->resize();
repaint();
}
-QPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();}
-QPtrList<KMultiTabBarButton>* KMultiTabBar::buttons() {return &m_buttons;}
+TQPtrList<KMultiTabBarTab>* KMultiTabBar::tabs() {return m_internal->tabs();}
+TQPtrList<KMultiTabBarButton>* KMultiTabBar::buttons() {return &m_buttons;}
diff --git a/kutils/kmultitabbar.h b/kutils/kmultitabbar.h
index 8d9a95449..6405b9e5d 100644
--- a/kutils/kmultitabbar.h
+++ b/kutils/kmultitabbar.h
@@ -25,13 +25,13 @@
#ifndef _KMultitabbar_h_
#define _KMultitabbar_h_
-#include <qscrollview.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
+#include <tqscrollview.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
#include <kdelibs_export.h>
@@ -92,7 +92,7 @@ public:
* @param parent The parent widget
* @param name The widget's name
*/
- KMultiTabBar(KMultiTabBarMode bm,QWidget *parent=0,const char *name=0);
+ KMultiTabBar(KMultiTabBarMode bm,TQWidget *parent=0,const char *name=0);
/**
* Destructor.
@@ -108,7 +108,7 @@ public:
* @param popup A popup menu which should be displayed if the button is clicked
* @param not_used_yet will be used for a popup text in the future
*/
- int appendButton(const QPixmap &pic,int id=-1,QPopupMenu* popup=0,const QString& not_used_yet=QString::null);
+ int appendButton(const TQPixmap &pic,int id=-1,TQPopupMenu* popup=0,const TQString& not_used_yet=TQString::null);
/**
* remove a button with the given ID
*/
@@ -120,7 +120,7 @@ public:
* @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint
* @return Always zero. Can be safely ignored.
*/
- int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString::null);
+ int appendTab(const TQPixmap &pic,int id=-1,const TQString& text=TQString::null);
/**
* remove a tab with a given ID
* @param id The ID of the tab to remove
@@ -172,13 +172,13 @@ public:
* @return The list of tabs.
* @warning be careful, don't delete tabs yourself and don't delete the list itself
*/
- QPtrList<KMultiTabBarTab>* tabs();
+ TQPtrList<KMultiTabBarTab>* tabs();
/**
* Returns the list of pointers to the tab buttons of type KMultiTabBarButton.
* @return The list of tab buttons.
* @warning be careful, don't delete buttons yourself and don't delete the list itself
*/
- QPtrList<KMultiTabBarButton>* buttons();
+ TQPtrList<KMultiTabBarButton>* buttons();
/**
* might vanish, not sure yet
@@ -186,13 +186,13 @@ public:
void showActiveTabTexts(bool show=true);
protected:
friend class KMultiTabBarButton;
- virtual void fontChange( const QFont& );
+ virtual void fontChange( const TQFont& );
void updateSeparator();
private:
class KMultiTabBarInternal *m_internal;
- QBoxLayout *m_l;
- QFrame *m_btnTabSep;
- QPtrList<KMultiTabBarButton> m_buttons;
+ TQBoxLayout *m_l;
+ TQFrame *m_btnTabSep;
+ TQPtrList<KMultiTabBarButton> m_buttons;
KMultiTabBarPosition m_position;
KMultiTabBarPrivate *d;
};
@@ -207,11 +207,11 @@ class KUTILS_EXPORT KMultiTabBarButton: public QPushButton
Q_OBJECT
public:
/** @internal */
- KMultiTabBarButton(const QPixmap& pic,const QString&, QPopupMenu *popup,
- int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
+ KMultiTabBarButton(const TQPixmap& pic,const TQString&, TQPopupMenu *popup,
+ int id,TQWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
/** @internal */
- KMultiTabBarButton(const QString&, QPopupMenu *popup,
- int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
+ KMultiTabBarButton(const TQString&, TQPopupMenu *popup,
+ int id,TQWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
/**
* Destructor
*/
@@ -237,16 +237,16 @@ public slots:
/**
* modify the text of the button
*/
- void setText(const QString &);
+ void setText(const TQString &);
- QSize sizeHint() const;
+ TQSize sizeHint() const;
protected:
KMultiTabBar::KMultiTabBarPosition m_position;
KMultiTabBar::KMultiTabBarStyle m_style;
- QString m_text;
- virtual void hideEvent( class QHideEvent*);
- virtual void showEvent( class QShowEvent*);
+ TQString m_text;
+ virtual void hideEvent( class TQHideEvent*);
+ virtual void showEvent( class TQShowEvent*);
private:
int m_id;
KMultiTabBarButtonPrivate *d;
@@ -270,7 +270,7 @@ class KUTILS_EXPORT KMultiTabBarTab: public KMultiTabBarButton
Q_OBJECT
public:
/** @internal */
- KMultiTabBarTab(const QPixmap& pic,const QString&,int id,QWidget *parent,
+ KMultiTabBarTab(const TQPixmap& pic,const TQString&,int id,TQWidget *parent,
KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style);
/**
* Destructor.
@@ -300,17 +300,17 @@ protected:
void setSize(int);
int neededSize();
void updateState();
- virtual void drawButton(QPainter *);
- virtual void drawButtonLabel(QPainter *);
- void drawButtonStyled(QPainter *);
- void drawButtonClassic(QPainter *);
+ virtual void drawButton(TQPainter *);
+ virtual void drawButtonLabel(TQPainter *);
+ void drawButtonStyled(TQPainter *);
+ void drawButtonClassic(TQPainter *);
protected slots:
virtual void slotClicked();
void setTabsPosition(KMultiTabBar::KMultiTabBarPosition);
public slots:
- virtual void setIcon(const QString&);
- virtual void setIcon(const QPixmap&);
+ virtual void setIcon(const TQString&);
+ virtual void setIcon(const TQPixmap&);
};
#endif
diff --git a/kutils/kmultitabbar_p.h b/kutils/kmultitabbar_p.h
index f47cc5385..e48200160 100644
--- a/kutils/kmultitabbar_p.h
+++ b/kutils/kmultitabbar_p.h
@@ -24,26 +24,26 @@
#ifndef K_MULTI_TAB_BAR_P_H
#define K_MULTI_TAB_BAR_P_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <kmultitabbar.h>
class KMultiTabBarInternal: public QScrollView
{
Q_OBJECT
public:
- KMultiTabBarInternal(QWidget *parent,KMultiTabBar::KMultiTabBarMode bm);
- int appendTab(const QPixmap &,int=-1,const QString& =QString::null);
+ KMultiTabBarInternal(TQWidget *parent,KMultiTabBar::KMultiTabBarMode bm);
+ int appendTab(const TQPixmap &,int=-1,const TQString& =TQString::null);
KMultiTabBarTab *tab(int) const;
void removeTab(int);
void setPosition(enum KMultiTabBar::KMultiTabBarPosition pos);
void setStyle(enum KMultiTabBar::KMultiTabBarStyle style);
void showActiveTabTexts(bool show);
- QPtrList<KMultiTabBarTab>* tabs(){return &m_tabs;}
+ TQPtrList<KMultiTabBarTab>* tabs(){return &m_tabs;}
private:
friend class KMultiTabBar;
- QWidget *box;
- QBoxLayout *mainLayout;
- QPtrList<KMultiTabBarTab> m_tabs;
+ TQWidget *box;
+ TQBoxLayout *mainLayout;
+ TQPtrList<KMultiTabBarTab> m_tabs;
enum KMultiTabBar::KMultiTabBarPosition m_position;
bool m_showActiveTabTexts;
enum KMultiTabBar::KMultiTabBarStyle m_style;
@@ -51,17 +51,17 @@ private:
int m_lines;
KMultiTabBar::KMultiTabBarMode m_barMode;
protected:
- virtual bool eventFilter(QObject *,QEvent*);
- virtual void drawContents ( QPainter *, int, int, int, int);
+ virtual bool eventFilter(TQObject *,TQEvent*);
+ virtual void drawContents ( TQPainter *, int, int, int, int);
/**
* [contentsM|m]ousePressEvent are reimplemented from QScrollView
* in order to ignore all mouseEvents on the viewport, so that the
* parent can handle them.
*/
- virtual void contentsMousePressEvent(QMouseEvent *);
- virtual void mousePressEvent(QMouseEvent *);
- virtual void resizeEvent(QResizeEvent *);
+ virtual void contentsMousePressEvent(TQMouseEvent *);
+ virtual void mousePressEvent(TQMouseEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
};
#endif
diff --git a/kutils/kplugininfo.cpp b/kutils/kplugininfo.cpp
index 4b80aa776..a441fb756 100644
--- a/kutils/kplugininfo.cpp
+++ b/kutils/kplugininfo.cpp
@@ -43,38 +43,38 @@ class KPluginInfo::KPluginInfoPrivate
delete config;
}
- QString specfile; // the filename of the file containing all the info
- QString name;
- QString comment;
- QString icon;
- QString author;
- QString email;
- QString pluginName; // the name attribute in the .rc file
- QString version;
- QString website; // URL to the website of the plugin/author
- QString category;
- QString license;
- QStringList dependencies;
+ TQString specfile; // the filename of the file containing all the info
+ TQString name;
+ TQString comment;
+ TQString icon;
+ TQString author;
+ TQString email;
+ TQString pluginName; // the name attribute in the .rc file
+ TQString version;
+ TQString website; // URL to the website of the plugin/author
+ TQString category;
+ TQString license;
+ TQStringList dependencies;
bool hidden;
bool enabledbydefault;
bool pluginenabled;
KConfig * config;
- QString configgroup;
+ TQString configgroup;
KService::Ptr service;
- QValueList<KService::Ptr> kcmservices;
+ TQValueList<KService::Ptr> kcmservices;
bool kcmservicesCached;
};
-KPluginInfo::KPluginInfo( const QString & filename, const char* resource )
+KPluginInfo::KPluginInfo( const TQString & filename, const char* resource )
: d( new KPluginInfoPrivate )
{
KDesktopFile file( filename, true, resource );
d->specfile = filename;
- if( filename.endsWith( QString::fromAscii( ".desktop" ) ) )
+ if( filename.endsWith( TQString::fromAscii( ".desktop" ) ) )
{
file.setDesktopGroup();
d->hidden = file.readBoolEntry( "Hidden", false );
@@ -95,7 +95,7 @@ KPluginInfo::KPluginInfo( const QString & filename, const char* resource )
d->enabledbydefault = file.readBoolEntry(
"X-KDE-PluginInfo-EnabledByDefault", false );
}
- else if( filename.endsWith( QString::fromAscii( ".plugin" ) ) )
+ else if( filename.endsWith( TQString::fromAscii( ".plugin" ) ) )
{ // provided for noatun style .plugin files compatibility
d->name = file.readName();
@@ -136,7 +136,7 @@ KPluginInfo::KPluginInfo( const KService::Ptr service )
d->license = service->property( "X-KDE-PluginInfo-License" ).toString();
d->dependencies =
service->property( "X-KDE-PluginInfo-Depends" ).toStringList();
- QVariant tmp = service->property( "X-KDE-PluginInfo-EnabledByDefault" );
+ TQVariant tmp = service->property( "X-KDE-PluginInfo-EnabledByDefault" );
d->enabledbydefault = tmp.isValid() ? tmp.toBool() : false;
}
@@ -151,9 +151,9 @@ KPluginInfo::~KPluginInfo()
delete d;
}
-QValueList<KPluginInfo*> KPluginInfo::fromServices( const KService::List & services, KConfig * config, const QString & group )
+TQValueList<KPluginInfo*> KPluginInfo::fromServices( const KService::List & services, KConfig * config, const TQString & group )
{
- QValueList<KPluginInfo*> infolist;
+ TQValueList<KPluginInfo*> infolist;
KPluginInfo * info;
for( KService::List::ConstIterator it = services.begin();
it != services.end(); ++it )
@@ -165,10 +165,10 @@ QValueList<KPluginInfo*> KPluginInfo::fromServices( const KService::List & servi
return infolist;
}
-QValueList<KPluginInfo*> KPluginInfo::fromFiles( const QStringList & files, KConfig * config, const QString & group )
+TQValueList<KPluginInfo*> KPluginInfo::fromFiles( const TQStringList & files, KConfig * config, const TQString & group )
{
- QValueList<KPluginInfo*> infolist;
- for( QStringList::ConstIterator it = files.begin(); it != files.end(); ++it )
+ TQValueList<KPluginInfo*> infolist;
+ for( TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it )
{
KPluginInfo * info = new KPluginInfo( *it );
info->setConfig( config, group );
@@ -177,9 +177,9 @@ QValueList<KPluginInfo*> KPluginInfo::fromFiles( const QStringList & files, KCon
return infolist;
}
-QValueList<KPluginInfo*> KPluginInfo::fromKPartsInstanceName( const QString & name, KConfig * config, const QString & group )
+TQValueList<KPluginInfo*> KPluginInfo::fromKPartsInstanceName( const TQString & name, KConfig * config, const TQString & group )
{
- QStringList files = KGlobal::dirs()->findAllResources( "data", name +
+ TQStringList files = KGlobal::dirs()->findAllResources( "data", name +
"/kpartplugins/*.desktop", true, false );
return fromFiles( files, config, group );
}
@@ -207,62 +207,62 @@ bool KPluginInfo::isPluginEnabledByDefault() const
return d->enabledbydefault;
}
-const QString & KPluginInfo::name() const
+const TQString & KPluginInfo::name() const
{
return d->name;
}
-const QString & KPluginInfo::comment() const
+const TQString & KPluginInfo::comment() const
{
return d->comment;
}
-const QString & KPluginInfo::icon() const
+const TQString & KPluginInfo::icon() const
{
return d->icon;
}
-const QString & KPluginInfo::specfile() const
+const TQString & KPluginInfo::specfile() const
{
return d->specfile;
}
-const QString & KPluginInfo::author() const
+const TQString & KPluginInfo::author() const
{
return d->author;
}
-const QString & KPluginInfo::email() const
+const TQString & KPluginInfo::email() const
{
return d->email;
}
-const QString & KPluginInfo::category() const
+const TQString & KPluginInfo::category() const
{
return d->category;
}
-const QString & KPluginInfo::pluginName() const
+const TQString & KPluginInfo::pluginName() const
{
return d->pluginName;
}
-const QString & KPluginInfo::version() const
+const TQString & KPluginInfo::version() const
{
return d->version;
}
-const QString & KPluginInfo::website() const
+const TQString & KPluginInfo::website() const
{
return d->website;
}
-const QString & KPluginInfo::license() const
+const TQString & KPluginInfo::license() const
{
return d->license;
}
-const QStringList & KPluginInfo::dependencies() const
+const TQStringList & KPluginInfo::dependencies() const
{
return d->dependencies;
}
@@ -272,7 +272,7 @@ KService::Ptr KPluginInfo::service() const
return d->service;
}
-const QValueList<KService::Ptr> & KPluginInfo::kcmServices() const
+const TQValueList<KService::Ptr> & KPluginInfo::kcmServices() const
{
if ( !d->kcmservicesCached )
{
@@ -287,7 +287,7 @@ const QValueList<KService::Ptr> & KPluginInfo::kcmServices() const
return d->kcmservices;
}
-void KPluginInfo::setConfig( KConfig * config, const QString & group )
+void KPluginInfo::setConfig( KConfig * config, const TQString & group )
{
d->config = config;
d->configgroup = group;
@@ -298,20 +298,20 @@ KConfig * KPluginInfo::config() const
return d->config;
}
-const QString & KPluginInfo::configgroup() const
+const TQString & KPluginInfo::configgroup() const
{
return d->configgroup;
}
-QVariant KPluginInfo::property( const QString & key ) const
+TQVariant KPluginInfo::property( const TQString & key ) const
{
if( d->service )
return d->service->property( key );
else
- return QVariant();
+ return TQVariant();
}
-QVariant KPluginInfo::operator[]( const QString & key ) const
+TQVariant KPluginInfo::operator[]( const TQString & key ) const
{
return property( key );
}
diff --git a/kutils/kplugininfo.h b/kutils/kplugininfo.h
index 32ee5b5a7..59aa75983 100644
--- a/kutils/kplugininfo.h
+++ b/kutils/kplugininfo.h
@@ -20,10 +20,10 @@
#ifndef KPLUGININFO_H
#define KPLUGININFO_H
-#include <qstring.h>
-#include <qmap.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kservice.h>
class KConfigGroup;
@@ -42,7 +42,7 @@ class KConfigGroup;
class KUTILS_EXPORT KPluginInfo
{
public:
- typedef QValueList<KPluginInfo*> List;
+ typedef TQValueList<KPluginInfo*> List;
/**
* Read plugin info from @p filename.
@@ -77,7 +77,7 @@ class KUTILS_EXPORT KPluginInfo
* (e.g. "service", "apps"... KStandardDirs). Otherwise,
* resource isn't used.
*/
- KPluginInfo( const QString & filename, const char* resource = 0 );
+ KPluginInfo( const TQString & filename, const char* resource = 0 );
/**
* Read plugin info from a KService object.
@@ -120,7 +120,7 @@ class KUTILS_EXPORT KPluginInfo
* KService objects. If you get a trader offer of the plugins you want
* to use you can just pass them to this function.
*/
- static KPluginInfo::List fromServices( const KService::List & services, KConfig * config = 0, const QString & group = QString::null );
+ static KPluginInfo::List fromServices( const KService::List & services, KConfig * config = 0, const TQString & group = TQString::null );
/**
* @return A list of KPluginInfo objects constructed from a list of
@@ -128,14 +128,14 @@ class KUTILS_EXPORT KPluginInfo
* KStandardDirs::findAllResources() you pass the list of files to this
* function.
*/
- static KPluginInfo::List fromFiles( const QStringList & files, KConfig * config = 0, const QString & group = QString::null );
+ static KPluginInfo::List fromFiles( const TQStringList & files, KConfig * config = 0, const TQString & group = TQString::null );
/**
* @return A list of KPluginInfo objects for the KParts plugins of an
* instance. You only need the name of the instance not a pointer to the
* KInstance object.
*/
- static KPluginInfo::List fromKPartsInstanceName( const QString &, KConfig * config = 0, const QString & group = QString::null );
+ static KPluginInfo::List fromKPartsInstanceName( const TQString &, KConfig * config = 0, const TQString & group = TQString::null );
/**
* @return Whether the plugin should be hidden.
@@ -176,7 +176,7 @@ class KUTILS_EXPORT KPluginInfo
*
* @see operator[]
*/
- QVariant property( const QString & key ) const;
+ TQVariant property( const TQString & key ) const;
/**
* This is the same as property(). It is provided for convenience.
@@ -185,70 +185,70 @@ class KUTILS_EXPORT KPluginInfo
*
* @see property()
*/
- QVariant operator[]( const QString & key ) const;
+ TQVariant operator[]( const TQString & key ) const;
/**
* @return The user visible name of the plugin.
*/
- const QString & name() const;
+ const TQString & name() const;
/**
* @return A comment describing the plugin.
*/
- const QString & comment() const;
+ const TQString & comment() const;
/**
* @return The iconname for this plugin
*/
- const QString & icon() const;
+ const TQString & icon() const;
/**
* @return The file containing the information about the plugin.
*/
- const QString & specfile() const;
+ const TQString & specfile() const;
/**
* @return The author of this plugin.
*/
- const QString & author() const;
+ const TQString & author() const;
/**
* @return The email address of the author.
*/
- const QString & email() const;
+ const TQString & email() const;
/**
* @return The category of this plugin (e.g. playlist/skin).
*/
- const QString & category() const;
+ const TQString & category() const;
/**
* @return The internal name of the plugin (for KParts Plugins this is
* the same name as set in the .rc file).
*/
- const QString & pluginName() const;
+ const TQString & pluginName() const;
/**
* @return The version of the plugin.
*/
- const QString & version() const;
+ const TQString & version() const;
/**
* @return The website of the plugin/author.
*/
- const QString & website() const;
+ const TQString & website() const;
/**
* @return The license of this plugin.
*/
- const QString & license() const;
+ const TQString & license() const;
/**
* @return A list of plugins required for this plugin to be enabled. Use
* the pluginName in this list.
*/
- const QStringList & dependencies() const;
+ const TQStringList & dependencies() const;
/**
* @return The KService object for this plugin. You might need it if you
@@ -265,14 +265,14 @@ class KUTILS_EXPORT KPluginInfo
* @return A list of Service pointers if the plugin installs one or more
* KCModule
*/
- const QValueList<KService::Ptr> & kcmServices() const;
+ const TQValueList<KService::Ptr> & kcmServices() const;
/**
* Set the KConfigGroup to use for load()ing and save()ing the
* configuration. This will be overridden by the KConfigGroup passed to
* save() or load() (if one is passed).
*/
- void setConfig( KConfig * config, const QString & group );
+ void setConfig( KConfig * config, const TQString & group );
/**
* @return If the KPluginInfo object has a KConfig object set return
@@ -284,7 +284,7 @@ class KUTILS_EXPORT KPluginInfo
* @return The groupname used in the KConfig object for load()ing and
* save()ing whether the plugin is enabled.
*/
- const QString & configgroup() const;
+ const TQString & configgroup() const;
/**
* Save state of the plugin - enabled or not. This function is provided
diff --git a/kutils/kpluginselector.cpp b/kutils/kpluginselector.cpp
index 4bcc166d1..1a64d05e9 100644
--- a/kutils/kpluginselector.cpp
+++ b/kutils/kpluginselector.cpp
@@ -20,19 +20,19 @@
#include "kpluginselector.h"
#include "kpluginselector_p.h"
-#include <qtooltip.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qstrlist.h>
-#include <qfile.h>
-#include <qstring.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qwidgetstack.h>
-#include <qcursor.h>
-#include <qapplication.h>
-#include <qobjectlist.h>
-#include <qcstring.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqstrlist.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqwidgetstack.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
+#include <tqobjectlist.h>
+#include <tqcstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,7 +44,7 @@
#include <kstandarddirs.h>
#include <ktabctl.h>
#include <kcmoduleinfo.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kservice.h>
#include <ktrader.h>
#include <ktabwidget.h>
@@ -52,12 +52,12 @@
#include <kcmodule.h>
#include "kcmoduleinfo.h"
#include "kcmoduleloader.h"
-#include <qsplitter.h>
-#include <qframe.h>
+#include <tqsplitter.h>
+#include <tqframe.h>
#include "kplugininfo.h"
#include <kinstance.h>
-#include <qptrdict.h>
-#include <qstringlist.h>
+#include <tqptrdict.h>
+#include <tqstringlist.h>
#include "kcmoduleproxy.h"
/*
@@ -68,7 +68,7 @@ class KPluginInfoLVI : public QCheckListItem
{
public:
KPluginInfoLVI( KPluginInfo *pluginInfo, KListView *parent )
- : QCheckListItem( parent, pluginInfo->name(), QCheckListItem::CheckBox ), m_pluginInfo( pluginInfo )
+ : TQCheckListItem( parent, pluginInfo->name(), TQCheckListItem::CheckBox ), m_pluginInfo( pluginInfo )
{
}
@@ -79,27 +79,27 @@ private:
};
/*
- Custom QToolTip for the list view.
+ Custom TQToolTip for the list view.
The decision whether or not to show tooltips is taken in
- maybeTip(). See also the QListView sources from Qt itself.
+ maybeTip(). See also the TQListView sources from Qt itself.
*/
class KPluginListViewToolTip : public QToolTip
{
public:
- KPluginListViewToolTip( QWidget *parent, KListView *lv );
+ KPluginListViewToolTip( TQWidget *parent, KListView *lv );
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
KListView *m_listView;
};
-KPluginListViewToolTip::KPluginListViewToolTip( QWidget *parent, KListView *lv )
-: QToolTip( parent ), m_listView( lv )
+KPluginListViewToolTip::KPluginListViewToolTip( TQWidget *parent, KListView *lv )
+: TQToolTip( parent ), m_listView( lv )
{
}
-void KPluginListViewToolTip::maybeTip( const QPoint &pos )
+void KPluginListViewToolTip::maybeTip( const TQPoint &pos )
{
if ( !parentWidget() || !m_listView )
return;
@@ -108,7 +108,7 @@ void KPluginListViewToolTip::maybeTip( const QPoint &pos )
if ( !item )
return;
- QString toolTip = i18n( "<qt><table>"
+ TQString toolTip = i18n( "<qt><table>"
"<tr><td><b>Description:</b></td><td>%1</td></tr>"
"<tr><td><b>Author:</b></td><td>%2</td></tr>"
"<tr><td><b>Version:</b></td><td>%3</td></tr>"
@@ -122,7 +122,7 @@ void KPluginListViewToolTip::maybeTip( const QPoint &pos )
struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate
{
KPluginSelectionWidgetPrivate( KPluginSelector * _kps,
- const QString & _cat,
+ const TQString & _cat,
KConfigGroup * _config )
: widgetstack( 0 )
, kps( _kps )
@@ -142,19 +142,19 @@ struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate
delete config;
}
- QMap<QCheckListItem*, KPluginInfo*> pluginInfoMap;
+ TQMap<TQCheckListItem*, KPluginInfo*> pluginInfoMap;
- QWidgetStack * widgetstack;
+ TQWidgetStack * widgetstack;
KPluginSelector * kps;
KConfigGroup * config;
KPluginListViewToolTip *tooltip;
- QDict<KCModuleInfo> pluginconfigmodules;
- QMap<QString, int> widgetIDs;
- QMap<KPluginInfo*, bool> plugincheckedchanged;
- QString catname;
- QValueList<KCModuleProxy*> modulelist;
- QPtrDict<QStringList> moduleParentComponents;
+ TQDict<KCModuleInfo> pluginconfigmodules;
+ TQMap<TQString, int> widgetIDs;
+ TQMap<KPluginInfo*, bool> plugincheckedchanged;
+ TQString catname;
+ TQValueList<KCModuleProxy*> modulelist;
+ TQPtrDict<TQStringList> moduleParentComponents;
KPluginInfo * currentplugininfo;
bool visible;
@@ -163,49 +163,49 @@ struct KPluginSelectionWidget::KPluginSelectionWidgetPrivate
};
KPluginSelectionWidget::KPluginSelectionWidget(
- const QValueList<KPluginInfo*> & plugininfos, KPluginSelector * kps,
- QWidget * parent, const QString & catname, const QString & category,
+ const TQValueList<KPluginInfo*> & plugininfos, KPluginSelector * kps,
+ TQWidget * parent, const TQString & catname, const TQString & category,
KConfigGroup * config, const char * name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
, d( new KPluginSelectionWidgetPrivate( kps, catname, config ) )
{
init( plugininfos, category );
}
-inline QString KPluginSelectionWidget::catName() const
+inline TQString KPluginSelectionWidget::catName() const
{
return d->catname;
}
-void KPluginSelectionWidget::init( const QValueList<KPluginInfo*> & plugininfos,
- const QString & category )
+void KPluginSelectionWidget::init( const TQValueList<KPluginInfo*> & plugininfos,
+ const TQString & category )
{
// setup Widgets
- ( new QVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
KListView * listview = new KListView( this );
d->tooltip = new KPluginListViewToolTip( listview->viewport(), listview );
- connect( listview, SIGNAL( pressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( listview, SIGNAL( spacePressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( listview, SIGNAL( returnPressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( listview, SIGNAL( selectionChanged( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- listview->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred );
+ connect( listview, TQT_SIGNAL( pressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( listview, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( listview, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( listview, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ listview->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred );
listview->setAcceptDrops( false );
listview->setFullWidth( true );
listview->setSelectionModeExt( KListView::Single );
listview->setAllColumnsShowFocus( true );
listview->addColumn( i18n( "Name" ) );
- for( QValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin();
it != plugininfos.end(); ++it )
{
d->plugincheckedchanged[ *it ] = false;
if( !( *it )->isHidden() &&
( category.isNull() || ( *it )->category() == category ) )
{
- QCheckListItem * item = new KPluginInfoLVI( *it, listview );
+ TQCheckListItem * item = new KPluginInfoLVI( *it, listview );
if( ! ( *it )->icon().isEmpty() )
item->setPixmap( 0, SmallIcon( ( *it )->icon(), IconSize( KIcon::Small ) ) );
item->setOn( ( *it )->isPluginEnabled() );
@@ -227,9 +227,9 @@ KPluginSelectionWidget::~KPluginSelectionWidget()
delete d;
}
-bool KPluginSelectionWidget::pluginIsLoaded( const QString & pluginName ) const
+bool KPluginSelectionWidget::pluginIsLoaded( const TQString & pluginName ) const
{
- for( QMap<QCheckListItem*, KPluginInfo*>::ConstIterator it =
+ for( TQMap<TQCheckListItem*, KPluginInfo*>::ConstIterator it =
d->pluginInfoMap.begin(); it != d->pluginInfoMap.end(); ++it )
if( it.data()->pluginName() == pluginName )
return it.data()->isPluginEnabled();
@@ -237,7 +237,7 @@ bool KPluginSelectionWidget::pluginIsLoaded( const QString & pluginName ) const
}
-QWidget * KPluginSelectionWidget::insertKCM( QWidget * parent,
+TQWidget * KPluginSelectionWidget::insertKCM( TQWidget * parent,
const KCModuleInfo & moduleinfo )
{
KCModuleProxy * module = new KCModuleProxy( moduleinfo, false,
@@ -245,18 +245,18 @@ QWidget * KPluginSelectionWidget::insertKCM( QWidget * parent,
if( !module->realModule() )
{
//FIXME: not very verbose
- QLabel * label = new QLabel( i18n( "Error" ), parent );
+ TQLabel * label = new TQLabel( i18n( "Error" ), parent );
label->setAlignment( Qt::AlignCenter );
return label;
}
// add the KCM to the list so that we can call load/save/defaults on it
d->modulelist.append( module );
- QStringList * parentComponents = new QStringList(
+ TQStringList * parentComponents = new TQStringList(
moduleinfo.service()->property(
"X-KDE-ParentComponents" ).toStringList() );
d->moduleParentComponents.insert( module, parentComponents );
- connect( module, SIGNAL( changed( bool ) ), SLOT( clientChanged( bool ) ) );
+ connect( module, TQT_SIGNAL( changed( bool ) ), TQT_SLOT( clientChanged( bool ) ) );
return module;
}
@@ -264,7 +264,7 @@ void KPluginSelectionWidget::embeddPluginKCMs( KPluginInfo * plugininfo, bool ch
{
//if we have Services for the plugin we should be able to
//create KCM(s)
- QApplication::setOverrideCursor( Qt::WaitCursor );
+ TQApplication::setOverrideCursor( Qt::WaitCursor );
if( plugininfo->kcmServices().size() > 1 )
{
// we need a tabwidget
@@ -275,14 +275,14 @@ void KPluginSelectionWidget::embeddPluginKCMs( KPluginInfo * plugininfo, bool ch
d->kps->configPage( id );
d->widgetIDs[ plugininfo->pluginName() ] = id;
- for( QValueList<KService::Ptr>::ConstIterator it =
+ for( TQValueList<KService::Ptr>::ConstIterator it =
plugininfo->kcmServices().begin();
it != plugininfo->kcmServices().end(); ++it )
{
if( !( *it )->noDisplay() )
{
KCModuleInfo moduleinfo( *it );
- QWidget * module = insertKCM( tabwidget, moduleinfo );
+ TQWidget * module = insertKCM( tabwidget, moduleinfo );
tabwidget->addTab( module, moduleinfo.moduleName() );
}
}
@@ -293,7 +293,7 @@ void KPluginSelectionWidget::embeddPluginKCMs( KPluginInfo * plugininfo, bool ch
{
KCModuleInfo moduleinfo(
plugininfo->kcmServices().front() );
- QWidget * module = insertKCM( d->widgetstack, moduleinfo );
+ TQWidget * module = insertKCM( d->widgetstack, moduleinfo );
module->setEnabled( checked );
int id = d->widgetstack->addWidget( module );
@@ -301,7 +301,7 @@ void KPluginSelectionWidget::embeddPluginKCMs( KPluginInfo * plugininfo, bool ch
d->widgetIDs[ plugininfo->pluginName() ] = id;
}
}
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
inline void KPluginSelectionWidget::updateConfigPage()
@@ -357,7 +357,7 @@ void KPluginSelectionWidget::clientChanged( bool didchange )
kdError( 702 ) << "negative changed value: " << d->changed << endl;
}
-void KPluginSelectionWidget::tabWidgetChanged( QWidget * widget )
+void KPluginSelectionWidget::tabWidgetChanged( TQWidget * widget )
{
if( widget == this )
{
@@ -368,7 +368,7 @@ void KPluginSelectionWidget::tabWidgetChanged( QWidget * widget )
d->visible = false;
}
-void KPluginSelectionWidget::executed( QListViewItem * item )
+void KPluginSelectionWidget::executed( TQListViewItem * item )
{
kdDebug( 702 ) << k_funcinfo << endl;
if( item == 0 )
@@ -380,10 +380,10 @@ void KPluginSelectionWidget::executed( QListViewItem * item )
if( item->rtti() != 1 ) //check for a QCheckListItem
return;
- QCheckListItem * citem = static_cast<QCheckListItem *>( item );
+ TQCheckListItem * citem = static_cast<TQCheckListItem *>( item );
bool checked = citem->isOn();
//kdDebug( 702 ) << "it's a " << ( checked ? "checked" : "unchecked" )
- // << " QCheckListItem" << endl;
+ // << " TQCheckListItem" << endl;
KPluginInfo * info = d->pluginInfoMap[ citem ];
Q_ASSERT( !info->isHidden() );
@@ -421,7 +421,7 @@ void KPluginSelectionWidget::load()
{
//kdDebug( 702 ) << k_funcinfo << endl;
- for( QMap<QCheckListItem*, KPluginInfo*>::Iterator it =
+ for( TQMap<TQCheckListItem*, KPluginInfo*>::Iterator it =
d->pluginInfoMap.begin(); it != d->pluginInfoMap.end(); ++it )
{
KPluginInfo * info = it.data();
@@ -431,7 +431,7 @@ void KPluginSelectionWidget::load()
d->currentchecked = info->isPluginEnabled();
}
- for( QValueList<KCModuleProxy*>::Iterator it = d->modulelist.begin();
+ for( TQValueList<KCModuleProxy*>::Iterator it = d->modulelist.begin();
it != d->modulelist.end(); ++it )
if( ( *it )->changed() )
( *it )->load();
@@ -444,7 +444,7 @@ void KPluginSelectionWidget::save()
{
kdDebug( 702 ) << k_funcinfo << endl;
- for( QMap<QCheckListItem*, KPluginInfo*>::Iterator it =
+ for( TQMap<TQCheckListItem*, KPluginInfo*>::Iterator it =
d->pluginInfoMap.begin(); it != d->pluginInfoMap.end(); ++it )
{
KPluginInfo * info = it.data();
@@ -453,21 +453,21 @@ void KPluginSelectionWidget::save()
info->save( d->config );
d->plugincheckedchanged[ info ] = false;
}
- QStringList updatedModules;
- for( QValueList<KCModuleProxy*>::Iterator it = d->modulelist.begin();
+ TQStringList updatedModules;
+ for( TQValueList<KCModuleProxy*>::Iterator it = d->modulelist.begin();
it != d->modulelist.end(); ++it )
if( ( *it )->changed() )
{
( *it )->save();
- QStringList * names = d->moduleParentComponents[ *it ];
+ TQStringList * names = d->moduleParentComponents[ *it ];
if( names->size() == 0 )
- names->append( QString::null );
- for( QStringList::ConstIterator nameit = names->begin();
+ names->append( TQString::null );
+ for( TQStringList::ConstIterator nameit = names->begin();
nameit != names->end(); ++nameit )
if( updatedModules.find( *nameit ) == updatedModules.end() )
updatedModules.append( *nameit );
}
- for( QStringList::ConstIterator it = updatedModules.begin(); it != updatedModules.end(); ++it )
+ for( TQStringList::ConstIterator it = updatedModules.begin(); it != updatedModules.end(); ++it )
emit configCommitted( ( *it ).latin1() );
updateConfigPage();
@@ -482,9 +482,9 @@ void KPluginSelectionWidget::checkDependencies( const KPluginInfo * info )
if( info->dependencies().isEmpty() )
return;
- for( QStringList::ConstIterator it = info->dependencies().begin();
+ for( TQStringList::ConstIterator it = info->dependencies().begin();
it != info->dependencies().end(); ++it )
- for( QMap<QCheckListItem*,
+ for( TQMap<TQCheckListItem*,
KPluginInfo*>::Iterator infoIt = d->pluginInfoMap.begin();
infoIt != d->pluginInfoMap.end(); ++infoIt )
if( infoIt.data()->pluginName() == *it )
@@ -509,33 +509,33 @@ class KPluginSelector::KPluginSelectorPrivate
{
}
- QFrame * frame;
+ TQFrame * frame;
KTabWidget * tabwidget;
- QWidgetStack * widgetstack;
- QValueList<KPluginSelectionWidget *> pswidgets;
+ TQWidgetStack * widgetstack;
+ TQValueList<KPluginSelectionWidget *> pswidgets;
bool hideconfigpage;
};
-KPluginSelector::KPluginSelector( QWidget * parent, const char * name )
-: QWidget( parent, name )
+KPluginSelector::KPluginSelector( TQWidget * parent, const char * name )
+: TQWidget( parent, name )
, d( new KPluginSelectorPrivate )
{
- QBoxLayout * hbox = new QHBoxLayout( this, 0, KDialog::spacingHint() );
+ TQBoxLayout * hbox = new TQHBoxLayout( this, 0, KDialog::spacingHint() );
hbox->setAutoAdd( true );
- QSplitter* splitter = new QSplitter( QSplitter::Horizontal, this );
- d->frame = new QFrame( splitter, "KPluginSelector left frame" );
- d->frame->setFrameStyle( QFrame::NoFrame );
- ( new QVBoxLayout( d->frame, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ TQSplitter* splitter = new TQSplitter( TQSplitter::Horizontal, this );
+ d->frame = new TQFrame( splitter, "KPluginSelector left frame" );
+ d->frame->setFrameStyle( TQFrame::NoFrame );
+ ( new TQVBoxLayout( d->frame, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
// widgetstack
- d->widgetstack = new QWidgetStack( splitter, "KPluginSelector Config Pages" );
- d->widgetstack->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ d->widgetstack = new TQWidgetStack( splitter, "KPluginSelector Config Pages" );
+ d->widgetstack->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
d->widgetstack->setMinimumSize( 200, 200 );
- QLabel * label = new QLabel( i18n( "(This plugin is not configurable)" ),
+ TQLabel * label = new TQLabel( i18n( "(This plugin is not configurable)" ),
d->widgetstack );
- ( new QVBoxLayout( label, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( label, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
label->setAlignment( Qt::AlignCenter );
label->setMinimumSize( 200, 200 );
@@ -562,28 +562,28 @@ void KPluginSelector::checkNeedForTabWidget()
kdDebug( 702 ) << "create TabWidget" << endl;
d->tabwidget = new KTabWidget( d->frame,
"KPluginSelector TabWidget" );
- w->reparent( d->tabwidget, QPoint( 0, 0 ) );
+ w->reparent( d->tabwidget, TQPoint( 0, 0 ) );
d->tabwidget->addTab( w, w->catName() );
- connect( d->tabwidget, SIGNAL( currentChanged( QWidget * ) ), w,
- SLOT( tabWidgetChanged( QWidget * ) ) );
+ connect( d->tabwidget, TQT_SIGNAL( currentChanged( TQWidget * ) ), w,
+ TQT_SLOT( tabWidgetChanged( TQWidget * ) ) );
}
}
}
-static QValueList<KPluginInfo*> kpartsPluginInfos( const QString& instanceName )
+static TQValueList<KPluginInfo*> kpartsPluginInfos( const TQString& instanceName )
{
if( instanceName.isNull() )
- return QValueList<KPluginInfo*>(); //nothing
+ return TQValueList<KPluginInfo*>(); //nothing
- const QStringList desktopfilenames = KGlobal::dirs()->findAllResources( "data",
+ const TQStringList desktopfilenames = KGlobal::dirs()->findAllResources( "data",
instanceName + "/kpartplugins/*.desktop", true, false );
return KPluginInfo::fromFiles( desktopfilenames );
}
-void KPluginSelector::addPlugins( const QString & instanceName,
- const QString & catname, const QString & category, KConfig * config )
+void KPluginSelector::addPlugins( const TQString & instanceName,
+ const TQString & catname, const TQString & category, KConfig * config )
{
- const QValueList<KPluginInfo*> plugininfos = kpartsPluginInfos( instanceName );
+ const TQValueList<KPluginInfo*> plugininfos = kpartsPluginInfos( instanceName );
if ( plugininfos.isEmpty() )
return;
checkNeedForTabWidget();
@@ -595,8 +595,8 @@ void KPluginSelector::addPlugins( const QString & instanceName,
addPluginsInternal( plugininfos, catname, category, cfgGroup );
}
-void KPluginSelector::addPluginsInternal( const QValueList<KPluginInfo*> plugininfos,
- const QString & catname, const QString & category,
+void KPluginSelector::addPluginsInternal( const TQValueList<KPluginInfo*> plugininfos,
+ const TQString & catname, const TQString & category,
KConfigGroup* cfgGroup )
{
KPluginSelectionWidget * w;
@@ -605,29 +605,29 @@ void KPluginSelector::addPluginsInternal( const QValueList<KPluginInfo*> plugini
w = new KPluginSelectionWidget( plugininfos, this,
d->tabwidget, catname, category, cfgGroup );
d->tabwidget->addTab( w, catname );
- connect( d->tabwidget, SIGNAL( currentChanged( QWidget * ) ), w,
- SLOT( tabWidgetChanged( QWidget * ) ) );
+ connect( d->tabwidget, TQT_SIGNAL( currentChanged( TQWidget * ) ), w,
+ TQT_SLOT( tabWidgetChanged( TQWidget * ) ) );
}
else
w = new KPluginSelectionWidget( plugininfos, this, d->frame,
catname, category, cfgGroup );
w->setMinimumSize( 200, 200 );
- connect( w, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
- connect( w, SIGNAL( configCommitted( const QCString & ) ), this,
- SIGNAL( configCommitted( const QCString & ) ) );
+ connect( w, TQT_SIGNAL( changed( bool ) ), this, TQT_SIGNAL( changed( bool ) ) );
+ connect( w, TQT_SIGNAL( configCommitted( const TQCString & ) ), this,
+ TQT_SIGNAL( configCommitted( const TQCString & ) ) );
d->pswidgets += w;
}
-void KPluginSelector::addPlugins( const KInstance * instance, const QString &
- catname, const QString & category, KConfig * config )
+void KPluginSelector::addPlugins( const KInstance * instance, const TQString &
+ catname, const TQString & category, KConfig * config )
{
if ( !config )
config = instance->config();
addPlugins( instance->instanceName(), catname, category, config );
}
-void KPluginSelector::addPlugins( const QValueList<KPluginInfo*> & plugininfos,
- const QString & catname, const QString & category, KConfig * config )
+void KPluginSelector::addPlugins( const TQValueList<KPluginInfo*> & plugininfos,
+ const TQString & catname, const TQString & category, KConfig * config )
{
checkNeedForTabWidget();
// the KConfigGroup becomes owned by KPluginSelectionWidget
@@ -636,7 +636,7 @@ void KPluginSelector::addPlugins( const QValueList<KPluginInfo*> & plugininfos,
addPluginsInternal( plugininfos, catname, category, cfgGroup );
}
-QWidgetStack * KPluginSelector::widgetStack()
+TQWidgetStack * KPluginSelector::widgetStack()
{
return d->widgetstack;
}
@@ -668,7 +668,7 @@ void KPluginSelector::setShowEmptyConfigPage( bool show )
void KPluginSelector::load()
{
- for( QValueList<KPluginSelectionWidget *>::Iterator it =
+ for( TQValueList<KPluginSelectionWidget *>::Iterator it =
d->pswidgets.begin(); it != d->pswidgets.end(); ++it )
{
( *it )->load();
@@ -677,7 +677,7 @@ void KPluginSelector::load()
void KPluginSelector::save()
{
- for( QValueList<KPluginSelectionWidget *>::Iterator it =
+ for( TQValueList<KPluginSelectionWidget *>::Iterator it =
d->pswidgets.begin(); it != d->pswidgets.end(); ++it )
{
( *it )->save();
@@ -695,7 +695,7 @@ void KPluginSelector::defaults()
// not possible. (if the plugin has multiple KCMs they will be shown in a
// tabwidget - defaults() will be called for all of them)
- QWidget * pluginconfig = d->widgetstack->visibleWidget();
+ TQWidget * pluginconfig = d->widgetstack->visibleWidget();
KCModuleProxy * kcm = ( KCModuleProxy* )pluginconfig->qt_cast(
"KCModuleProxy" );
if( kcm )
@@ -708,10 +708,10 @@ void KPluginSelector::defaults()
// if we get here the visible Widget must be a tabwidget holding more than
// one KCM
- QObjectList * kcms = pluginconfig->queryList( "KCModuleProxy",
+ TQObjectList * kcms = pluginconfig->queryList( "KCModuleProxy",
0, false, false );
- QObjectListIt it( *kcms );
- QObject * obj;
+ TQObjectListIt it( *kcms );
+ TQObject * obj;
while( ( obj = it.current() ) != 0 )
{
++it;
diff --git a/kutils/kpluginselector.h b/kutils/kpluginselector.h
index b21e41b3e..811582104 100644
--- a/kutils/kpluginselector.h
+++ b/kutils/kpluginselector.h
@@ -20,8 +20,8 @@
#ifndef KPLUGINSELECTOR_H
#define KPLUGINSELECTOR_H
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -66,7 +66,7 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
/**
* Create a new KPluginSelector.
*/
- KPluginSelector( QWidget * parent, const char * name = 0 );
+ KPluginSelector( TQWidget * parent, const char * name = 0 );
~KPluginSelector();
/**
@@ -98,9 +98,9 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
* For example KViewCanvas passes KSimpleConfig(
* "kviewcanvas" ).
*/
- void addPlugins( const QString & instanceName,
- const QString & catname = QString::null,
- const QString & category = QString::null,
+ void addPlugins( const TQString & instanceName,
+ const TQString & catname = TQString::null,
+ const TQString & category = TQString::null,
KConfig * config = 0 );
/**
@@ -108,8 +108,8 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
* If not set explicitely, @p config is set to instance->config().
*/
void addPlugins( const KInstance * instance,
- const QString & catname = QString::null,
- const QString & category = QString::null,
+ const TQString & catname = TQString::null,
+ const TQString & category = TQString::null,
KConfig * config = 0 );
/**
@@ -137,9 +137,9 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
* For example KViewCanvas passes KSimpleConfig(
* "kviewcanvas" ).
*/
- void addPlugins( const QValueList<KPluginInfo*> & plugininfos,
- const QString & catname = QString::null,
- const QString & category = QString::null,
+ void addPlugins( const TQValueList<KPluginInfo*> & plugininfos,
+ const TQString & catname = TQString::null,
+ const TQString & category = TQString::null,
KConfig * config = 0 );
/**
@@ -181,7 +181,7 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
* argument is the name of the parent component that needs to reload
* its config
*/
- void configCommitted( const QCString & instanceName );
+ void configCommitted( const TQCString & instanceName );
private:
/**
@@ -189,7 +189,7 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
*
* @internal
*/
- QWidgetStack * widgetStack();
+ TQWidgetStack * widgetStack();
/**
* Show an info page in the widgetstack.
@@ -206,8 +206,8 @@ class KUTILS_EXPORT KPluginSelector : public QWidget
/**
* @internal
*/
- void addPluginsInternal( const QValueList<KPluginInfo*> plugininfos,
- const QString & catname, const QString & category,
+ void addPluginsInternal( const TQValueList<KPluginInfo*> plugininfos,
+ const TQString & catname, const TQString & category,
KConfigGroup* cfgGroup );
class KPluginSelectorPrivate;
diff --git a/kutils/kpluginselector_p.h b/kutils/kpluginselector_p.h
index c9b968c0f..c8a6cb546 100644
--- a/kutils/kpluginselector_p.h
+++ b/kutils/kpluginselector_p.h
@@ -20,7 +20,7 @@
#ifndef KPLUGINSELECTOR_P_H
#define KPLUGINSELECTOR_P_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -55,13 +55,13 @@ class KPluginSelectionWidget : public QWidget
* @param category The unstranslated category key name.
* @param config Set the KConfigGroup object that holds the
* state of the plugins being enabled or not.
- * @param name The name of the widget (passed to QWidget)
+ * @param name The name of the widget (passed to TQWidget)
*
* @internal
*/
- KPluginSelectionWidget( const QValueList<KPluginInfo*> & plugininfos,
- KPluginSelector * kps, QWidget * parent, const QString & catname,
- const QString & category, KConfigGroup * config = 0,
+ KPluginSelectionWidget( const TQValueList<KPluginInfo*> & plugininfos,
+ KPluginSelector * kps, TQWidget * parent, const TQString & catname,
+ const TQString & category, KConfigGroup * config = 0,
const char * name = 0 );
virtual ~KPluginSelectionWidget();
@@ -72,7 +72,7 @@ class KPluginSelectionWidget : public QWidget
*
* @internal
*/
- QString catName() const;
+ TQString catName() const;
/**
* Tell the KPluginInfo objects to load their state (enabled/disabled).
@@ -88,7 +88,7 @@ class KPluginSelectionWidget : public QWidget
/**
* @return whether the plugin is enabled in the ListView or not.
*/
- bool pluginChecked( const QString & pluginName ) const;
+ bool pluginChecked( const TQString & pluginName ) const;
signals:
/**
@@ -103,7 +103,7 @@ class KPluginSelectionWidget : public QWidget
* argument is the name of the parent component that needs to reload
* its config
*/
- void configCommitted( const QCString & instanceName );
+ void configCommitted( const TQCString & instanceName );
protected:
/**
@@ -114,16 +114,16 @@ class KPluginSelectionWidget : public QWidget
*
* @return Whether the plugin is loaded.
*/
- virtual bool pluginIsLoaded( const QString & pluginName ) const;
+ virtual bool pluginIsLoaded( const TQString & pluginName ) const;
private slots:
/**
- * Called when a QCheckListItem is checked or unchecked. It calls
+ * Called when a TQCheckListItem is checked or unchecked. It calls
* checkDependencies on the Plugin and then updateConfigPage.
*
* @internal
*/
- void executed( QListViewItem * );
+ void executed( TQListViewItem * );
/**
* Called whenever the visible config page should change (plugin
@@ -158,7 +158,7 @@ class KPluginSelectionWidget : public QWidget
* KPluginSelectionWidget is shown and sets the currentplugininfo
* accordingly.
*/
- void tabWidgetChanged( QWidget * );
+ void tabWidgetChanged( TQWidget * );
private:
/**
@@ -168,7 +168,7 @@ class KPluginSelectionWidget : public QWidget
*
* @internal
*/
- QWidget * insertKCM( QWidget * parent, const KCModuleInfo & );
+ TQWidget * insertKCM( TQWidget * parent, const KCModuleInfo & );
/**
* Embed the KCMs for the plugin into the widgetstack
@@ -177,7 +177,7 @@ class KPluginSelectionWidget : public QWidget
*/
void embeddPluginKCMs( KPluginInfo *, bool );
- void init( const QValueList<KPluginInfo*> & plugininfos, const QString & );
+ void init( const TQValueList<KPluginInfo*> & plugininfos, const TQString & );
void checkDependencies( const KPluginInfo * );
struct KPluginSelectionWidgetPrivate;
diff --git a/kutils/kreplace.cpp b/kutils/kreplace.cpp
index 6740c297a..f825e93cc 100644
--- a/kutils/kreplace.cpp
+++ b/kutils/kreplace.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -26,7 +26,7 @@
#include <kmessagebox.h>
#include "kreplace.h"
#include "kreplacedialog.h"
-#include <qregexp.h>
+#include <tqregexp.h>
//#define DEBUG_REPLACE
#define INDEX_NOMATCH -1
@@ -34,13 +34,13 @@
class KReplaceNextDialog : public KDialogBase
{
public:
- KReplaceNextDialog( QWidget *parent );
- void setLabel( const QString& pattern, const QString& replacement );
+ KReplaceNextDialog( TQWidget *parent );
+ void setLabel( const TQString& pattern, const TQString& replacement );
private:
- QLabel* m_mainLabel;
+ TQLabel* m_mainLabel;
};
-KReplaceNextDialog::KReplaceNextDialog(QWidget *parent) :
+KReplaceNextDialog::KReplaceNextDialog(TQWidget *parent) :
KDialogBase(parent, 0, false, // non-modal!
i18n("Replace"),
User3 | User2 | User1 | Close,
@@ -48,26 +48,26 @@ KReplaceNextDialog::KReplaceNextDialog(QWidget *parent) :
false,
i18n("&All"), i18n("&Skip"), i18n("Replace"))
{
- m_mainLabel = new QLabel( this );
+ m_mainLabel = new TQLabel( this );
setMainWidget( m_mainLabel );
resize(minimumSize());
}
-void KReplaceNextDialog::setLabel( const QString& pattern, const QString& replacement )
+void KReplaceNextDialog::setLabel( const TQString& pattern, const TQString& replacement )
{
m_mainLabel->setText( i18n("Replace '%1' with '%2'?").arg(pattern).arg(replacement) );
}
////
-KReplace::KReplace(const QString &pattern, const QString &replacement, long options, QWidget *parent) :
+KReplace::KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent) :
KFind( pattern, options, parent )
{
m_replacements = 0;
m_replacement = replacement;
}
-KReplace::KReplace(const QString &pattern, const QString &replacement, long options, QWidget *parent, QWidget *dlg) :
+KReplace::KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent, TQWidget *dlg) :
KFind( pattern, options, parent, dlg )
{
m_replacements = 0;
@@ -91,10 +91,10 @@ KReplaceNextDialog* KReplace::dialog()
if ( !m_dialog )
{
m_dialog = new KReplaceNextDialog( parentWidget() );
- connect( m_dialog, SIGNAL( user1Clicked() ), this, SLOT( slotReplaceAll() ) );
- connect( m_dialog, SIGNAL( user2Clicked() ), this, SLOT( slotSkip() ) );
- connect( m_dialog, SIGNAL( user3Clicked() ), this, SLOT( slotReplace() ) );
- connect( m_dialog, SIGNAL( finished() ), this, SLOT( slotDialogClosed() ) );
+ connect( m_dialog, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( slotReplaceAll() ) );
+ connect( m_dialog, TQT_SIGNAL( user2Clicked() ), this, TQT_SLOT( slotSkip() ) );
+ connect( m_dialog, TQT_SIGNAL( user3Clicked() ), this, TQT_SLOT( slotReplace() ) );
+ connect( m_dialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogClosed() ) );
}
return static_cast<KReplaceNextDialog *>(m_dialog);
}
@@ -142,8 +142,8 @@ KFind::Result KReplace::replace()
kdDebug() << k_funcinfo << "PromptOnReplace" << endl;
#endif
// Display accurate initial string and replacement string, they can vary
- QString matchedText = m_text.mid( m_index, m_matchedLength );
- QString rep = matchedText;
+ TQString matchedText = m_text.mid( m_index, m_matchedLength );
+ TQString rep = matchedText;
KReplace::replace(rep, m_replacement, 0, m_options, m_matchedLength);
dialog()->setLabel( matchedText, rep );
dialog()->show();
@@ -177,7 +177,7 @@ KFind::Result KReplace::replace()
return NoMatch;
}
-int KReplace::replace(QString &text, const QString &pattern, const QString &replacement, int index, long options, int *replacedLength)
+int KReplace::replace(TQString &text, const TQString &pattern, const TQString &replacement, int index, long options, int *replacedLength)
{
int matchedLength;
@@ -193,7 +193,7 @@ int KReplace::replace(QString &text, const QString &pattern, const QString &repl
return index;
}
-int KReplace::replace(QString &text, const QRegExp &pattern, const QString &replacement, int index, long options, int *replacedLength)
+int KReplace::replace(TQString &text, const TQRegExp &pattern, const TQString &replacement, int index, long options, int *replacedLength)
{
int matchedLength;
@@ -209,9 +209,9 @@ int KReplace::replace(QString &text, const QRegExp &pattern, const QString &repl
return index;
}
-int KReplace::replace(QString &text, const QString &replacement, int index, long options, int length)
+int KReplace::replace(TQString &text, const TQString &replacement, int index, long options, int length)
{
- QString rep = replacement;
+ TQString rep = replacement;
// Backreferences: replace \0 with the right portion of 'text'
if ( options & KReplaceDialog::BackReference )
rep.replace( "\\0", text.mid( index, length ) );
@@ -293,7 +293,7 @@ bool KReplace::shouldRestart( bool forceAsking, bool showNumMatches ) const
displayFinalDialog();
return false;
}
- QString message;
+ TQString message;
if ( showNumMatches )
{
if ( !m_replacements )
@@ -316,7 +316,7 @@ bool KReplace::shouldRestart( bool forceAsking, bool showNumMatches ) const
i18n("Do you want to restart search from the end?")
: i18n("Do you want to restart search at the beginning?");
- int ret = KMessageBox::questionYesNo( parentWidget(), message, QString::null, i18n("Restart"), i18n("Stop") );
+ int ret = KMessageBox::questionYesNo( parentWidget(), message, TQString::null, i18n("Restart"), i18n("Stop") );
return( ret == KMessageBox::Yes );
}
diff --git a/kutils/kreplace.h b/kutils/kreplace.h
index 2a174af23..ea385189b 100644
--- a/kutils/kreplace.h
+++ b/kutils/kreplace.h
@@ -50,14 +50,14 @@ class KReplaceNextDialog;
*
* // Connect signals to code which handles highlighting
* // of found text, and on-the-fly replacement.
- * connect( m_replace, SIGNAL( highlight( const QString &, int, int ) ),
- * this, SLOT( slotHighlight( const QString &, int, int ) ) );
+ * connect( m_replace, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ * this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
* // Connect findNext signal - called when pressing the button in the dialog
- * connect( m_replace, SIGNAL( findNext() ),
- * this, SLOT( slotReplaceNext() ) );
+ * connect( m_replace, TQT_SIGNAL( findNext() ),
+ * this, TQT_SLOT( slotReplaceNext() ) );
* // Connect replace signal - called when doing a replacement
- * connect( m_replace, SIGNAL( replace(const QString &, int, int, int) ),
- * this, SLOT( slotReplace(const QString &, int, int, int) ) );
+ * connect( m_replace, TQT_SIGNAL( replace(const TQString &, int, int, int) ),
+ * this, TQT_SLOT( slotReplace(const TQString &, int, int, int) ) );
* \endcode
* Then initialize the variables determining the "current position"
* (to the cursor, if the option FromCursor is set,
@@ -109,7 +109,7 @@ public:
* @param options Options for the find dialog. @see KFindDialog and KReplaceDialog.
* @param parent The parent widget.
*/
- KReplace(const QString &pattern, const QString &replacement, long options, QWidget *parent = 0);
+ KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent = 0);
/**
* This is the recommended constructor if you also use KReplaceDialog (non-modal).
* You should pass the pointer to it here, so that when a message box
@@ -121,7 +121,7 @@ public:
* @param parent The parent widget.
* @param replaceDialog A pointer to the KReplaceDialog object.
*/
- KReplace(const QString &pattern, const QString &replacement, long options, QWidget *parent, QWidget* replaceDialog);
+ KReplace(const TQString &pattern, const TQString &replacement, long options, TQWidget *parent, TQWidget* replaceDialog);
/**
* Destructor.
@@ -186,7 +186,7 @@ public:
* Not always the same as replacement.length(), when backreferences are used.
* @return The index at which a match was found, or -1 if no match was found.
*/
- static int replace( QString &text, const QString &pattern, const QString &replacement, int index, long options, int *replacedLength );
+ static int replace( TQString &text, const TQString &pattern, const TQString &replacement, int index, long options, int *replacedLength );
/**
* Searches the given regular expression, replaces with the given replacement string,
@@ -204,7 +204,7 @@ public:
* Not always the same as replacement.length(), when backreferences are used.
* @return The index at which a match was found, or -1 if no match was found.
*/
- static int replace( QString &text, const QRegExp &pattern, const QString &replacement, int index, long options, int *replacedLength );
+ static int replace( TQString &text, const TQRegExp &pattern, const TQString &replacement, int index, long options, int *replacedLength );
/**
* Returns @c true if we should restart the search from scratch.
@@ -246,7 +246,7 @@ signals:
* @param replacedLength Length of the replacement string
* @param matchedLength Length of the matched string
*/
- void replace(const QString &text, int replacementIndex, int replacedLength, int matchedLength);
+ void replace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength);
protected slots:
@@ -257,9 +257,9 @@ protected slots:
private:
KReplaceNextDialog* dialog();
void doReplace();
- static int replace( QString &text, const QString &replacement, int index, long options, int length );
+ static int replace( TQString &text, const TQString &replacement, int index, long options, int length );
- QString m_replacement;
+ TQString m_replacement;
unsigned m_replacements;
// Binary compatible extensibility.
diff --git a/kutils/kreplacedialog.cpp b/kutils/kreplacedialog.cpp
index 80a36e5df..88c006b4d 100644
--- a/kutils/kreplacedialog.cpp
+++ b/kutils/kreplacedialog.cpp
@@ -20,11 +20,11 @@
#include "kreplacedialog.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kcombobox.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -32,17 +32,17 @@
/**
* we need to insert the strings after the dialog is set
- * up, otherwise QComboBox will deliver an aweful big sizeHint
+ * up, otherwise TQComboBox will deliver an aweful big sizeHint
* for long replacement texts.
*/
class KReplaceDialog::KReplaceDialogPrivate {
public:
KReplaceDialogPrivate() : m_initialShowDone(false) {}
- QStringList replaceStrings;
+ TQStringList replaceStrings;
bool m_initialShowDone;
};
-KReplaceDialog::KReplaceDialog(QWidget *parent, const char *name, long options, const QStringList &findStrings, const QStringList &replaceStrings, bool hasSelection) :
+KReplaceDialog::KReplaceDialog(TQWidget *parent, const char *name, long options, const TQStringList &findStrings, const TQStringList &replaceStrings, bool hasSelection) :
KFindDialog(parent, name, true)
{
d = new KReplaceDialogPrivate;
@@ -56,7 +56,7 @@ KReplaceDialog::~KReplaceDialog()
delete d;
}
-void KReplaceDialog::showEvent( QShowEvent *e )
+void KReplaceDialog::showEvent( TQShowEvent *e )
{
if ( !d->m_initialShowDone )
{
@@ -84,28 +84,28 @@ long KReplaceDialog::options() const
return options;
}
-QWidget *KReplaceDialog::replaceExtension()
+TQWidget *KReplaceDialog::replaceExtension()
{
if (!m_replaceExtension)
{
- m_replaceExtension = new QWidget(m_replaceGrp);
+ m_replaceExtension = new TQWidget(m_replaceGrp);
m_replaceLayout->addMultiCellWidget(m_replaceExtension, 3, 3, 0, 1);
}
return m_replaceExtension;
}
-QString KReplaceDialog::replacement() const
+TQString KReplaceDialog::replacement() const
{
return m_replace->currentText();
}
-QStringList KReplaceDialog::replacementHistory() const
+TQStringList KReplaceDialog::replacementHistory() const
{
- QStringList lst = m_replace->historyItems();
+ TQStringList lst = m_replace->historyItems();
// historyItems() doesn't tell us about the case of replacing with an empty string
if ( m_replace->lineEdit()->text().isEmpty() )
- lst.prepend( QString::null );
+ lst.prepend( TQString::null );
return lst;
}
@@ -116,7 +116,7 @@ void KReplaceDialog::setOptions(long options)
m_backRef->setChecked(options & BackReference);
}
-void KReplaceDialog::setReplacementHistory(const QStringList &strings)
+void KReplaceDialog::setReplacementHistory(const TQStringList &strings)
{
if (strings.count() > 0)
m_replace->setHistoryItems(strings, true);
@@ -129,11 +129,11 @@ void KReplaceDialog::slotOk()
// If regex and backrefs are enabled, do a sanity check.
if ( m_regExp->isChecked() && m_backRef->isChecked() )
{
- QRegExp r ( pattern() );
+ TQRegExp r ( pattern() );
int caps = r.numCaptures();
- QRegExp check(QString("((?:\\\\)+)(\\d+)"));
+ TQRegExp check(TQString("((?:\\\\)+)(\\d+)"));
int p = 0;
- QString rep = replacement();
+ TQString rep = replacement();
while ( (p = check.search( rep, p ) ) > -1 )
{
if ( check.cap(1).length()%2 && check.cap(2).toInt() > caps )
diff --git a/kutils/kreplacedialog.h b/kutils/kreplacedialog.h
index 459c0c5ae..835762941 100644
--- a/kutils/kreplacedialog.h
+++ b/kutils/kreplacedialog.h
@@ -79,14 +79,14 @@ public:
* @param parent The parent object of this widget
* @param name The name of this widget
* @param options A bitfield of the Options to be enabled.
- * @param findStrings A QStringList to insert in the combo box of text to find
- * @param replaceStrings A QStringList to insert in the combo box of text to
+ * @param findStrings A TQStringList to insert in the combo box of text to find
+ * @param replaceStrings A TQStringList to insert in the combo box of text to
* replace with
* @param hasSelection Whether a selection exists
*/
- KReplaceDialog( QWidget *parent = 0, const char *name = 0, long options = 0,
- const QStringList &findStrings = QStringList(),
- const QStringList &replaceStrings = QStringList(),
+ KReplaceDialog( TQWidget *parent = 0, const char *name = 0, long options = 0,
+ const TQStringList &findStrings = TQStringList(),
+ const TQStringList &replaceStrings = TQStringList(),
bool hasSelection = true );
/**
@@ -102,7 +102,7 @@ public:
* @param history The replacement history.
* @see replacementHistory
*/
- void setReplacementHistory( const QStringList &history );
+ void setReplacementHistory( const TQStringList &history );
/**
* Returns the list of history items.
@@ -110,7 +110,7 @@ public:
* @return The replacement history.
* @see setReplacementHistory
*/
- QStringList replacementHistory() const;
+ TQStringList replacementHistory() const;
/**
* Set the options which are enabled.
@@ -133,21 +133,21 @@ public:
* Returns the replacement string.
* @return The replacement string.
*/
- QString replacement() const;
+ TQString replacement() const;
/**
* Returns an empty widget which the user may fill with additional UI
* elements as required. The widget occupies the width of the dialog,
* and is positioned immediately the regular expression support widgets
* for the replacement string.
- * @return An extensible QWidget.
+ * @return An extensible TQWidget.
*/
- QWidget *replaceExtension();
+ TQWidget *replaceExtension();
protected slots:
void slotOk();
- virtual void showEvent ( QShowEvent * );
+ virtual void showEvent ( TQShowEvent * );
private:
diff --git a/kutils/ksettings/componentsdialog.cpp b/kutils/ksettings/componentsdialog.cpp
index 5093af985..cb3695e05 100644
--- a/kutils/ksettings/componentsdialog.cpp
+++ b/kutils/ksettings/componentsdialog.cpp
@@ -19,10 +19,10 @@
#include "ksettings/componentsdialog.h"
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klistview.h>
-#include <qlabel.h>
-#include <qheader.h>
+#include <tqlabel.h>
+#include <tqheader.h>
#include <kplugininfo.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -36,34 +36,34 @@ class ComponentsDialog::ComponentsDialogPrivate
{
public:
KListView * listview;
- QFrame * infowidget;
- QLabel * iconwidget;
- QLabel * commentwidget;
- QLabel * descriptionwidget;
- QMap<QCheckListItem*, KPluginInfo*> plugininfomap;
- QValueList<KPluginInfo*> plugininfolist;
+ TQFrame * infowidget;
+ TQLabel * iconwidget;
+ TQLabel * commentwidget;
+ TQLabel * descriptionwidget;
+ TQMap<TQCheckListItem*, KPluginInfo*> plugininfomap;
+ TQValueList<KPluginInfo*> plugininfolist;
};
-ComponentsDialog::ComponentsDialog( QWidget * parent, const char * name )
+ComponentsDialog::ComponentsDialog( TQWidget * parent, const char * name )
: KDialogBase( parent, name, false, i18n( "Select Components" ) )
, d( new ComponentsDialogPrivate )
{
- QWidget * page = new QWidget( this );
+ TQWidget * page = new TQWidget( this );
setMainWidget( page );
- ( new QHBoxLayout( page, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQHBoxLayout( page, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
d->listview = new KListView( page );
d->listview->setMinimumSize( 200, 200 );
- d->infowidget = new QFrame( page );
+ d->infowidget = new TQFrame( page );
d->infowidget->setMinimumSize( 200, 200 );
- ( new QVBoxLayout( d->infowidget, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
- d->iconwidget = new QLabel( d->infowidget );
+ ( new TQVBoxLayout( d->infowidget, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ d->iconwidget = new TQLabel( d->infowidget );
( void )new KSeparator( d->infowidget );
- d->commentwidget = new QLabel( d->infowidget );
+ d->commentwidget = new TQLabel( d->infowidget );
d->commentwidget->setAlignment( Qt::WordBreak );
- d->descriptionwidget = new QLabel( d->infowidget );
+ d->descriptionwidget = new TQLabel( d->infowidget );
d->descriptionwidget->setAlignment( Qt::WordBreak );
- d->listview->addColumn( QString::null );
+ d->listview->addColumn( TQString::null );
d->listview->header()->hide();
d->listview->setRootIsDecorated( true );
d->listview->setSorting( -1 );
@@ -71,14 +71,14 @@ ComponentsDialog::ComponentsDialog( QWidget * parent, const char * name )
d->listview->setSelectionModeExt( KListView::Single );
d->listview->setAllColumnsShowFocus( true );
- connect( d->listview, SIGNAL( pressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( d->listview, SIGNAL( spacePressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( d->listview, SIGNAL( returnPressed( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
- connect( d->listview, SIGNAL( selectionChanged( QListViewItem * ) ), this,
- SLOT( executed( QListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( pressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
+ connect( d->listview, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), this,
+ TQT_SLOT( executed( TQListViewItem * ) ) );
}
ComponentsDialog::~ComponentsDialog()
@@ -90,17 +90,17 @@ void ComponentsDialog::addPluginInfo( KPluginInfo * info )
d->plugininfolist.append( info );
}
-void ComponentsDialog::setPluginInfos( const QMap<QString, KPluginInfo*> &
+void ComponentsDialog::setPluginInfos( const TQMap<TQString, KPluginInfo*> &
plugininfos )
{
- for( QMap<QString, KPluginInfo*>::ConstIterator it = plugininfos.begin();
+ for( TQMap<TQString, KPluginInfo*>::ConstIterator it = plugininfos.begin();
it != plugininfos.end(); ++it )
{
d->plugininfolist.append( it.data() );
}
}
-void ComponentsDialog::setPluginInfos( const QValueList<KPluginInfo *> &plugins )
+void ComponentsDialog::setPluginInfos( const TQValueList<KPluginInfo *> &plugins )
{
d->plugininfolist = plugins;
}
@@ -112,12 +112,12 @@ void ComponentsDialog::show()
d->plugininfomap.clear();
// construct the treelist
- for( QValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
it != d->plugininfolist.end(); ++it )
{
( *it )->load();
- QCheckListItem * item = new QCheckListItem( d->listview, ( *it )->name(),
- QCheckListItem::CheckBox );
+ TQCheckListItem * item = new TQCheckListItem( d->listview, ( *it )->name(),
+ TQCheckListItem::CheckBox );
if( ! ( *it )->icon().isEmpty() )
item->setPixmap( 0, SmallIcon( ( *it )->icon(), IconSize( KIcon::Small ) ) );
item->setOn( ( *it )->isPluginEnabled() );
@@ -126,7 +126,7 @@ void ComponentsDialog::show()
KDialogBase::show();
}
-void ComponentsDialog::executed( QListViewItem * item )
+void ComponentsDialog::executed( TQListViewItem * item )
{
kdDebug( 704 ) << k_funcinfo << endl;
if( item == 0 )
@@ -134,11 +134,11 @@ void ComponentsDialog::executed( QListViewItem * item )
if( item->rtti() != 1 ) // check for QCheckListItem
return;
- QCheckListItem * citem = static_cast<QCheckListItem *>( item );
+ TQCheckListItem * citem = static_cast<TQCheckListItem *>( item );
bool checked = citem->isOn();
kdDebug( 704 ) << "it's a " << ( checked ? "checked" : "unchecked" )
- << " QCheckListItem" << endl;
+ << " TQCheckListItem" << endl;
KPluginInfo * info = d->plugininfomap[ citem ];
info->setPluginEnabled( checked );
@@ -151,7 +151,7 @@ void ComponentsDialog::executed( QListViewItem * item )
void ComponentsDialog::savePluginInfos()
{
- for( QValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = d->plugininfolist.begin();
it != d->plugininfolist.end(); ++it )
{
if( ( *it )->config() )
diff --git a/kutils/ksettings/componentsdialog.h b/kutils/ksettings/componentsdialog.h
index e5325f707..2847622a8 100644
--- a/kutils/ksettings/componentsdialog.h
+++ b/kutils/ksettings/componentsdialog.h
@@ -47,7 +47,7 @@ class KUTILS_EXPORT ComponentsDialog : public KDialogBase
@param parent parent widget
@param name name
*/
- ComponentsDialog( QWidget * parent = 0, const char * name = 0 );
+ ComponentsDialog( TQWidget * parent = 0, const char * name = 0 );
~ComponentsDialog();
/**
@@ -57,11 +57,11 @@ class KUTILS_EXPORT ComponentsDialog : public KDialogBase
/**
Set list of plugins the dialog offers for selection. (Overwrites a previous list)
*/
- void setPluginInfos( const QMap<QString, KPluginInfo*> & plugininfos );
+ void setPluginInfos( const TQMap<TQString, KPluginInfo*> & plugininfos );
/**
Set list of plugins the dialog offers for selection. (Overwrites a previous list)
*/
- void setPluginInfos( const QValueList<KPluginInfo *> &plugins );
+ void setPluginInfos( const TQValueList<KPluginInfo *> &plugins );
/**
* reimplemented
@@ -73,7 +73,7 @@ class KUTILS_EXPORT ComponentsDialog : public KDialogBase
void slotApply();
private slots:
- void executed( QListViewItem * );
+ void executed( TQListViewItem * );
private:
void savePluginInfos();
diff --git a/kutils/ksettings/dialog.cpp b/kutils/ksettings/dialog.cpp
index c98c68872..35ad153ef 100644
--- a/kutils/ksettings/dialog.cpp
+++ b/kutils/ksettings/dialog.cpp
@@ -31,8 +31,8 @@
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
#include <kiconloader.h>
-#include <qvbox.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
#include "kcmoduleinfo.h"
namespace KSettings
@@ -40,13 +40,13 @@ namespace KSettings
struct GroupInfo
{
- QString id;
- QString name;
- QString comment;
- QString icon;
+ TQString id;
+ TQString name;
+ TQString comment;
+ TQString icon;
int weight;
- QString parentid;
- QWidget * page;
+ TQString parentid;
+ TQWidget * page;
};
// The TreeList can get really complicated. That's why a tree data structure
@@ -54,7 +54,7 @@ struct GroupInfo
class PageNode
{
private:
- typedef QValueList<PageNode*> List;
+ typedef TQValueList<PageNode*> List;
enum Type { KCM, Group, Root };
union Value
{
@@ -185,17 +185,17 @@ class PageNode
( *it )->makeDirty();
}
- QString name() const
+ TQString name() const
{
if( Root == m_type )
- return QString::fromAscii( "root node" );
+ return TQString::fromAscii( "root node" );
return ( KCM == m_type ) ? m_value.kcm->moduleName()
: m_value.group->name;
}
- QStringList parentNames() const
+ TQStringList parentNames() const
{
- QStringList ret;
+ TQStringList ret;
PageNode * node = m_parent;
while( node && node->m_type != Root )
{
@@ -218,13 +218,13 @@ class PageNode
}
if( Group == m_type && 0 == m_value.group->page )
{
- QPixmap icon;
+ TQPixmap icon;
if( ! m_value.group->icon.isNull() )
icon = SmallIcon( m_value.group->icon,
IconSize( KIcon::Small ) );
- QVBox * page = dlg->addVBoxPage( m_value.group->name,
- QString::null, icon );
- QLabel * comment = new QLabel( m_value.group->comment, page );
+ TQVBox * page = dlg->addVBoxPage( m_value.group->name,
+ TQString::null, icon );
+ TQLabel * comment = new TQLabel( m_value.group->comment, page );
comment->setTextFormat( Qt::RichText );
m_value.group->page = page;
}
@@ -291,7 +291,7 @@ class PageNode
return false;
}
- bool insert( KCModuleInfo * info, const QString & parentid )
+ bool insert( KCModuleInfo * info, const TQString & parentid )
{
if( parentid.isNull() )
{
@@ -349,14 +349,14 @@ class Dialog::DialogPrivate
bool staticlistview;
KCMultiDialog * dlg;
PageNode pagetree;
- QWidget * parentwidget;
- QStringList registeredComponents;
- QValueList<KService::Ptr> services;
- QMap<QString, KPluginInfo*> plugininfomap;
+ TQWidget * parentwidget;
+ TQStringList registeredComponents;
+ TQValueList<KService::Ptr> services;
+ TQMap<TQString, KPluginInfo*> plugininfomap;
};
-Dialog::Dialog( QWidget * parent, const char * name )
- : QObject( parent, name )
+Dialog::Dialog( TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -365,8 +365,8 @@ Dialog::Dialog( QWidget * parent, const char * name )
}
Dialog::Dialog( ContentInListView content,
- QWidget * parent, const char * name )
- : QObject( parent, name )
+ TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -374,9 +374,9 @@ Dialog::Dialog( ContentInListView content,
d->services = instanceServices();
}
-Dialog::Dialog( const QStringList & components,
- QWidget * parent, const char * name )
- : QObject( parent, name )
+Dialog::Dialog( const TQStringList & components,
+ TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -384,9 +384,9 @@ Dialog::Dialog( const QStringList & components,
d->services = instanceServices() + parentComponentsServices( components );
}
-Dialog::Dialog( const QStringList & components,
- ContentInListView content, QWidget * parent, const char * name )
- : QObject( parent, name )
+Dialog::Dialog( const TQStringList & components,
+ ContentInListView content, TQWidget * parent, const char * name )
+ : TQObject( parent, name )
, d( new DialogPrivate( this ) )
{
d->parentwidget = parent;
@@ -399,9 +399,9 @@ Dialog::~Dialog()
delete d;
}
-void Dialog::addPluginInfos( const QValueList<KPluginInfo*> & plugininfos )
+void Dialog::addPluginInfos( const TQValueList<KPluginInfo*> & plugininfos )
{
- for( QValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin();
+ for( TQValueList<KPluginInfo*>::ConstIterator it = plugininfos.begin();
it != plugininfos.end(); ++it )
{
d->registeredComponents.append( ( *it )->pluginName() );
@@ -425,16 +425,16 @@ KCMultiDialog * Dialog::dialog()
return d->dlg;
}
-QValueList<KService::Ptr> Dialog::instanceServices() const
+TQValueList<KService::Ptr> Dialog::instanceServices() const
{
kdDebug( 700 ) << k_funcinfo << endl;
- QString instanceName = KGlobal::instance()->instanceName();
+ TQString instanceName = KGlobal::instance()->instanceName();
d->registeredComponents.append( instanceName );
kdDebug( 700 ) << "calling KServiceGroup::childGroup( " << instanceName
<< " )" << endl;
KServiceGroup::Ptr service = KServiceGroup::childGroup( instanceName );
- QValueList<KService::Ptr> ret;
+ TQValueList<KService::Ptr> ret;
if( service && service->isValid() )
{
@@ -458,11 +458,11 @@ QValueList<KService::Ptr> Dialog::instanceServices() const
return ret;
}
-QValueList<KService::Ptr> Dialog::parentComponentsServices(
- const QStringList & kcdparents ) const
+TQValueList<KService::Ptr> Dialog::parentComponentsServices(
+ const TQStringList & kcdparents ) const
{
d->registeredComponents += kcdparents;
- QString constraint = kcdparents.join(
+ TQString constraint = kcdparents.join(
"' in [X-KDE-ParentComponents]) or ('" );
constraint = "('" + constraint + "' in [X-KDE-ParentComponents])";
@@ -478,9 +478,9 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const
kdDebug( 700 ) << "check whether the " << moduleinfo->moduleName()
<< " KCM should be shown" << endl;
// for all parent components
- QStringList parentComponents = moduleinfo->service()->property(
+ TQStringList parentComponents = moduleinfo->service()->property(
"X-KDE-ParentComponents" ).toStringList();
- for( QStringList::ConstIterator pcit = parentComponents.begin();
+ for( TQStringList::ConstIterator pcit = parentComponents.begin();
pcit != parentComponents.end(); ++pcit )
{
// if the parentComponent is not registered ignore it
@@ -509,15 +509,15 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const
return enabled;
}
-void Dialog::parseGroupFile( const QString & filename )
+void Dialog::parseGroupFile( const TQString & filename )
{
KSimpleConfig file( filename );
- QStringList groups = file.groupList();
- for( QStringList::ConstIterator it = groups.begin(); it != groups.end();
+ TQStringList groups = file.groupList();
+ for( TQStringList::ConstIterator it = groups.begin(); it != groups.end();
++it )
{
GroupInfo group;
- QString id = *it;
+ TQString id = *it;
file.setGroup( id.utf8() );
group.id = id;
group.name = file.readEntry( "Name" );
@@ -532,26 +532,26 @@ void Dialog::parseGroupFile( const QString & filename )
void Dialog::createDialogFromServices()
{
// read .setdlg files
- QString setdlgpath = locate( "appdata",
+ TQString setdlgpath = locate( "appdata",
KGlobal::instance()->instanceName() + ".setdlg" );
- QStringList setdlgaddon = KGlobal::dirs()->findAllResources( "appdata",
+ TQStringList setdlgaddon = KGlobal::dirs()->findAllResources( "appdata",
"ksettingsdialog/*.setdlg" );
if( ! setdlgpath.isNull() )
parseGroupFile( setdlgpath );
if( setdlgaddon.size() > 0 )
- for( QStringList::ConstIterator it = setdlgaddon.begin();
+ for( TQStringList::ConstIterator it = setdlgaddon.begin();
it != setdlgaddon.end(); ++it )
parseGroupFile( *it );
// now we process the KCModule services
- for( QValueList<KService::Ptr>::ConstIterator it = d->services.begin();
+ for( TQValueList<KService::Ptr>::ConstIterator it = d->services.begin();
it != d->services.end(); ++it )
{
// we create the KCModuleInfo
KCModuleInfo * info = new KCModuleInfo( *it );
- QString parentid;
- QVariant tmp = info->service()->property( "X-KDE-CfgDlgHierarchy",
- QVariant::String );
+ TQString parentid;
+ TQVariant tmp = info->service()->property( "X-KDE-CfgDlgHierarchy",
+ TQVariant::String );
if( tmp.isValid() )
parentid = tmp.toString();
d->pagetree.insert( info, parentid );
@@ -588,14 +588,14 @@ void Dialog::createDialogFromServices()
if( ! d->staticlistview )
d->dlg->addButtonBelowList( i18n( "Select Components..." ), this,
- SLOT( configureTree() ) );
+ TQT_SLOT( configureTree() ) );
- connect( d->dlg, SIGNAL( okClicked() ), Dispatcher::self(),
- SLOT( syncConfiguration() ) );
- connect( d->dlg, SIGNAL( applyClicked() ), Dispatcher::self(),
- SLOT( syncConfiguration() ) );
- connect( d->dlg, SIGNAL( configCommitted( const QCString & ) ),
- Dispatcher::self(), SLOT( reparseConfiguration( const QCString & ) ) );
+ connect( d->dlg, TQT_SIGNAL( okClicked() ), Dispatcher::self(),
+ TQT_SLOT( syncConfiguration() ) );
+ connect( d->dlg, TQT_SIGNAL( applyClicked() ), Dispatcher::self(),
+ TQT_SLOT( syncConfiguration() ) );
+ connect( d->dlg, TQT_SIGNAL( configCommitted( const TQCString & ) ),
+ Dispatcher::self(), TQT_SLOT( reparseConfiguration( const TQCString & ) ) );
d->pagetree.addToDialog( d->dlg );
@@ -609,13 +609,13 @@ void Dialog::configureTree()
ComponentsDialog * subdlg = new ComponentsDialog( d->dlg );
subdlg->setPluginInfos( d->plugininfomap );
subdlg->show();
- connect( subdlg, SIGNAL( okClicked() ), this, SLOT( updateTreeList() ) );
- connect( subdlg, SIGNAL( applyClicked() ), this, SLOT( updateTreeList() ) );
- connect( subdlg, SIGNAL( okClicked() ), this,
- SIGNAL( pluginSelectionChanged() ) );
- connect( subdlg, SIGNAL( applyClicked() ), this,
- SIGNAL( pluginSelectionChanged() ) );
- connect( subdlg, SIGNAL( finished() ), subdlg, SLOT( delayedDestruct() ) );
+ connect( subdlg, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( updateTreeList() ) );
+ connect( subdlg, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( updateTreeList() ) );
+ connect( subdlg, TQT_SIGNAL( okClicked() ), this,
+ TQT_SIGNAL( pluginSelectionChanged() ) );
+ connect( subdlg, TQT_SIGNAL( applyClicked() ), this,
+ TQT_SIGNAL( pluginSelectionChanged() ) );
+ connect( subdlg, TQT_SIGNAL( finished() ), subdlg, TQT_SLOT( delayedDestruct() ) );
}
void Dialog::updateTreeList()
diff --git a/kutils/ksettings/dialog.h b/kutils/ksettings/dialog.h
index 84f4619be..f19bf225a 100644
--- a/kutils/ksettings/dialog.h
+++ b/kutils/ksettings/dialog.h
@@ -20,7 +20,7 @@
#ifndef KSETTINGS_DIALOG_H
#define KSETTINGS_DIALOG_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kservice.h>
template<class T> class QValueList;
@@ -52,14 +52,14 @@ namespace KSettings
* If you use a KPart that was not especially designed for your app you can use
* the second constructor:
* \code
- * QStringList kpartslist;
+ * TQStringList kpartslist;
* for( all my kparts )
* kpartslist += m_mypart->instance().instanceName();
* m_cfgdlg = new Dialog( kpartslist, this );
* \endcode
* and the action for the config dialog is connected to the show slot:
* \code
- * KStdAction::preferences( m_cfgdlg, SLOT( show() ), actionCollection() );
+ * KStdAction::preferences( m_cfgdlg, TQT_SLOT( show() ), actionCollection() );
* \endcode
*
* If you need to be informed when the config was changed and applied in the
@@ -102,7 +102,7 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( QWidget * parent = 0, const char * name = 0 );
+ Dialog( TQWidget * parent = 0, const char * name = 0 );
/**
* Construct a new Preferences Dialog for the application. It uses all
@@ -115,14 +115,14 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( ContentInListView content = Static, QWidget * parent = 0,
+ Dialog( ContentInListView content = Static, TQWidget * parent = 0,
const char * name = 0 );
/**
* Construct a new Preferences Dialog with the pages for the selected
* instance names. For example if you want to have the configuration
* pages for the kviewviewer KPart you would pass a
- * QStringList consisting of only the name of the part "kviewviewer".
+ * TQStringList consisting of only the name of the part "kviewviewer".
*
* @param components A list of the names of the components that your
* config dialog should merge the config pages in.
@@ -131,14 +131,14 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( const QStringList & components, QWidget * parent = 0,
+ Dialog( const TQStringList & components, TQWidget * parent = 0,
const char * name = 0 );
/**
* Construct a new Preferences Dialog with the pages for the selected
* instance names. For example if you want to have the configuration
* pages for the kviewviewer KPart you would pass a
- * QStringList consisting of only the name of the part "kviewviewer".
+ * TQStringList consisting of only the name of the part "kviewviewer".
*
* @param components A list of the names of the components that your
* config dialog should merge the config pages in.
@@ -149,8 +149,8 @@ class KUTILS_EXPORT Dialog : public QObject
* widget.
* @param name name
*/
- Dialog( const QStringList & components, ContentInListView
- content, QWidget * parent = 0, const char * name = 0 );
+ Dialog( const TQStringList & components, ContentInListView
+ content, TQWidget * parent = 0, const char * name = 0 );
~Dialog();
@@ -158,7 +158,7 @@ class KUTILS_EXPORT Dialog : public QObject
* If you use a Configurable dialog you need to pass KPluginInfo
* objects that the dialog should configure.
*/
- void addPluginInfos( const QValueList<KPluginInfo*> & plugininfos );
+ void addPluginInfos( const TQValueList<KPluginInfo*> & plugininfos );
KCMultiDialog * dialog();
@@ -190,21 +190,21 @@ class KUTILS_EXPORT Dialog : public QObject
*/
bool isPluginForKCMEnabled( KCModuleInfo * ) const;
- QValueList<KService::Ptr> instanceServices() const;
- QValueList<KService::Ptr> parentComponentsServices(
- const QStringList & ) const;
+ TQValueList<KService::Ptr> instanceServices() const;
+ TQValueList<KService::Ptr> parentComponentsServices(
+ const TQStringList & ) const;
/**
* @internal
* Read the .setdlg file and add it to the groupmap
*/
- void parseGroupFile( const QString & );
+ void parseGroupFile( const TQString & );
/**
* @internal
* If this module is put into a TreeList hierarchy this will return a
* list of the names of the parent modules.
*/
- QStringList parentModuleNames( KCModuleInfo * );
+ TQStringList parentModuleNames( KCModuleInfo * );
/**
* @internal
diff --git a/kutils/ksettings/dispatcher.cpp b/kutils/ksettings/dispatcher.cpp
index 4e54538d8..7f20c1bc3 100644
--- a/kutils/ksettings/dispatcher.cpp
+++ b/kutils/ksettings/dispatcher.cpp
@@ -19,7 +19,7 @@
#include "ksettings/dispatcher.h"
-#include <qsignal.h>
+#include <tqsignal.h>
#include <kstaticdeleter.h>
#include <kdebug.h>
@@ -45,8 +45,8 @@ Dispatcher * Dispatcher::self()
return m_self;
}
-Dispatcher::Dispatcher( QObject * parent, const char * name )
- : QObject( parent, name )
+Dispatcher::Dispatcher( TQObject * parent, const char * name )
+ : TQObject( parent, name )
//, d( 0 )
{
kdDebug( 701 ) << k_funcinfo << endl;
@@ -58,32 +58,32 @@ Dispatcher::~Dispatcher()
//delete d;
}
-void Dispatcher::registerInstance( KInstance * instance, QObject * recv, const char * slot )
+void Dispatcher::registerInstance( KInstance * instance, TQObject * recv, const char * slot )
{
assert( instance != 0 );
// keep the KInstance around and call
// instance->config()->reparseConfiguration when the app should reparse
- QCString instanceName = instance->instanceName();
+ TQCString instanceName = instance->instanceName();
kdDebug( 701 ) << k_funcinfo << instanceName << endl;
m_instanceName[ recv ] = instanceName;
- QSignal * sig;
+ TQSignal * sig;
if( m_instanceInfo.contains( instanceName ) )
{
sig = m_instanceInfo[ instanceName ].signal;
}
else
{
- sig = new QSignal( this, "signal dispatcher" );
+ sig = new TQSignal( this, "signal dispatcher" );
m_instanceInfo[ instanceName ].signal = sig;
m_instanceInfo[ instanceName ].instance = instance;
}
sig->connect( recv, slot );
++m_instanceInfo[ instanceName ].count;
- connect( recv, SIGNAL( destroyed( QObject * ) ), this, SLOT( unregisterInstance( QObject * ) ) );
+ connect( recv, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( unregisterInstance( TQObject * ) ) );
}
-KConfig * Dispatcher::configForInstanceName( const QCString & instanceName )
+KConfig * Dispatcher::configForInstanceName( const TQCString & instanceName )
{
kdDebug( 701 ) << k_funcinfo << endl;
if( m_instanceInfo.contains( instanceName ) )
@@ -97,17 +97,17 @@ KConfig * Dispatcher::configForInstanceName( const QCString & instanceName )
return 0;
}
-QStrList Dispatcher::instanceNames() const
+TQStrList Dispatcher::instanceNames() const
{
kdDebug( 701 ) << k_funcinfo << endl;
- QStrList names;
- for( QMap<QCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
+ TQStrList names;
+ for( TQMap<TQCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
if( ( *it ).count > 0 )
names.append( it.key() );
return names;
}
-void Dispatcher::reparseConfiguration( const QCString & instanceName )
+void Dispatcher::reparseConfiguration( const TQCString & instanceName )
{
kdDebug( 701 ) << k_funcinfo << instanceName << endl;
// check if the instanceName is valid:
@@ -116,7 +116,7 @@ void Dispatcher::reparseConfiguration( const QCString & instanceName )
// first we reparse the config of the instance so that the KConfig object
// will be up to date
m_instanceInfo[ instanceName ].instance->config()->reparseConfiguration();
- QSignal * sig = m_instanceInfo[ instanceName ].signal;
+ TQSignal * sig = m_instanceInfo[ instanceName ].signal;
if( sig )
{
kdDebug( 701 ) << "emit signal to instance" << endl;
@@ -126,16 +126,16 @@ void Dispatcher::reparseConfiguration( const QCString & instanceName )
void Dispatcher::syncConfiguration()
{
- for( QMap<QCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
+ for( TQMap<TQCString, InstanceInfo>::ConstIterator it = m_instanceInfo.begin(); it != m_instanceInfo.end(); ++it )
{
( *it ).instance->config()->sync();
}
}
-void Dispatcher::unregisterInstance( QObject * obj )
+void Dispatcher::unregisterInstance( TQObject * obj )
{
kdDebug( 701 ) << k_funcinfo << endl;
- QCString name = m_instanceName[ obj ];
+ TQCString name = m_instanceName[ obj ];
m_instanceName.remove( obj ); //obj will be destroyed when we return, so we better remove this entry
--m_instanceInfo[ name ].count;
if( m_instanceInfo[ name ].count == 0 )
@@ -145,7 +145,7 @@ void Dispatcher::unregisterInstance( QObject * obj )
}
}
-//X KInstance * Dispatcher::instanceForName( const QCString & instanceName )
+//X KInstance * Dispatcher::instanceForName( const TQCString & instanceName )
//X {
//X return m_instanceInfo[ instanceName ].instance;
//X }
diff --git a/kutils/ksettings/dispatcher.h b/kutils/ksettings/dispatcher.h
index 5f6270bb5..f428b35fd 100644
--- a/kutils/ksettings/dispatcher.h
+++ b/kutils/ksettings/dispatcher.h
@@ -20,8 +20,8 @@
#ifndef KSETTINGS_DISPATCHER_H
#define KSETTINGS_DISPATCHER_H
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <kdelibs_export.h>
class QCString;
@@ -42,7 +42,7 @@ namespace KSettings
* into the KConfigureDialog you need a way to get notified. This is what you
* do:
* \code
- * Dispatcher::self()->registerInstance( instance(), this, SLOT( loadSettings() ) );
+ * Dispatcher::self()->registerInstance( instance(), this, TQT_SLOT( loadSettings() ) );
* \endcode
*
* @author Matthias Kretz <kretz@kde.org>
@@ -69,26 +69,26 @@ class KUTILS_EXPORT Dispatcher : public QObject
*
* @param instance The KInstance object
* @param recv The object that should receive the signal
- * @param slot The slot to be called: SLOT( slotName() )
+ * @param slot The slot to be called: TQT_SLOT( slotName() )
*/
- void registerInstance( KInstance * instance, QObject * recv, const char * slot );
+ void registerInstance( KInstance * instance, TQObject * recv, const char * slot );
/**
* @return the KConfig object that belongs to the instanceName
*/
- KConfig * configForInstanceName( const QCString & instanceName );
+ KConfig * configForInstanceName( const TQCString & instanceName );
/**
* @return a list of all the instance names that are currently
* registered
*/
- QStrList instanceNames() const;
+ TQStrList instanceNames() const;
//X /**
//X * @return The KInstance object belonging to the instance name you pass
//X * (only works for registered instances of course).
//X */
-//X KInstance * instanceForName( const QCString & instanceName );
+//X KInstance * instanceForName( const TQCString & instanceName );
public slots:
/**
@@ -97,7 +97,7 @@ class KUTILS_EXPORT Dispatcher : public QObject
*
* @param instanceName The value of X-KDE-ParentComponents.
*/
- void reparseConfiguration( const QCString & instanceName );
+ void reparseConfiguration( const TQCString & instanceName );
/**
* When this slot is called the KConfig objects of all the registered
@@ -108,20 +108,20 @@ class KUTILS_EXPORT Dispatcher : public QObject
void syncConfiguration();
private slots:
- void unregisterInstance( QObject * );
+ void unregisterInstance( TQObject * );
private:
- Dispatcher( QObject * parent = 0, const char * name = 0 );
+ Dispatcher( TQObject * parent = 0, const char * name = 0 );
~Dispatcher();
static Dispatcher * m_self;
struct InstanceInfo {
KInstance * instance;
- QSignal * signal;
+ TQSignal * signal;
int count;
};
- QMap<QCString, InstanceInfo> m_instanceInfo;
- QMap<QObject *, QCString> m_instanceName;
+ TQMap<TQCString, InstanceInfo> m_instanceInfo;
+ TQMap<TQObject *, TQCString> m_instanceName;
class DispatcherPrivate;
DispatcherPrivate * d;
diff --git a/kutils/ksettings/pluginpage.cpp b/kutils/ksettings/pluginpage.cpp
index 2456ebf86..99ea904f2 100644
--- a/kutils/ksettings/pluginpage.cpp
+++ b/kutils/ksettings/pluginpage.cpp
@@ -19,7 +19,7 @@
#include "ksettings/pluginpage.h"
#include "kpluginselector.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include "ksettings/dispatcher.h"
@@ -37,24 +37,24 @@ class PluginPage::PluginPagePrivate
KPluginSelector * selwid;
};
- PluginPage::PluginPage( QWidget * parent, const char * name, const QStringList & args )
+ PluginPage::PluginPage( TQWidget * parent, const char * name, const TQStringList & args )
: KCModule( parent, name, args )
, d( new PluginPagePrivate )
{
- ( new QVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
d->selwid = new KPluginSelector( this );
- connect( d->selwid, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
+ connect( d->selwid, TQT_SIGNAL( changed( bool ) ), this, TQT_SIGNAL( changed( bool ) ) );
}
- PluginPage::PluginPage( KInstance * instance, QWidget * parent, const QStringList & args )
+ PluginPage::PluginPage( KInstance * instance, TQWidget * parent, const TQStringList & args )
: KCModule( instance, parent, args )
, d( new PluginPagePrivate )
{
- ( new QVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this, 0, KDialog::spacingHint() ) )->setAutoAdd( true );
d->selwid = new KPluginSelector( this );
- connect( d->selwid, SIGNAL( changed( bool ) ), this, SIGNAL( changed( bool ) ) );
- connect( d->selwid, SIGNAL( configCommitted( const QCString & ) ),
- Dispatcher::self(), SLOT( reparseConfiguration( const QCString & ) ) );
+ connect( d->selwid, TQT_SIGNAL( changed( bool ) ), this, TQT_SIGNAL( changed( bool ) ) );
+ connect( d->selwid, TQT_SIGNAL( configCommitted( const TQCString & ) ),
+ Dispatcher::self(), TQT_SLOT( reparseConfiguration( const TQCString & ) ) );
}
PluginPage::~PluginPage()
diff --git a/kutils/ksettings/pluginpage.h b/kutils/ksettings/pluginpage.h
index fc6120f78..acd0ace1f 100644
--- a/kutils/ksettings/pluginpage.h
+++ b/kutils/ksettings/pluginpage.h
@@ -38,10 +38,10 @@ namespace KSettings
* PluginPage and add the appropriate plugin infos to the KPluginSelector.
* This is done using the pluginSelector() method:
* \code
- * typedef KGenericFactory<MyAppPluginConfig, QWidget> MyAppPluginConfigFactory;
+ * typedef KGenericFactory<MyAppPluginConfig, TQWidget> MyAppPluginConfigFactory;
* K_EXPORT_COMPONENT_FACTORY( kcm_myapppluginconfig, MyAppPluginConfigFactory( "kcm_myapppluginconfig" ) );
*
- * MyAppPluginConfig( QWidget * parent, const char *, const QStringList & args )
+ * MyAppPluginConfig( TQWidget * parent, const char *, const TQStringList & args )
* : PluginPage( MyAppPluginConfigFactory::instance(), parent, args )
* {
* pluginSelector()->addPlugins( KGlobal::instance()->instanceName(), i18n( "General Plugins" ), "General" );
@@ -78,13 +78,13 @@ class KUTILS_EXPORT PluginPage : public KCModule
* Standart KCModule constructor. Automatically creates the the
* KPluginSelector widget.
*/
- PluginPage( QWidget * parent = 0, const char * name = 0, const QStringList & args = QStringList() );
+ PluginPage( TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() );
/**
* Standart KCModule constructor. Automatically creates the the
* KPluginSelector widget.
*/
- PluginPage( KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList() );
+ PluginPage( KInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() );
~PluginPage();
diff --git a/kutils/tests/kfindtest.cpp b/kutils/tests/kfindtest.cpp
index 17e8da7ee..1652eb625 100644
--- a/kutils/tests/kfindtest.cpp
+++ b/kutils/tests/kfindtest.cpp
@@ -28,12 +28,12 @@
#include <stdlib.h>
#include <assert.h>
-static bool check(QString txt, QString a, QString b) // from kurltest
+static bool check(TQString txt, TQString a, TQString b) // from kurltest
{
if (a.isEmpty())
- a = QString::null;
+ a = TQString::null;
if (b.isEmpty())
- b = QString::null;
+ b = TQString::null;
if (a == b) {
kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
}
@@ -44,7 +44,7 @@ static bool check(QString txt, QString a, QString b) // from kurltest
return true;
}
-void KFindTest::changeText(uint line, const QString &text)
+void KFindTest::changeText(uint line, const TQString &text)
{
Q_ASSERT(line < m_text.count());
Q_ASSERT(m_find != 0);
@@ -54,15 +54,15 @@ void KFindTest::changeText(uint line, const QString &text)
m_find->setData(line, text);
}
-void KFindTest::find(const QString &pattern, long options)
+void KFindTest::find(const TQString &pattern, long options)
{
delete m_find;
m_find = new KFind(pattern, options, 0);
- connect(m_find, SIGNAL(highlight(const QString &, int, int)),
- SLOT(slotHighlight(const QString &, int, int)));
- connect(m_find, SIGNAL(highlight(int, int, int)),
- SLOT(slotHighlight(int, int, int)));
+ connect(m_find, TQT_SIGNAL(highlight(const TQString &, int, int)),
+ TQT_SLOT(slotHighlight(const TQString &, int, int)));
+ connect(m_find, TQT_SIGNAL(highlight(int, int, int)),
+ TQT_SLOT(slotHighlight(int, int, int)));
m_line = 0;
KFind::Result result = KFind::NoMatch;
@@ -79,7 +79,7 @@ void KFindTest::find(const QString &pattern, long options)
} while(result == KFind::NoMatch && m_line < m_text.count());
}
-void KFindTest::findNext(const QString &pattern)
+void KFindTest::findNext(const TQString &pattern)
{
Q_ASSERT(m_find != 0);
@@ -109,16 +109,16 @@ void KFindTest::findNext(const QString &pattern)
//kdDebug() << "find next completed" << m_line << endl;
}
-void KFindTest::slotHighlight(const QString &text, int index, int matchedLength)
+void KFindTest::slotHighlight(const TQString &text, int index, int matchedLength)
{
- m_hits.append("line: \"" + text + "\", index: " + QString::number(index) +
- ", length: " + QString::number(matchedLength) + "\n");
+ m_hits.append("line: \"" + text + "\", index: " + TQString::number(index) +
+ ", length: " + TQString::number(matchedLength) + "\n");
}
void KFindTest::slotHighlight(int id, int index, int matchedLength)
{
- m_hits.append("line: \"" + m_text[id] + "\", index: " + QString::number(index) +
- ", length: " + QString::number(matchedLength) + "\n");
+ m_hits.append("line: \"" + m_text[id] + "\", index: " + TQString::number(index) +
+ ", length: " + TQString::number(matchedLength) + "\n");
}
int main(int argc, char **argv)
@@ -126,7 +126,7 @@ int main(int argc, char **argv)
KCmdLineArgs::init(argc, argv, "kfindtest", "KFindTest", 0, 0, false);
KApplication app;
- QString text = "This file is part of the KDE project.\n"
+ TQString text = "This file is part of the KDE project.\n"
"This library is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU Library General Public\n"
"License version 2, as published by the Free Software Foundation.\n"
@@ -141,12 +141,12 @@ int main(int argc, char **argv)
" the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n"
" Boston, MA 02110-1301, USA.\n";
- QString output1 = "line: \"This file is part of the KDE project.\", index: 0, length: 4\n"
+ TQString output1 = "line: \"This file is part of the KDE project.\", index: 0, length: 4\n"
"line: \"This library is free software; you can redistribute it and/or\", index: 0, length: 4\n"
"line: \" This library is distributed in the hope that it will be useful,\", index: 4, length: 4\n"
"line: \" along with this library; see the file COPYING.LIB. If not, write to\", index: 15, length: 4\n";
- QString output2 = "line: \"This file is part of the KDE project.\", index: 0, length: 0\n"
+ TQString output2 = "line: \"This file is part of the KDE project.\", index: 0, length: 0\n"
"line: \"This file is part of the KDE project.\", index: 2, length: 1\n"
"line: \"This file is part of the KDE project.\", index: 2, length: 2\n"
"line: \"This library is free software; you can redistribute it and/or\", index: 42, length: 3\n"
@@ -161,7 +161,7 @@ int main(int argc, char **argv)
"line: \"This library is free software; you can redistribute it and/or\", index: 16, length: 4\n"
"line: \"License version 2, as published by the Free Software Foundation.\", index: 44, length: 19\n";
- QString output3 = "line: \"This file is part of the KDE project.\", index: 0, length: 0\n"
+ TQString output3 = "line: \"This file is part of the KDE project.\", index: 0, length: 0\n"
"line: \"This file is part of the KDE project.\", index: 2, length: 1\n"
"line: \"This file is part of the KDE project.\", index: 2, length: 2\n"
"line: \"This library is free software; you can redistribute it and/or\", index: 42, length: 3\n"
@@ -179,7 +179,7 @@ int main(int argc, char **argv)
"line: \"License version 2, as published by the Free Software Foundation.\", index: 39, length: 4\n"
"line: \"License version 2, as published by the Free Software Foundation.\", index: 44, length: 19\n";
- KFindTest *test = new KFindTest(QStringList::split('\n', text, true));
+ KFindTest *test = new KFindTest(TQStringList::split('\n', text, true));
kdDebug() << "Plain static search..." << endl;
diff --git a/kutils/tests/kfindtest.h b/kutils/tests/kfindtest.h
index 2cb60ed76..b3be84a8b 100644
--- a/kutils/tests/kfindtest.h
+++ b/kutils/tests/kfindtest.h
@@ -20,8 +20,8 @@
#ifndef KFINDTEST_H
#define KFINDTEST_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class KFind;
@@ -30,30 +30,30 @@ class KFindTest : public QObject
Q_OBJECT
public:
- KFindTest(const QStringList &text) :
- QObject(0),
+ KFindTest(const TQStringList &text) :
+ TQObject(0),
m_find(0),
m_text(text),
m_line(0)
{}
- void find(const QString &pattern, long options = 0);
- void findNext(const QString &pattern = QString::null);
+ void find(const TQString &pattern, long options = 0);
+ void findNext(const TQString &pattern = TQString::null);
- void changeText(uint line, const QString &text);
+ void changeText(uint line, const TQString &text);
- const QStringList &hits() const { return m_hits; }
+ const TQStringList &hits() const { return m_hits; }
void clearHits() { m_hits.clear(); }
public slots:
- void slotHighlight(const QString &text, int index, int matchedLength);
+ void slotHighlight(const TQString &text, int index, int matchedLength);
void slotHighlight(int id, int index, int matchedLengthlength);
private:
KFind *m_find;
- QStringList m_text;
+ TQStringList m_text;
uint m_line;
- QStringList m_hits;
+ TQStringList m_hits;
};
#endif
diff --git a/kutils/tests/kreplacetest.cpp b/kutils/tests/kreplacetest.cpp
index 9c6f67b3a..a810b7706 100644
--- a/kutils/tests/kreplacetest.cpp
+++ b/kutils/tests/kreplacetest.cpp
@@ -21,7 +21,7 @@
#include <kcmdlineargs.h>
#include <kapplication.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include <kpushbutton.h>
#include "../kreplace.h"
#include "../kreplacedialog.h"
@@ -30,7 +30,7 @@
#include <kdebug.h>
#include <stdlib.h>
-void KReplaceTest::replace( const QString &pattern, const QString &replacement, long options )
+void KReplaceTest::replace( const TQString &pattern, const TQString &replacement, long options )
{
m_needEventLoop = false;
// This creates a replace-next-prompt dialog if needed.
@@ -38,14 +38,14 @@ void KReplaceTest::replace( const QString &pattern, const QString &replacement,
// Connect highlight signal to code which handles highlighting
// of found text.
- connect(m_replace, SIGNAL( highlight( const QString &, int, int ) ),
- this, SLOT( slotHighlight( const QString &, int, int ) ) );
+ connect(m_replace, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
// Connect findNext signal - called when pressing the button in the dialog
- connect(m_replace, SIGNAL( findNext() ),
- this, SLOT( slotReplaceNext() ) );
+ connect(m_replace, TQT_SIGNAL( findNext() ),
+ this, TQT_SLOT( slotReplaceNext() ) );
// Connect replace signal - called when doing a replacement
- connect(m_replace, SIGNAL( replace(const QString &, int, int, int) ),
- this, SLOT( slotReplace(const QString &, int, int, int) ) );
+ connect(m_replace, TQT_SIGNAL( replace(const TQString &, int, int, int) ),
+ this, TQT_SLOT( slotReplace(const TQString &, int, int, int) ) );
// Go to initial position
if ( (options & KReplaceDialog::FromCursor) == 0 )
@@ -63,7 +63,7 @@ void KReplaceTest::replace( const QString &pattern, const QString &replacement,
qApp->eventLoop()->enterLoop();
}
-void KReplaceTest::slotHighlight( const QString &str, int matchingIndex, int matchedLength )
+void KReplaceTest::slotHighlight( const TQString &str, int matchingIndex, int matchedLength )
{
kdDebug() << "slotHighlight Index:" << matchingIndex << " Length:" << matchedLength
<< " Substr:" << str.mid(matchingIndex, matchedLength)
@@ -79,7 +79,7 @@ void KReplaceTest::slotHighlight( const QString &str, int matchingIndex, int mat
}
-void KReplaceTest::slotReplace(const QString &text, int replacementIndex, int replacedLength, int matchedLength)
+void KReplaceTest::slotReplace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength)
{
kdDebug() << "slotReplace index=" << replacementIndex << " replacedLength=" << replacedLength << " matchedLength=" << matchedLength << " text=" << text.left( 50 ) << endl;
*m_currentPos = text; // KReplace hacked the replacement into 'text' in already.
@@ -120,7 +120,7 @@ void KReplaceTest::slotReplaceNext()
void KReplaceTest::print()
{
- QStringList::Iterator it = m_text.begin();
+ TQStringList::Iterator it = m_text.begin();
for ( ; it != m_text.end() ; ++it )
kdDebug() << *it << endl;
}
@@ -130,9 +130,9 @@ void KReplaceTest::print()
static void testReplaceSimple( int options, int button = 0 )
{
kdDebug() << "testReplaceSimple: " << options << endl;
- KReplaceTest test( QString( "hellohello" ), button );
+ KReplaceTest test( TQString( "hellohello" ), button );
test.replace( "hello", "HELLO", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "HELLOHELLO" ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'HELLOHELLO'" << endl;
@@ -145,9 +145,9 @@ static void testReplaceSimple( int options, int button = 0 )
static void testReplaceBlank( int options, int button = 0 )
{
kdDebug() << "testReplaceBlank: " << options << endl;
- KReplaceTest test( QString( "aaaaaa" ), button );
+ KReplaceTest test( TQString( "aaaaaa" ), button );
test.replace( "a", "", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( !textLines[ 0 ].isEmpty() ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of ''" << endl;
@@ -160,9 +160,9 @@ static void testReplaceBlank( int options, int button = 0 )
static void testReplaceBlankSearch( int options, int button = 0 )
{
kdDebug() << "testReplaceBlankSearch: " << options << endl;
- KReplaceTest test( QString( "bbbb" ), button );
+ KReplaceTest test( TQString( "bbbb" ), button );
test.replace( "", "foo", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "foobfoobfoobfoobfoo" ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'foobfoobfoobfoobfoo'" << endl;
@@ -174,9 +174,9 @@ static void testReplaceLonger( int options, int button = 0 )
{
kdDebug() << "testReplaceLonger: " << options << endl;
// Standard test of a replacement string longer than the matched string
- KReplaceTest test( QString( "aaaa" ), button );
+ KReplaceTest test( TQString( "aaaa" ), button );
test.replace( "a", "bb", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "bbbbbbbb" ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'bbbbbbbb'" << endl;
@@ -188,9 +188,9 @@ static void testReplaceLongerInclude( int options, int button = 0 )
{
kdDebug() << "testReplaceLongerInclude: " << options << endl;
// Similar test, where the replacement string includes the search string
- KReplaceTest test( QString( "a foo b" ), button );
+ KReplaceTest test( TQString( "a foo b" ), button );
test.replace( "foo", "foobar", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "a foobar b" ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'a foobar b'" << endl;
@@ -202,9 +202,9 @@ static void testReplaceLongerInclude2( int options, int button = 0 )
{
kdDebug() << "testReplaceLongerInclude2: " << options << endl;
// Similar test, but with more chances of matches inside the replacement string
- KReplaceTest test( QString( "aaaa" ), button );
+ KReplaceTest test( TQString( "aaaa" ), button );
test.replace( "a", "aa", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
if ( textLines[ 0 ] != "aaaaaaaa" ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of 'aaaaaaaa'" << endl;
@@ -216,18 +216,18 @@ static void testReplaceLongerInclude2( int options, int button = 0 )
static void testReplaceBackRef( int options, int button = 0 )
{
kdDebug() << "testReplaceBackRef: " << options << endl;
- KReplaceTest test( QString( "abc def" ), button );
+ KReplaceTest test( TQString( "abc def" ), button );
test.replace( "abc", "(\\0)", options );
- QStringList textLines = test.textLines();
+ TQStringList textLines = test.textLines();
assert( textLines.count() == 1 );
- QString expected = options & KReplaceDialog::BackReference ? "(abc) def" : "(\\0) def";
+ TQString expected = options & KReplaceDialog::BackReference ? "(abc) def" : "(\\0) def";
if ( textLines[ 0 ] != expected ) {
kdError() << "ASSERT FAILED: replaced text is '" << textLines[ 0 ] << "' instead of '"<< expected << "'" << endl;
exit(1);
}
}
-static void testReplacementHistory( const QStringList& findHistory, const QStringList& replaceHistory )
+static void testReplacementHistory( const TQStringList& findHistory, const TQStringList& replaceHistory )
{
KReplaceDialog dlg( 0, 0, 0, findHistory, replaceHistory );
dlg.show();
@@ -237,8 +237,8 @@ static void testReplacementHistory( const QStringList& findHistory, const QStrin
static void testReplacementHistory()
{
- QStringList findHistory;
- QStringList replaceHistory;
+ TQStringList findHistory;
+ TQStringList replaceHistory;
findHistory << "foo" << "bar";
replaceHistory << "FOO" << "BAR";
testReplacementHistory( findHistory, replaceHistory );
@@ -246,7 +246,7 @@ static void testReplacementHistory()
findHistory.clear();
replaceHistory.clear();
findHistory << "foo" << "bar";
- replaceHistory << QString::null << "baz"; // #130831
+ replaceHistory << TQString::null << "baz"; // #130831
testReplacementHistory( findHistory, replaceHistory );
}
@@ -311,7 +311,7 @@ int main( int argc, char **argv )
testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User3 ); // replace
testReplaceBackRef( KReplaceDialog::BackReference | KReplaceDialog::FindBackwards | KReplaceDialog::PromptOnReplace, KDialogBase::User1 ); // replace all
- QString text = "This file is part of the KDE project.\n"
+ TQString text = "This file is part of the KDE project.\n"
"This library is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU Library General Public\n"
"License version 2, as published by the Free Software Foundation.\n"
@@ -329,7 +329,7 @@ int main( int argc, char **argv )
"ThisThis This, This. This\n"
"aGNU\n"
"free";
- KReplaceTest test( QStringList::split( '\n', text, true ), 0 );
+ KReplaceTest test( TQStringList::split( '\n', text, true ), 0 );
test.replace( "GNU", "KDE", 0 );
test.replace( "free", "*free*", 0 );
diff --git a/kutils/tests/kreplacetest.h b/kutils/tests/kreplacetest.h
index a60563e77..ff85ca34b 100644
--- a/kutils/tests/kreplacetest.h
+++ b/kutils/tests/kreplacetest.h
@@ -20,8 +20,8 @@
#ifndef KREPLACETEST_H
#define KREPLACETEST_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class KReplace;
@@ -29,21 +29,21 @@ class KReplaceTest : public QObject
{
Q_OBJECT
public:
- KReplaceTest( const QStringList& text, int button )
- : QObject( 0L ), m_text( text ), m_replace( 0 ), m_button( button ) {}
+ KReplaceTest( const TQStringList& text, int button )
+ : TQObject( 0L ), m_text( text ), m_replace( 0 ), m_button( button ) {}
- void replace( const QString &pattern, const QString &replacement, long options );
+ void replace( const TQString &pattern, const TQString &replacement, long options );
void print();
- const QStringList& textLines() const { return m_text; }
+ const TQStringList& textLines() const { return m_text; }
public slots:
- void slotHighlight( const QString &, int, int );
+ void slotHighlight( const TQString &, int, int );
void slotReplaceNext();
- void slotReplace(const QString &text, int replacementIndex, int replacedLength, int matchedLength);
+ void slotReplace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength);
private:
- QStringList::Iterator m_currentPos;
- QStringList m_text;
+ TQStringList::Iterator m_currentPos;
+ TQStringList m_text;
KReplace* m_replace;
bool m_needEventLoop;
int m_button;