diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-30 18:02:11 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-30 18:02:11 +0000 |
commit | 5ad8fdbf162cf819cf1c48d2ddd8aed9113ab718 (patch) | |
tree | a2f76da0912085453b974e590005753ca279457b /systemsettings/modulesview.cpp | |
parent | 70a90e54dfa3b5ab2133aebda71f310d29d6a680 (diff) | |
download | tde-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/modulesview.cpp')
-rw-r--r-- | systemsettings/modulesview.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
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(); } |