summaryrefslogtreecommitdiffstats
path: root/systemsettings/kcmultiwidget.cpp
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 /systemsettings/kcmultiwidget.cpp
parent70a90e54dfa3b5ab2133aebda71f310d29d6a680 (diff)
downloadtde-systemsettings-5ad8fdbf162cf819cf1c48d2ddd8aed9113ab718.tar.gz
tde-systemsettings-5ad8fdbf162cf819cf1c48d2ddd8aed9113ab718.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
Diffstat (limited to 'systemsettings/kcmultiwidget.cpp')
-rw-r--r--systemsettings/kcmultiwidget.cpp82
1 files changed, 41 insertions, 41 deletions
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() {