summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-30 18:02:11 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-30 18:02:11 +0000
commit5ad8fdbf162cf819cf1c48d2ddd8aed9113ab718 (patch)
treea2f76da0912085453b974e590005753ca279457b
parent70a90e54dfa3b5ab2133aebda71f310d29d6a680 (diff)
downloadtde-systemsettings-5ad8fdbf.tar.gz
tde-systemsettings-5ad8fdbf.zip
TQt4 convert kde-systemsettings
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kde-systemsettings@1234247 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--systemsettings/kcmodulemenu.cpp40
-rw-r--r--systemsettings/kcmodulemenu.h22
-rw-r--r--systemsettings/kcmsearch.cpp30
-rw-r--r--systemsettings/kcmsearch.h13
-rw-r--r--systemsettings/kcmultiwidget.cpp82
-rw-r--r--systemsettings/kcmultiwidget.h33
-rw-r--r--systemsettings/kcscrollview.cpp10
-rw-r--r--systemsettings/kcscrollview.h12
-rw-r--r--systemsettings/mainwindow.cpp122
-rw-r--r--systemsettings/mainwindow.h35
-rw-r--r--systemsettings/moduleiconitem.cpp10
-rw-r--r--systemsettings/moduleiconitem.h12
-rw-r--r--systemsettings/modulesview.cpp70
-rw-r--r--systemsettings/modulesview.h29
14 files changed, 262 insertions, 258 deletions
diff --git a/systemsettings/kcmodulemenu.cpp b/systemsettings/kcmodulemenu.cpp
index 8208ec0..3d36388 100644
--- a/systemsettings/kcmodulemenu.cpp
+++ b/systemsettings/kcmodulemenu.cpp
@@ -22,18 +22,18 @@
#include <kapplication.h>
#include <kservicegroup.h>
#include <kdebug.h>
-#include <qdict.h>
+#include <tqdict.h>
class KCModuleMenuPrivate {
public:
KCModuleMenuPrivate(){
}
- QMap<QString, QValueList<MenuItem> > menus;
- QString basePath;
+ TQMap<TQString, TQValueList<MenuItem> > menus;
+ TQString basePath;
};
-KCModuleMenu::KCModuleMenu( const QString &menuName ) :
+KCModuleMenu::KCModuleMenu( const TQString &menuName ) :
d( new KCModuleMenuPrivate )
{
kdDebug() << "MenuName: \"" << menuName << "\"." << endl;
@@ -53,7 +53,7 @@ KCModuleMenu::~KCModuleMenu()
delete d;
}
-void KCModuleMenu::readMenu( const QString &pathName )
+void KCModuleMenu::readMenu( const TQString &pathName )
{
KServiceGroup::Ptr group = KServiceGroup::group( pathName );
if ( !group || !group->isValid() )
@@ -64,7 +64,7 @@ void KCModuleMenu::readMenu( const QString &pathName )
return;
caption = group->caption();
- QValueList<MenuItem> currentMenu;
+ TQValueList<MenuItem> currentMenu;
for( KServiceGroup::List::ConstIterator it = list.begin();
it != list.end(); it++)
@@ -108,12 +108,12 @@ bool KCModuleMenu::addEntry( KSycocaEntry *entry ){
}
-QValueList<KCModuleInfo> KCModuleMenu::modules( const QString &menuPath )
+TQValueList<KCModuleInfo> KCModuleMenu::modules( const TQString &menuPath )
{
- QValueList<KCModuleInfo> list;
+ TQValueList<KCModuleInfo> list;
- QValueList<MenuItem> subMenu = menuList(menuPath);
- QValueList<MenuItem>::iterator it;
+ TQValueList<MenuItem> subMenu = menuList(menuPath);
+ TQValueList<MenuItem>::iterator it;
for ( it = subMenu.begin(); it != subMenu.end(); ++it ){
if ( !(*it).menu )
list.append( (*it).item );
@@ -122,12 +122,12 @@ QValueList<KCModuleInfo> KCModuleMenu::modules( const QString &menuPath )
return list;
}
-QStringList KCModuleMenu::submenus( const QString &menuPath )
+TQStringList KCModuleMenu::submenus( const TQString &menuPath )
{
- QStringList list;
+ TQStringList list;
- QValueList<MenuItem> subMenu = menuList(menuPath);
- QValueList<MenuItem>::iterator it;
+ TQValueList<MenuItem> subMenu = menuList(menuPath);
+ TQValueList<MenuItem>::iterator it;
for ( it = subMenu.begin(); it != subMenu.end(); ++it ){
if ( (*it).menu )
list.append( (*it).subMenu );
@@ -136,11 +136,11 @@ QStringList KCModuleMenu::submenus( const QString &menuPath )
return list;
}
-QValueList<MenuItem> KCModuleMenu::menuList( const QString &menuPath )
+TQValueList<MenuItem> KCModuleMenu::menuList( const TQString &menuPath )
{
if( menuPath.isEmpty() ) {
if( d->basePath.isEmpty())
- return QValueList<MenuItem>();
+ return TQValueList<MenuItem>();
else
return menuList( d->basePath );
}
@@ -171,12 +171,12 @@ QValueList<MenuItem> KCModuleMenu::menuList( const QString &menuPath )
*
* "Michael D. Stemle, Jr." <manchicken@notsosoft.net>
*/
-QString KCModuleMenu::deriveCaptionFromPath( const QString &menuPath )
+TQString KCModuleMenu::deriveCaptionFromPath( const TQString &menuPath )
{
- QStringList parts(QStringList::split("/",menuPath));
- QString result("");
+ TQStringList parts(TQStringList::split("/",menuPath));
+ TQString result("");
- QStringList::Iterator it = parts.end(); // Start at the end
+ TQStringList::Iterator it = parts.end(); // Start at the end
// Find the last non-empty string in the split.
for (; it != parts.begin(); --it) {
diff --git a/systemsettings/kcmodulemenu.h b/systemsettings/kcmodulemenu.h
index 2cfce7b..193aada 100644
--- a/systemsettings/kcmodulemenu.h
+++ b/systemsettings/kcmodulemenu.h
@@ -64,7 +64,7 @@ class KCModuleMenuPrivate;
* X-KDE-BaseGroup=examplemenu
* \endcode
*
- * example.menu should be installed in xdg/menus/ so that ksyscoco will find
+ * example.menu should be installed in xdg/menus/ so that ksyscoco will tqfind
* it. See the above url for example menus. After changing the menu you need
* to run "kbuildsycoca" to regenerate the cache as ksyscoco will cache the
* menu and is a file that doesn't change on users.
@@ -77,17 +77,17 @@ class MenuItem {
public:
MenuItem( bool isMenu=false ){ menu = isMenu; };
bool menu;
- QString subMenu;
- QString caption;
+ TQString subMenu;
+ TQString caption;
KCModuleInfo item;
};
-class KCModuleMenu : public QValueList<KCModuleInfo>
+class KCModuleMenu : public TQValueList<KCModuleInfo>
{
public:
- QString caption;
+ TQString caption;
/**
* @param the X-KDE-BaseGroup item from the directory file
@@ -98,7 +98,7 @@ public:
* X-KDE-BaseGroup=examplemenu
* so menuName should be "systemsettings"
*/
- KCModuleMenu( const QString &menuName );
+ KCModuleMenu( const TQString &menuName );
/**
* Deconstructor
@@ -111,21 +111,21 @@ public:
* @param path to return submenus from.
* @return all items in menuPath.
*/
- QValueList<MenuItem> menuList( const QString &menuPath=QString::null );
+ TQValueList<MenuItem> menuList( const TQString &menuPath=TQString() );
/**
* Returns the modules in a menu path. An empty string is the top level.
* @param menu to return modules from.
* @returns only the top level modules of menuPath
*/
- QValueList<KCModuleInfo> modules( const QString &menuPath=QString::null );
+ TQValueList<KCModuleInfo> modules( const TQString &menuPath=TQString() );
/**
* Returns the sub menus of a menu path. An empty string is the top level.
* @param path to return submenus from.
* @return only the submenus of menuPath.
*/
- QStringList submenus( const QString &menuPath=QString::null );
+ TQStringList submenus( const TQString &menuPath=TQString() );
protected:
@@ -135,7 +135,7 @@ protected:
* This is the <Name> from the merge.menu file
* @param pathName the base path name of the menu.
*/
- virtual void readMenu( const QString &pathName );
+ virtual void readMenu( const TQString &pathName );
/**
* Function that determines if the entry from readMenu
@@ -151,7 +151,7 @@ protected:
private:
KCModuleMenuPrivate *d;
- QString deriveCaptionFromPath( const QString &menuPath );
+ TQString deriveCaptionFromPath( const TQString &menuPath );
};
#endif // KCMMODULEMENU_H
diff --git a/systemsettings/kcmsearch.cpp b/systemsettings/kcmsearch.cpp
index 3dd41ce..91f3675 100644
--- a/systemsettings/kcmsearch.cpp
+++ b/systemsettings/kcmsearch.cpp
@@ -21,20 +21,20 @@
#include "kcmsearch.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include "modulesview.h"
#include "moduleiconitem.h"
-KcmSearch::KcmSearch( QPtrList<ModulesView> *moduleViewList, QWidget *parent, const char *name )
- : KIconViewSearchLine(parent, moduleViewList->at(0)->groups[0], name){
+KcmSearch::KcmSearch( TQPtrList<ModulesView> *moduleViewList, TQWidget *tqparent, const char *name )
+ : KIconViewSearchLine(tqparent, moduleViewList->at(0)->groups[0], name){
this->moduleViewList = moduleViewList;
}
-void KcmSearch::updateSearch( const QString &search ) {
- QValueList<RowIconView*>::iterator it;
- QPtrListIterator<ModulesView> moduleViewListIt(*moduleViewList);
+void KcmSearch::updateSearch( const TQString &search ) {
+ TQValueList<RowIconView*>::iterator it;
+ TQPtrListIterator<ModulesView> moduleViewListIt(*moduleViewList);
ModulesView *mainView;
int page = 0;
@@ -45,7 +45,7 @@ void KcmSearch::updateSearch( const QString &search ) {
int count = 0;
for ( it = mainView->groups.begin(); it != mainView->groups.end(); ++it ){
- QIconViewItem *item = (*it)->firstItem();
+ TQIconViewItem *item = (*it)->firstItem();
while( item ) {
bool hit = itemMatches(item, search);
((ModuleIconItem*)item)->loadIcon(hit);
@@ -62,13 +62,13 @@ void KcmSearch::updateSearch( const QString &search ) {
delete[] hitArray;
}
-bool KcmSearch::itemMatches( const KCModuleInfo &module, const QString &search ) const
+bool KcmSearch::itemMatches( const KCModuleInfo &module, const TQString &search ) const
{
// Look in keywords
- QStringList kw = module.keywords();
- for(QStringList::ConstIterator it = kw.begin(); it != kw.end(); ++it) {
- QString name = (*it).lower();
- if ( QRegExp(search+"*", false, true).search(name) >= 0){
+ TQStringList kw = module.keywords();
+ for(TQStringList::ConstIterator it = kw.begin(); it != kw.end(); ++it) {
+ TQString name = (*it).lower();
+ if ( TQRegExp(search+"*", false, true).search(name) >= 0){
//kdDebug() << "MATCH:" << module.moduleName().latin1()
// << "keyword:" << name.latin1() << endl;
return true;
@@ -76,20 +76,20 @@ bool KcmSearch::itemMatches( const KCModuleInfo &module, const QString &search )
}
// Don't forget to check the name :)
- if ( QRegExp(search+"*", false, true).search(module.moduleName()) >= 0)
+ if ( TQRegExp(search+"*", false, true).search(module.moduleName()) >= 0)
return true;
//kdDebug() << "No MATCH:" << module.moduleName().latin1() << endl;
return false;
}
-bool KcmSearch::itemMatches( const QIconViewItem *item, const QString & search ) const
+bool KcmSearch::itemMatches( const TQIconViewItem *item, const TQString & search ) const
{
if( !item )
return false;
ModuleIconItem *mItem = (ModuleIconItem*)item;
- QValueList<KCModuleInfo>::iterator it;
+ TQValueList<KCModuleInfo>::iterator it;
for ( it = mItem->modules.begin(); it != mItem->modules.end(); ++it ){
if( itemMatches( (*it), search ) )
return true;
diff --git a/systemsettings/kcmsearch.h b/systemsettings/kcmsearch.h
index b20aec7..49db420 100644
--- a/systemsettings/kcmsearch.h
+++ b/systemsettings/kcmsearch.h
@@ -34,33 +34,34 @@ class ModulesView;
class KcmSearch : public KIconViewSearchLine
{
Q_OBJECT
+ TQ_OBJECT
public:
- KcmSearch( QPtrList<ModulesView> *moduleViewList, QWidget *parent = 0, const char *name = 0 );
+ KcmSearch( TQPtrList<ModulesView> *moduleViewList, TQWidget *tqparent = 0, const char *name = 0 );
public slots:
/**
* Go through all of the iconView groups in mainView and update
*/
- virtual void updateSearch( const QString &search = QString::null );
+ virtual void updateSearch( const TQString &search = TQString() );
/**
* Check module associated with item or if a group check all modules of that group.
* @return true if search is in the module(s) keywords
*/
- virtual bool itemMatches ( const QIconViewItem *item, const QString &search ) const;
+ virtual bool itemMatches ( const TQIconViewItem *item, const TQString &search ) const;
signals:
- void searchHits(const QString &query, int *hitList, int length);
+ void searchHits(const TQString &query, int *hitList, int length);
private:
/**
* Determine if module matches the search
* @return true if search is in module's keywords
*/
- bool itemMatches ( const KCModuleInfo &module, const QString &search ) const;
+ bool itemMatches ( const KCModuleInfo &module, const TQString &search ) const;
// Friend class whos groups parsed,
- QPtrList<ModulesView> *moduleViewList;
+ TQPtrList<ModulesView> *moduleViewList;
};
#endif // KCMSEARCH_H
diff --git a/systemsettings/kcmultiwidget.cpp b/systemsettings/kcmultiwidget.cpp
index 5f4ce09..d296d7c 100644
--- a/systemsettings/kcmultiwidget.cpp
+++ b/systemsettings/kcmultiwidget.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>
@@ -62,18 +62,18 @@ class KCMultiWidget::KCMultiWidgetPrivate
};
-KCMultiWidget::KCMultiWidget(QWidget *parent, const char *name, bool modal)
+KCMultiWidget::KCMultiWidget(TQWidget *tqparent, const char *name, bool modal)
: KDialogBase(IconList, i18n("Configure"), Help | Default |Cancel | Apply |
- Ok | User1 | User2 | User3, Ok, parent, name, modal, true,
+ Ok | User1 | User2 | User3, Ok, tqparent, name, modal, true,
KStdGuiItem::reset(), KStdGuiItem::close(), KStdGuiItem::adminMode())
, dialogface( IconList ), d( new KCMultiWidgetPrivate )
{
init();
}
-KCMultiWidget::KCMultiWidget( int dialogFace, QWidget * parent, const char * name, bool modal )
+KCMultiWidget::KCMultiWidget( int dialogFace, TQWidget * tqparent, const char * name, bool modal )
: KDialogBase( dialogFace, "Caption", Help | Default | Cancel | Apply | Ok |
- User1 | User2 | User3, Ok, parent, name, modal, true,
+ User1 | User2 | User3, Ok, tqparent, name, modal, true,
KStdGuiItem::reset(), KStdGuiItem::close(), KStdGuiItem::adminMode())
, dialogface( dialogFace ), d( new KCMultiWidgetPrivate )
{
@@ -82,7 +82,7 @@ KCMultiWidget::KCMultiWidget( int dialogFace, QWidget * parent, const char * nam
inline void KCMultiWidget::init()
{
- connect( this, SIGNAL( finished()), SLOT( dialogClosed()));
+ connect( this, TQT_SIGNAL( finished()), TQT_SLOT( dialogClosed()));
showButton( Ok, false );
showButton( Cancel, false );
showButton( User1, true ); // Reset button
@@ -92,8 +92,8 @@ inline void KCMultiWidget::init()
enableButton(Apply, false);
enableButton(User1, 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 );
}
#include <kmessagebox.h>
@@ -111,7 +111,7 @@ void KCMultiWidget::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->tqparent() ) == curPageIndex )
{
( *it ).kcm->defaults();
clientChanged( true );
@@ -126,7 +126,7 @@ void KCMultiWidget::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->tqparent() ) == curPageIndex )
{
( *it ).kcm->load();
clientChanged( false );
@@ -136,7 +136,7 @@ void KCMultiWidget::slotUser1()
void KCMultiWidget::apply()
{
- QStringList updatedModules;
+ TQStringList updatedModules;
ModuleList::Iterator end = m_modules.end();
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
{
@@ -144,14 +144,14 @@ void KCMultiWidget::apply()
if( m && m->changed() )
{
m->save();
- QStringList * names = moduleParentComponents[ m ];
+ TQStringList * names = moduleParentComponents[ m ];
kdDebug() << k_funcinfo << *names << " saved and added to the list" << endl;
- for( QStringList::ConstIterator it = names->begin(); it != names->end(); ++it )
- if( updatedModules.find( *it ) == updatedModules.end() )
+ for( TQStringList::ConstIterator it = names->begin(); it != names->end(); ++it )
+ if( updatedModules.tqfind( *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() << k_funcinfo << *it << " " << ( *it ).latin1() << endl;
emit configCommitted( ( *it ).latin1() );
@@ -161,7 +161,7 @@ void KCMultiWidget::apply()
void KCMultiWidget::slotApply()
{
- QPushButton *button = actionButton(Apply);
+ TQPushButton *button = actionButton(Apply);
if (button)
button->setFocus();
emit applyClicked();
@@ -171,7 +171,7 @@ void KCMultiWidget::slotApply()
void KCMultiWidget::slotOk()
{
- QPushButton *button = actionButton(Ok);
+ TQPushButton *button = actionButton(Ok);
if (button)
button->setFocus();
emit okClicked();
@@ -181,12 +181,12 @@ void KCMultiWidget::slotOk()
void KCMultiWidget::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->tqparent() ) == curPageIndex )
{
docPath = ( *it ).kcm->moduleInfo().docPath();
break;
@@ -224,20 +224,20 @@ void KCMultiWidget::clientChanged(bool state)
enableButton( User1, false);
}
-void KCMultiWidget::addModule(const QString& path, bool withfallback)
+void KCMultiWidget::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 KCMultiWidget::addModule(const KCModuleInfo& moduleinfo,
- QStringList parentmodulenames, bool withfallback)
+ TQStringList tqparentmodulenames, bool withfallback)
{
if( !moduleinfo.service() )
return;
@@ -248,13 +248,13 @@ void KCMultiWidget::addModule(const KCModuleInfo& moduleinfo,
if( !KCModuleLoader::testModule( moduleinfo ))
return;
- QFrame* page = 0;
+ TQFrame* page = 0;
if (!moduleinfo.service()->noDisplay())
switch( dialogface )
{
case TreeList:
- parentmodulenames += moduleinfo.moduleName();
- page = addHBoxPage( parentmodulenames, moduleinfo.comment(),
+ tqparentmodulenames += moduleinfo.moduleName();
+ page = addHBoxPage( tqparentmodulenames, moduleinfo.comment(),
SmallIcon( moduleinfo.icon(),
IconSize( KIcon::Small ) ) );
break;
@@ -266,7 +266,7 @@ void KCMultiWidget::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 KCMultiWidget"
@@ -278,7 +278,7 @@ void KCMultiWidget::addModule(const KCModuleInfo& moduleinfo,
return;
}
KCModuleProxy * module;
- if( m_orphanModules.contains( moduleinfo.service() ) )
+ if( m_orphanModules.tqcontains( moduleinfo.service() ) )
{
// the KCModule already exists - it was removed from the dialog in
// removeAllModules
@@ -287,7 +287,7 @@ void KCMultiWidget::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 );
@@ -300,12 +300,12 @@ void KCMultiWidget::addModule(const KCModuleInfo& moduleinfo,
{
module = new KCModuleProxy( moduleinfo, withfallback, page );
- QStringList parentComponents = moduleinfo.service()->property(
+ TQStringList tqparentComponents = moduleinfo.service()->property(
"X-KDE-ParentComponents" ).toStringList();
moduleParentComponents.insert( module,
- new QStringList( parentComponents ) );
+ new TQStringList( tqparentComponents ) );
- connect(module, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool)));
+ connect(module, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(clientChanged(bool)));
}
@@ -357,9 +357,9 @@ void KCMultiWidget::applyOrRevert(KCModuleProxy * module){
}
-void KCMultiWidget::slotAboutToShow(QWidget *page)
+void KCMultiWidget::slotAboutToShow(TQWidget *page)
{
- QObject * obj = page->child( 0, "KCModuleProxy" );
+ TQObject * obj = page->child( 0, "KCModuleProxy" );
if( ! obj )
return;
@@ -391,14 +391,14 @@ void KCMultiWidget::slotAboutToShow(QWidget *page)
enableButton( KDialogBase::Help, buttons & KCModule::Help );
enableButton( KDialogBase::Default, buttons & KCModule::Default );
- disconnect( this, SIGNAL(user3Clicked()), 0, 0 );
+ disconnect( this, TQT_SIGNAL(user3Clicked()), 0, 0 );
if (d->currentModule->moduleInfo().needsRootPrivileges() &&
!d->currentModule->rootMode() )
{ /* Enable the Admin Mode button */
enableButton( User3, true );
- connect( this, SIGNAL(user3Clicked()), d->currentModule, SLOT( runAsRoot() ));
- connect( this, SIGNAL(user3Clicked()), SLOT( disableRModeButton() ));
+ connect( this, TQT_SIGNAL(user3Clicked()), d->currentModule, TQT_SLOT( runAsRoot() ));
+ connect( this, TQT_SIGNAL(user3Clicked()), TQT_SLOT( disableRModeButton() ));
} else {
enableButton( User3, false );
}
@@ -412,7 +412,7 @@ void KCMultiWidget::rootExit()
void KCMultiWidget::disableRModeButton()
{
enableButton( User3, false );
- connect ( d->currentModule, SIGNAL( childClosed() ), SLOT( rootExit() ) );
+ connect ( d->currentModule, TQT_SIGNAL( childClosed() ), TQT_SLOT( rootExit() ) );
}
void KCMultiWidget::slotCancel() {
diff --git a/systemsettings/kcmultiwidget.h b/systemsettings/kcmultiwidget.h
index b0dc718..78edfb4 100644
--- a/systemsettings/kcmultiwidget.h
+++ b/systemsettings/kcmultiwidget.h
@@ -23,7 +23,7 @@
#ifndef KCMULTIDIALOG_H
#define KCMULTIDIALOG_H
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -40,29 +40,30 @@ class KCModule;
class KUTILS_EXPORT KCMultiWidget : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a new KCMultiWidget
*
- * @param parent The parent widget
+ * @param tqparent The tqparent widget
* @param name The widget name
* @param modal If you pass true here, the dialog will be modal
**/
- KCMultiWidget( QWidget *parent=0, const char *name=0, bool modal=false );
+ KCMultiWidget( TQWidget *tqparent=0, const char *name=0, bool modal=false );
/**
* Construct a personalized KCMultiWidget.
*
* @param dialogFace You can use TreeList, Tabbed, Plain, Swallow or
* IconList.
- * @param parent Parent of the dialog.
+ * @param tqparent Parent of the dialog.
* @param name Dialog name (for internal use only).
* @param modal Controls dialog modality. If @p false, the rest of the
* program interface (example: other dialogs) is accessible while
* the dialog is open.
*/
- KCMultiWidget( int dialogFace, QWidget * parent = 0,
+ KCMultiWidget( int dialogFace, TQWidget * tqparent = 0,
const char * name = 0, bool modal = false );
@@ -80,7 +81,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.
@@ -89,16 +90,16 @@ public:
* used for creating the module. It will be added
* to the list of modules the dialog will show.
*
- * @param parentmodulenames The names of the modules that should appear as
- * parents in the TreeList. Look at the
+ * @param tqparentmodulenames The names of the modules that should appear as
+ * tqparents in the TreeList. Look at the
* KDialogBase::addPage documentation for more info
* on this.
*
* @param withfallback Try harder to load the module. Might result
* in the module appearing outside the dialog.
**/
- void addModule(const KCModuleInfo& moduleinfo, QStringList
- parentmodulenames = QStringList(), bool withfallback=false);
+ void addModule(const KCModuleInfo& moduleinfo, TQStringList
+ tqparentmodulenames = TQStringList(), bool withfallback=false);
/**
* @return the current module that is being shown.
@@ -129,7 +130,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 );
/**
* Emitted right before a module is shown.
@@ -192,7 +193,7 @@ protected slots:
private slots:
- void slotAboutToShow(QWidget *);
+ void slotAboutToShow(TQWidget *);
void clientChanged(bool state);
@@ -237,14 +238,14 @@ private:
bool adminmode;
int buttons;
};
- 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 KCMultiWidgetPrivate;
diff --git a/systemsettings/kcscrollview.cpp b/systemsettings/kcscrollview.cpp
index df34f50..65f3b5e 100644
--- a/systemsettings/kcscrollview.cpp
+++ b/systemsettings/kcscrollview.cpp
@@ -20,19 +20,19 @@
#include "kcscrollview.h"
-KCScrollView::KCScrollView( QWidget * parent, const char * name, WFlags f) : QScrollView(parent,name,f) {
+KCScrollView::KCScrollView( TQWidget * tqparent, const char * name, WFlags f) : TQScrollView(tqparent,name,f) {
setResizePolicy(AutoOneFit);
mainChild = 0;
}
-QSize KCScrollView::sizeHint() const {
- QSize vphint = mainChild->sizeHint();
+TQSize KCScrollView::tqsizeHint() const {
+ TQSize vphint = mainChild->tqsizeHint();
vphint.setWidth(vphint.width()+2*frameWidth());
vphint.setHeight(vphint.height()+2*frameWidth());
return vphint;
}
-void KCScrollView::addChild(QWidget *child, int x, int y) {
+void KCScrollView::addChild(TQWidget *child, int x, int y) {
mainChild = child;
- QScrollView::addChild(child,x,y);
+ TQScrollView::addChild(child,x,y);
}
diff --git a/systemsettings/kcscrollview.h b/systemsettings/kcscrollview.h
index 630ebc2..2706353 100644
--- a/systemsettings/kcscrollview.h
+++ b/systemsettings/kcscrollview.h
@@ -20,16 +20,16 @@
#ifndef KCSCROLLVIEW_H
#define KCSCROLLVIEW_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
-class KCScrollView : public QScrollView {
+class KCScrollView : public TQScrollView {
public:
- KCScrollView ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+ KCScrollView ( TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 );
- virtual QSize sizeHint() const;
- virtual void addChild(QWidget *child, int x=0, int y=0);
+ virtual TQSize tqsizeHint() const;
+ virtual void addChild(TQWidget *child, int x=0, int y=0);
private:
- QWidget *mainChild;
+ TQWidget *mainChild;
};
#endif
diff --git a/systemsettings/mainwindow.cpp b/systemsettings/mainwindow.cpp
index 544c015..df6257d 100644
--- a/systemsettings/mainwindow.cpp
+++ b/systemsettings/mainwindow.cpp
@@ -21,16 +21,16 @@
#include "mainwindow.h"
#include <kstdaction.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
#include <kaction.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <klocale.h>
#include <kservicegroup.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqtimer.h>
#include <kiconloader.h>
#include <kcmoduleloader.h>
#include <kdialogbase.h>
@@ -43,7 +43,7 @@
#include <kmenubar.h>
#include <kactionclasses.h>
#include <ktoolbarbutton.h>
-#include <qtabbar.h>
+#include <tqtabbar.h>
#include "kcmsearch.h"
#include "modulesview.h"
@@ -51,19 +51,19 @@
#include "kcmodulemenu.h"
#include "kcmultiwidget.h"
-MainWindow::MainWindow(bool embed, const QString & menuFile,
- QWidget *parent, const char *name) :
- KMainWindow(parent,name), menu(NULL), embeddedWindows(embed),
+MainWindow::MainWindow(bool embed, const TQString & menuFile,
+ TQWidget *tqparent, const char *name) :
+ KMainWindow(tqparent,name), menu(NULL), embeddedWindows(embed),
groupWidget(NULL), selectedPage(0), dummyAbout(NULL) {
// Load the menu structure in from disk.
menu = new KCModuleMenu( menuFile );
moduleTabs = new KTabWidget(this, "moduletabs",
- QTabWidget::Top|QTabWidget::Rounded);
+ TQTabWidget::Top|TQTabWidget::Rounded);
buildMainWidget();
buildActions();
- setupGUI(ToolBar|Save|Create,QString::null);
+ setupGUI(ToolBar|Save|Create,TQString());
widgetChange();
}
@@ -77,11 +77,11 @@ MainWindow::~MainWindow()
void MainWindow::buildMainWidget()
{
- windowStack = new QWidgetStack( this, "widgetstack" );
+ windowStack = new TQWidgetStack( this, "widgetstack" );
// Top level pages.
- QValueList<MenuItem> subMenus = menu->menuList();
- QValueList<MenuItem>::iterator it;
+ TQValueList<MenuItem> subMenus = menu->menuList();
+ TQValueList<MenuItem>::iterator it;
KCScrollView *modulesScroller;
moduleTabs->show();
for ( it = subMenus.begin(); it != subMenus.end(); ++it ) {
@@ -89,7 +89,7 @@ void MainWindow::buildMainWidget()
modulesScroller = new KCScrollView(moduleTabs);
ModulesView *modulesView = new ModulesView( menu, (*it).subMenu, modulesScroller->viewport(), "modulesView" );
modulesViewList.append(modulesView);
- connect(modulesView, SIGNAL(itemSelected(QIconViewItem* )), this, SLOT(slotItemSelected(QIconViewItem*)));
+ connect(modulesView, TQT_SIGNAL(itemSelected(TQIconViewItem* )), TQT_TQOBJECT(this), TQT_SLOT(slotItemSelected(TQIconViewItem*)));
modulesScroller->addChild(modulesView);
moduleTabs->addTab(modulesScroller, (*it).caption);
overviewPages.append(modulesScroller);
@@ -103,43 +103,43 @@ void MainWindow::buildMainWidget()
void MainWindow::buildActions()
{
- KStdAction::quit(this, SLOT( close() ), actionCollection());
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection());
- resetModule = new KAction(i18n("Undo Changes"), 0, this,
- SLOT(showAllModules()), actionCollection(), "resetModule" );
+ resetModule = new KAction(i18n("Undo Changes"), 0, TQT_TQOBJECT(this),
+ TQT_SLOT(showAllModules()), actionCollection(), "resetModule" );
resetModule->setEnabled(false);
- defaultModule = new KAction(i18n("Reset to Defaults"), 0, this,
- SLOT(showAllModules()), actionCollection(), "defaultModule" );
+ defaultModule = new KAction(i18n("Reset to Defaults"), 0, TQT_TQOBJECT(this),
+ TQT_SLOT(showAllModules()), actionCollection(), "defaultModule" );
defaultModule->setEnabled(false);
if( embeddedWindows ) {
- showAllAction = new KAction(i18n("Overview"), QApplication::reverseLayout() ? "forward" : "back", 0, this,
- SLOT(showAllModules()), actionCollection(), "showAll" );
+ showAllAction = new KAction(i18n("Overview"), TQApplication::reverseLayout() ? "forward" : "back", 0, TQT_TQOBJECT(this),
+ TQT_SLOT(showAllModules()), actionCollection(), "showAll" );
showAllAction->setEnabled(false);
}
- aboutModuleAction = new KAction(i18n("About Current Module"), 0, this, SLOT(aboutCurrentModule()), actionCollection(), "help_about_module");
+ aboutModuleAction = new KAction(i18n("About Current Module"), 0, TQT_TQOBJECT(this), TQT_SLOT(aboutCurrentModule()), actionCollection(), "help_about_module");
resetModuleHelp();
// Search
- QHBox *hbox = new QHBox(0);
+ TQHBox *hbox = new TQHBox(0);
hbox->setMaximumWidth( 400 );
KcmSearch* search = new KcmSearch(&modulesViewList, hbox, "search");
hbox->setStretchFactor(search,1);
- connect(search, SIGNAL(searchHits(const QString &, int *, int)), this, SLOT(slotSearchHits(const QString &, int *, int)));
+ connect(search, TQT_SIGNAL(searchHits(const TQString &, int *, int)), TQT_TQOBJECT(this), TQT_SLOT(slotSearchHits(const TQString &, int *, int)));
- QVBox *vbox = new QVBox(hbox);
- generalHitLabel = new QLabel(vbox);
+ TQVBox *vbox = new TQVBox(hbox);
+ generalHitLabel = new TQLabel(vbox);
vbox->setStretchFactor(generalHitLabel,1);
- advancedHitLabel = new QLabel(vbox);
+ advancedHitLabel = new TQLabel(vbox);
vbox->setStretchFactor(advancedHitLabel,1);
hbox->setStretchFactor(vbox,1);
// "Search:" label
- QLabel *searchLabel = new QLabel( this, "SearchLabel");
+ TQLabel *searchLabel = new TQLabel( this, "SearchLabel");
searchLabel->setText( i18n("&Search:") );
searchLabel->setFont(KGlobalSettings::toolBarFont());
searchLabel->setMargin(2);
@@ -151,21 +151,21 @@ void MainWindow::buildActions()
0, 0, actionCollection(), "search" );
searchAction->setShortcutConfigurable( false );
searchAction->setAutoSized( true );
- QWhatsThis::add( search, i18n( "Search Bar<p>Enter a search term." ) );
+ TQWhatsThis::add( search, i18n( "Search Bar<p>Enter a search term." ) );
// The Clear search box button.
- KToolBarButton *clearWidget = new KToolBarButton(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
+ KToolBarButton *clearWidget = new KToolBarButton(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase",
0, this);
- searchClear = new KWidgetAction( clearWidget, QString(""), CTRL+Key_L, search, SLOT(clear()),
+ searchClear = new KWidgetAction( clearWidget, TQString(""), CTRL+Key_L, TQT_TQOBJECT(search), TQT_SLOT(clear()),
actionCollection(), "searchReset");
- connect(clearWidget, SIGNAL(clicked()), searchClear, SLOT(activate()));
+ connect(clearWidget, TQT_SIGNAL(clicked()), searchClear, TQT_SLOT(activate()));
searchClear->setWhatsThis( i18n( "Reset Search\n"
"Resets the search so that "
"all items are shown again." ) );
// Top level pages.
- QValueList<MenuItem> subMenus = menu->menuList();
- QValueList<MenuItem>::iterator it;
+ TQValueList<MenuItem> subMenus = menu->menuList();
+ TQValueList<MenuItem>::iterator it;
for ( it = subMenus.begin(); it != subMenus.end(); ++it ) {
if( (*it).menu ) {
KServiceGroup::Ptr group = KServiceGroup::group( (*it).subMenu );
@@ -174,8 +174,8 @@ void MainWindow::buildActions()
continue;
}
- KRadioAction *newAction = new KRadioAction( group->caption(), group->icon(), KShortcut(), this,
- SLOT(slotTopPage()), actionCollection(), group->relPath() );
+ KRadioAction *newAction = new KRadioAction( group->caption(), group->icon(), KShortcut(), TQT_TQOBJECT(this),
+ TQT_SLOT(slotTopPage()), actionCollection(), group->relPath() );
pageActions.append(newAction);
kdDebug() << "relpath is :" << group->relPath() << endl;
}
@@ -225,17 +225,17 @@ void MainWindow::showAllModules()
resetModuleHelp();
}
-void MainWindow::slotItemSelected( QIconViewItem *item ){
+void MainWindow::slotItemSelected( TQIconViewItem *item ){
ModuleIconItem *mItem = (ModuleIconItem *)item;
if( !mItem )
return;
- groupWidget = moduleItemToWidgetDict.find(mItem);
- scrollView = moduleItemToScrollerDict.find(mItem);
+ groupWidget = moduleItemToWidgetDict.tqfind(mItem);
+ scrollView = moduleItemToScrollerDict.tqfind(mItem);
if(groupWidget==0) {
- QValueList<KCModuleInfo> list = mItem->modules;
+ TQValueList<KCModuleInfo> list = mItem->modules;
KDialogBase::DialogType type = KDialogBase::IconList;
if(list.count() == 1) {
type=KDialogBase::Plain;
@@ -248,18 +248,18 @@ void MainWindow::slotItemSelected( QIconViewItem *item ){
moduleItemToScrollerDict.insert(mItem,scrollView);
moduleItemToWidgetDict.insert(mItem,groupWidget);
- connect(groupWidget, SIGNAL(aboutToShow( KCModuleProxy * )), this, SLOT(updateModuleHelp( KCModuleProxy * )));
- connect(groupWidget, SIGNAL(aboutToShowPage( QWidget* )), this, SLOT(widgetChange()));
- connect(groupWidget, SIGNAL(finished()), this, SLOT(groupModulesFinished()));
- connect(groupWidget, SIGNAL(close()), this, SLOT(showAllModules()));
+ connect(groupWidget, TQT_SIGNAL(aboutToShow( KCModuleProxy * )), TQT_TQOBJECT(this), TQT_SLOT(updateModuleHelp( KCModuleProxy * )));
+ connect(groupWidget, TQT_SIGNAL(aboutToShowPage( TQWidget* )), TQT_TQOBJECT(this), TQT_SLOT(widgetChange()));
+ connect(groupWidget, TQT_SIGNAL(finished()), TQT_TQOBJECT(this), TQT_SLOT(groupModulesFinished()));
+ connect(groupWidget, TQT_SIGNAL(close()), TQT_TQOBJECT(this), TQT_SLOT(showAllModules()));
- QValueList<KCModuleInfo>::iterator it;
+ TQValueList<KCModuleInfo>::iterator it;
for ( it = list.begin(); it != list.end(); ++it ){
qDebug("adding %s %s", (*it).moduleName().latin1(), (*it).fileName().latin1());
groupWidget->addModule( *it );
}
- groupWidget->reparent(scrollView->viewport(), 0, QPoint());
- scrollView->reparent(windowStack, 0, QPoint());
+ groupWidget->reparent(scrollView->viewport(), 0, TQPoint());
+ scrollView->reparent(windowStack, 0, TQPoint());
}
if( embeddedWindows ) {
@@ -284,12 +284,12 @@ void MainWindow::slotItemSelected( QIconViewItem *item ){
// We resize and expand the window if neccessary, but only once the window has been updated.
// Some modules seem to dynamically change thier size. The new size is only available
// once the dialog is updated. :-/ -SBE
- QTimer::singleShot(0,this,SLOT(timerResize()));
+ TQTimer::singleShot(0,this,TQT_SLOT(timerResize()));
}
void MainWindow::timerResize() {
- QSize currentSize = size();
- QSize newSize = currentSize.expandedTo(sizeHint());
+ TQSize currentSize = size();
+ TQSize newSize = currentSize.expandedTo(tqsizeHint());
// Avoid resizing if possible.
if(newSize!=currentSize) {
resize(newSize);
@@ -298,8 +298,8 @@ void MainWindow::timerResize() {
void MainWindow::updateModuleHelp( KCModuleProxy *currentModule ) {
if ( currentModule->aboutData() ) {
- aboutModuleAction->setText(i18n("Help menu->about <modulename>", "About %1").arg(
- currentModule->moduleInfo().moduleName().replace("&","&&")));
+ aboutModuleAction->setText(i18n("Help menu->about <modulename>", "About %1").tqarg(
+ currentModule->moduleInfo().moduleName().tqreplace("&","&&")));
aboutModuleAction->setIcon(currentModule->moduleInfo().icon());
aboutModuleAction->setEnabled(true);
}
@@ -310,12 +310,12 @@ void MainWindow::updateModuleHelp( KCModuleProxy *currentModule ) {
void MainWindow::resetModuleHelp() {
aboutModuleAction->setText(i18n("About Current Module"));
- aboutModuleAction->setIconSet(QIconSet());
+ aboutModuleAction->setIconSet(TQIconSet());
aboutModuleAction->setEnabled(false);
}
void MainWindow::widgetChange() {
- QString name;
+ TQString name;
if( groupWidget && groupWidget->currentModule()) {
name = groupWidget->currentModule()->moduleInfo().moduleName();
}
@@ -332,7 +332,7 @@ void MainWindow::widgetChange() {
void MainWindow::slotTopPage() {
KRadioAction *clickedRadioAction = (KRadioAction *)sender();
- selectedPage = pageActions.find(clickedRadioAction);
+ selectedPage = pageActions.tqfind(clickedRadioAction);
KRadioAction *currentRadioAction;
for ( currentRadioAction = pageActions.first(); currentRadioAction; currentRadioAction = pageActions.next()) {
@@ -342,18 +342,18 @@ void MainWindow::slotTopPage() {
windowStack->raiseWidget(overviewPages.at(selectedPage));
}
-void MainWindow::slotSearchHits(const QString &query, int *hitList, int length) {
+void MainWindow::slotSearchHits(const TQString &query, int *hitList, int length) {
if(query=="") {
generalHitLabel->setText("");
advancedHitLabel->setText("");
} else {
if(length>=1) {
- generalHitLabel->setText(i18n("%1 hit in General","%1 hits in General",hitList[0]).arg(hitList[0]));
+ generalHitLabel->setText(i18n("%1 hit in General","%1 hits in General",hitList[0]).tqarg(hitList[0]));
}
if(length>=2) {
- advancedHitLabel->setText(i18n("%1 hit in Advanced","%1 hits in Advanced",hitList[1]).arg(hitList[1]));
+ advancedHitLabel->setText(i18n("%1 hit in Advanced","%1 hits in Advanced",hitList[1]).tqarg(hitList[1]));
}
}
diff --git a/systemsettings/mainwindow.h b/systemsettings/mainwindow.h
index da60f1d..30f23ad 100644
--- a/systemsettings/mainwindow.h
+++ b/systemsettings/mainwindow.h
@@ -24,16 +24,16 @@
#include <kmainwindow.h>
#include <kcmoduleinfo.h>
#include <ktabwidget.h>
-#include <qptrdict.h>
-#include <qlabel.h>
+#include <tqptrdict.h>
+#include <tqlabel.h>
#include <kactionclasses.h>
#include <kiconviewsearchline.h>
#include "kcscrollview.h"
#include "kcmodulemenu.h"
-class QWidgetStack;
-class QIconViewItem;
+class TQWidgetStack;
+class TQIconViewItem;
class KCMultiWidget;
class ModulesView;
class KAction;
@@ -44,14 +44,15 @@ class KCModuleProxy;
class MainWindow : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- MainWindow(bool embed=true, const QString &menufile="systemsettings",
- QWidget *parent=0, const char *name=0);
+ MainWindow(bool embed=true, const TQString &menufile="systemsettings",
+ TQWidget *tqparent=0, const char *name=0);
~MainWindow();
private slots:
- void slotItemSelected( QIconViewItem* item );
+ void slotItemSelected( TQIconViewItem* item );
void showAllModules();
void aboutCurrentModule();
void updateModuleHelp( KCModuleProxy * );
@@ -62,25 +63,25 @@ private slots:
void widgetChange();
void timerResize();
void slotTopPage();
- void slotSearchHits(const QString &query, int *hitList, int length);
+ void slotSearchHits(const TQString &query, int *hitList, int length);
private:
KCModuleMenu *menu;
bool embeddedWindows;
- QWidgetStack *windowStack;
+ TQWidgetStack *windowStack;
KTabWidget *moduleTabs;
- QPtrList<ModulesView> modulesViewList;
- QPtrList<QIconView> viewList;
+ TQPtrList<ModulesView> modulesViewList;
+ TQPtrList<TQIconView> viewList;
KCMultiWidget *groupWidget;
KCScrollView *scrollView;
- QPtrDict<KCMultiWidget> moduleItemToWidgetDict;
- QPtrDict<KCScrollView> moduleItemToScrollerDict;
+ TQPtrDict<KCMultiWidget> moduleItemToWidgetDict;
+ TQPtrDict<KCScrollView> moduleItemToScrollerDict;
- QPtrList<KRadioAction> pageActions;
- QPtrList<KCScrollView> overviewPages;
+ TQPtrList<KRadioAction> pageActions;
+ TQPtrList<KCScrollView> overviewPages;
int selectedPage;
KAction *resetModule;
@@ -96,8 +97,8 @@ private:
void buildMainWidget();
void buildActions();
- QLabel *generalHitLabel;
- QLabel *advancedHitLabel;
+ TQLabel *generalHitLabel;
+ TQLabel *advancedHitLabel;
/**
* If someone wants to report a bug
diff --git a/systemsettings/moduleiconitem.cpp b/systemsettings/moduleiconitem.cpp
index 3605d1b..c03282f 100644
--- a/systemsettings/moduleiconitem.cpp
+++ b/systemsettings/moduleiconitem.cpp
@@ -24,17 +24,17 @@
#define IMAGE_SIZE 32
-ModuleIconItem::ModuleIconItem( KIconView *parent, KCModuleInfo module)
- : QIconViewItem( parent, module.moduleName(),
+ModuleIconItem::ModuleIconItem( KIconView *tqparent, KCModuleInfo module)
+ : TQIconViewItem( tqparent, module.moduleName(),
SmallIcon( module.icon(), IMAGE_SIZE ) ),
currentState( KIcon::ActiveState), imageName(module.icon())
{
modules.append(module);
}
-ModuleIconItem::ModuleIconItem( KIconView *parent, const QString &text,
- const QString &imageName )
- : QIconViewItem( parent, text, SmallIcon( imageName, IMAGE_SIZE ) ),
+ModuleIconItem::ModuleIconItem( KIconView *tqparent, const TQString &text,
+ const TQString &imageName )
+ : TQIconViewItem( tqparent, text, SmallIcon( imageName, IMAGE_SIZE ) ),
currentState( KIcon::ActiveState )
{
this->imageName = imageName;
diff --git a/systemsettings/moduleiconitem.h b/systemsettings/moduleiconitem.h
index 48ff12c..c5ebcb4 100644
--- a/systemsettings/moduleiconitem.h
+++ b/systemsettings/moduleiconitem.h
@@ -31,14 +31,14 @@ class ConfigModule;
* Stores information about what modules goes with this item.
* Also provides means of loading the enabled/disabled image (see kcmsearch).
*/
-class ModuleIconItem : public QIconViewItem
+class ModuleIconItem : public TQIconViewItem
{
public:
- ModuleIconItem( KIconView *parent, KCModuleInfo module );
+ ModuleIconItem( KIconView *tqparent, KCModuleInfo module );
- ModuleIconItem( KIconView *parent, const QString &text,
- const QString &imageName );
+ ModuleIconItem( KIconView *tqparent, const TQString &text,
+ const TQString &imageName );
/**
* Update the icon to either be enabled or not.
@@ -46,11 +46,11 @@ public:
void loadIcon( bool enabled = true );
// The modules that go with this item
- QValueList<KCModuleInfo> modules;
+ TQValueList<KCModuleInfo> modules;
private:
int currentState;
- QString imageName;
+ TQString imageName;
};
#endif // MODULEICONITEM_H
diff --git a/systemsettings/modulesview.cpp b/systemsettings/modulesview.cpp
index 4aab7a9..86eeac1 100644
--- a/systemsettings/modulesview.cpp
+++ b/systemsettings/modulesview.cpp
@@ -20,10 +20,10 @@
#include "modulesview.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kservicegroup.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kiconloader.h>
#include <kcmultidialog.h>
#include <kdialogbase.h>
@@ -31,40 +31,40 @@
#include <kapplication.h>
#include <kaboutapplication.h>
#include <kdebug.h>
-#include <qiconview.h>
+#include <tqiconview.h>
#include "kcmsearch.h"
#include "moduleiconitem.h"
#include "kcmodulemenu.h"
-ModulesView::ModulesView( KCModuleMenu *rootMenu, const QString &menuPath, QWidget *parent,
- const char *name ) : QWidget( parent, name ), rootMenu( NULL )
+ModulesView::ModulesView( KCModuleMenu *rootMenu, const TQString &menuPath, TQWidget *tqparent,
+ const char *name ) : TQWidget( tqparent, name ), rootMenu( NULL )
{
this->rootMenu = rootMenu;
this->menuPath = menuPath;
- QVBoxLayout *layout = new QVBoxLayout( this, 11, 6, "layout" );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( this, 11, 6, "tqlayout" );
displayName = this->rootMenu->caption;
- QValueList<MenuItem> subMenus = rootMenu->menuList(menuPath);
- QValueList<MenuItem>::iterator it;
+ TQValueList<MenuItem> subMenus = rootMenu->menuList(menuPath);
+ TQValueList<MenuItem>::iterator it;
for ( it = subMenus.begin(); it != subMenus.end(); ++it ){
if( !(*it).menu )
continue;
// After the first time around add a line
if( it != subMenus.begin() ){
- QFrame *line = new QFrame( this, "line");
- line->setFrameShadow( QFrame::Sunken );
- line->setFrameShape( QFrame::HLine );
- layout->addWidget( line );
+ TQFrame *line = new TQFrame( this, "line");
+ line->setFrameShadow( TQFrame::Sunken );
+ line->setFrameShape( TQFrame::HLine );
+ tqlayout->addWidget( line );
}
// Build the row of modules/icons
- createRow( (*it).subMenu, layout );
+ createRow( (*it).subMenu, tqlayout );
}
- layout->addStretch(1);
+ tqlayout->addStretch(1);
// Make empty iconView for the search widget
if( groups.count()==0 ) {
@@ -78,9 +78,9 @@ ModulesView::ModulesView( KCModuleMenu *rootMenu, const QString &menuPath, QWidg
{
uint most = 0;
- QValueList<RowIconView*>::iterator it;
+ TQValueList<RowIconView*>::iterator it;
for ( it = groups.begin(); it != groups.end(); ++it ){
- QIconViewItem *item = (*it)->firstItem();
+ TQIconViewItem *item = (*it)->firstItem();
while( item ) {
if(item->width() > most)
most = item->width();
@@ -98,30 +98,30 @@ ModulesView::~ModulesView()
{
}
-void ModulesView::createRow( const QString &parentPath, QBoxLayout *boxLayout )
+void ModulesView::createRow( const TQString &tqparentPath, TQBoxLayout *boxLayout )
{
- KServiceGroup::Ptr group = KServiceGroup::group( parentPath );
+ KServiceGroup::Ptr group = KServiceGroup::group( tqparentPath );
if ( !group ){
- kdDebug() << "Invalid Group \"" << parentPath << "\". Check your installation."<< endl;
+ kdDebug() << "Invalid Group \"" << tqparentPath << "\". Check your installation."<< endl;
return;
}
// Make header
- QHBoxLayout *rowLayout = new QHBoxLayout( 0, 0, 6, "rowLayout" );
+ TQHBoxLayout *rowLayout = new TQHBoxLayout( 0, 0, 6, "rowLayout" );
// Heaer Icon
- QLabel *icon = new QLabel( this, "groupicon" );
+ TQLabel *icon = new TQLabel( this, "groupicon" );
icon->setPixmap( SmallIcon( group->icon() ) );
- icon->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1,
- (QSizePolicy::SizeType)5, 0, 0, icon->sizePolicy().hasHeightForWidth() ) );
+ icon->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1,
+ (TQSizePolicy::SizeType)5, 0, 0, icon->sizePolicy().hasHeightForWidth() ) );
rowLayout->addWidget( icon );
// Header Name
- QLabel *textLabel = new QLabel( this, "groupcaption" );
+ TQLabel *textLabel = new TQLabel( this, "groupcaption" );
textLabel->setText( group->caption() );
- textLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7,
- (QSizePolicy::SizeType)5, 0, 0, textLabel->sizePolicy().hasHeightForWidth()));
- QFont textLabel_font( textLabel->font() );
+ textLabel->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7,
+ (TQSizePolicy::SizeType)5, 0, 0, textLabel->sizePolicy().hasHeightForWidth()));
+ TQFont textLabel_font( textLabel->font() );
textLabel_font.setBold( true );
textLabel->setFont( textLabel_font );
rowLayout->addWidget( textLabel );
@@ -135,21 +135,21 @@ void ModulesView::createRow( const QString &parentPath, QBoxLayout *boxLayout )
iconView->setSpacing( 0 );
iconView->setMargin( 0 );
iconView->setItemsMovable( false );
- iconView->setSelectionMode(QIconView::NoSelection);
+ iconView->setSelectionMode(TQIconView::NoSelection);
groups.append( iconView );
- connect(iconView, SIGNAL( clicked( QIconViewItem* ) ),
- this, SIGNAL( itemSelected( QIconViewItem* ) ) );
+ connect(iconView, TQT_SIGNAL( clicked( TQIconViewItem* ) ),
+ this, TQT_SIGNAL( itemSelected( TQIconViewItem* ) ) );
boxLayout->addWidget( iconView );
// Add all the items in their proper order
- QValueList<MenuItem> list = rootMenu->menuList( parentPath );
- QValueList<MenuItem>::iterator it;
+ TQValueList<MenuItem> list = rootMenu->menuList( tqparentPath );
+ TQValueList<MenuItem>::iterator it;
for ( it = list.begin(); it != list.end(); ++it ){
if( !(*it).menu )
(void)new ModuleIconItem( iconView, (*it).item );
else
{
- QString path = (*it).subMenu;
+ TQString path = (*it).subMenu;
KServiceGroup::Ptr group = KServiceGroup::group( path );
if ( group ) {
ModuleIconItem *item = new ModuleIconItem( ((KIconView*)iconView),
@@ -160,11 +160,11 @@ void ModulesView::createRow( const QString &parentPath, QBoxLayout *boxLayout )
}
// Force the height for those items that have two words.
- iconView->setMinimumHeight( iconView->minimumSizeHint().height() );
+ iconView->setMinimumHeight( iconView->tqminimumSizeHint().height() );
}
void ModulesView::clearSelection() {
- QValueList<RowIconView*>::iterator it;
+ TQValueList<RowIconView*>::iterator it;
for ( it = groups.begin(); it != groups.end(); ++it ) {
(*it)->clearSelection();
}
diff --git a/systemsettings/modulesview.h b/systemsettings/modulesview.h
index 281e69c..f7cbcb3 100644
--- a/systemsettings/modulesview.h
+++ b/systemsettings/modulesview.h
@@ -30,14 +30,14 @@ class RowIconView : public KIconView
{
public:
- RowIconView( QWidget* parent, const char *name=0 )
- : KIconView( parent, name ){ };
+ RowIconView( TQWidget* tqparent, const char *name=0 )
+ : KIconView( tqparent, name ){ };
// Figure out the hight/width to have only one row
- QSize minimumSizeHint() const {
+ TQSize tqminimumSizeHint() const {
int width = 0;
/*
- for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() )
+ for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() )
width += item->width();
width += spacing()*(count())+(margin()+frameWidth()+lineWidth()+midLineWidth())*2 ;
*/
@@ -45,7 +45,7 @@ public:
width = count()*gridX()+frameWidth()*2;
int height = 0;
- for ( QIconViewItem *item = firstItem(); item; item = item->nextItem() )
+ for ( TQIconViewItem *item = firstItem(); item; item = item->nextItem() )
if(item->height() > height)
height = item->height();
// I honestly don't know where the 4+4 is coming from...
@@ -59,41 +59,42 @@ public:
int f = 2 * frameWidth();
int height = ( 2*h ) + f + spacing() * 2 + 32 + lineWidth()*2 + 10;
*/
- return QSize( width, height );
+ return TQSize( width, height );
};
};
-class QBoxLayout;
+class TQBoxLayout;
class KCModuleMenu;
/**
* This widget contains the IconView's of all of the modules etc
* It is the basic thing that users see.
*/
-class ModulesView : public QWidget
+class ModulesView : public TQWidget
{
// To search the groups
friend class KcmSearch;
Q_OBJECT
+ TQ_OBJECT
public:
void clearSelection();
- QString displayName;
+ TQString displayName;
signals:
- void itemSelected( QIconViewItem* item );
+ void itemSelected( TQIconViewItem* item );
public:
- ModulesView( KCModuleMenu *rootMenu, const QString &menuPath, QWidget *parent=0, const char *name=0 );
+ ModulesView( KCModuleMenu *rootMenu, const TQString &menuPath, TQWidget *tqparent=0, const char *name=0 );
~ModulesView();
private:
- QValueList<RowIconView*> groups;
+ TQValueList<RowIconView*> groups;
KCModuleMenu *rootMenu;
- QString menuPath;
+ TQString menuPath;
- void createRow( const QString &parentPath, QBoxLayout *layout );
+ void createRow( const TQString &tqparentPath, TQBoxLayout *tqlayout );
};
#endif // MODULESVIEW_H