diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kaddressbook/kcmconfigs/ldapoptionswidget.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/kcmconfigs/ldapoptionswidget.cpp')
-rw-r--r-- | kaddressbook/kcmconfigs/ldapoptionswidget.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kaddressbook/kcmconfigs/ldapoptionswidget.cpp b/kaddressbook/kcmconfigs/ldapoptionswidget.cpp index df80ad872..3825ac1d8 100644 --- a/kaddressbook/kcmconfigs/ldapoptionswidget.cpp +++ b/kaddressbook/kcmconfigs/ldapoptionswidget.cpp @@ -21,13 +21,13 @@ without including the source code for Qt in the source distribution. */ -#include <qgroupbox.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qtoolbutton.h> -#include <qstring.h> +#include <tqgroupbox.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqtoolbutton.h> +#include <tqstring.h> #include <kapplication.h> #include <kbuttonbox.h> @@ -37,16 +37,16 @@ #include "addhostdialog.h" #include "ldapoptionswidget.h" -#include <qvgroupbox.h> -#include <qhbox.h> -#include <qvbox.h> +#include <tqvgroupbox.h> +#include <tqhbox.h> +#include <tqvbox.h> #include <kiconloader.h> class LDAPItem : public QCheckListItem { public: - LDAPItem( QListView *parent, const KPIM::LdapServer &server, bool isActive = false ) - : QCheckListItem( parent, parent->lastItem(), QString::null, QCheckListItem::CheckBox ), + LDAPItem( TQListView *parent, const KPIM::LdapServer &server, bool isActive = false ) + : TQCheckListItem( parent, parent->lastItem(), TQString::null, TQCheckListItem::CheckBox ), mIsActive( isActive ) { setServer( server ); @@ -69,32 +69,32 @@ class LDAPItem : public QCheckListItem bool mIsActive; }; -LDAPOptionsWidget::LDAPOptionsWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ) +LDAPOptionsWidget::LDAPOptionsWidget( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { initGUI(); mHostListView->setSorting( -1 ); mHostListView->setAllColumnsShowFocus( true ); mHostListView->setFullWidth( true ); - mHostListView->addColumn( QString::null ); + mHostListView->addColumn( TQString::null ); mHostListView->header()->hide(); - connect( mHostListView, SIGNAL( selectionChanged( QListViewItem* ) ), - SLOT( slotSelectionChanged( QListViewItem* ) ) ); - connect( mHostListView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )), this, SLOT(slotEditHost())); - connect( mHostListView, SIGNAL( clicked( QListViewItem* ) ), - SLOT( slotItemClicked( QListViewItem* ) ) ); + connect( mHostListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) ); + connect( mHostListView, TQT_SIGNAL(doubleClicked( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(slotEditHost())); + connect( mHostListView, TQT_SIGNAL( clicked( TQListViewItem* ) ), + TQT_SLOT( slotItemClicked( TQListViewItem* ) ) ); - connect( mUpButton, SIGNAL( clicked() ), this, SLOT( slotMoveUp() ) ); - connect( mDownButton, SIGNAL( clicked() ), this, SLOT( slotMoveDown() ) ); + connect( mUpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveUp() ) ); + connect( mDownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveDown() ) ); } LDAPOptionsWidget::~LDAPOptionsWidget() { } -void LDAPOptionsWidget::slotSelectionChanged( QListViewItem *item ) +void LDAPOptionsWidget::slotSelectionChanged( TQListViewItem *item ) { bool state = ( item != 0 ); mEditButton->setEnabled( state ); @@ -103,7 +103,7 @@ void LDAPOptionsWidget::slotSelectionChanged( QListViewItem *item ) mUpButton->setEnabled( item && item->itemAbove() ); } -void LDAPOptionsWidget::slotItemClicked( QListViewItem *item ) +void LDAPOptionsWidget::slotItemClicked( TQListViewItem *item ) { LDAPItem *ldapItem = dynamic_cast<LDAPItem*>( item ); if ( !ldapItem ) @@ -146,7 +146,7 @@ void LDAPOptionsWidget::slotEditHost() void LDAPOptionsWidget::slotRemoveHost() { - QListViewItem *item = mHostListView->currentItem(); + TQListViewItem *item = mHostListView->currentItem(); if ( !item ) return; @@ -200,7 +200,7 @@ void LDAPOptionsWidget::restoreSettings() KConfig *config = KPIM::LdapSearch::config(); KConfigGroupSaver saver( config, "LDAP" ); - QString host; + TQString host; uint count = config->readUnsignedNumEntry( "NumSelectedHosts"); for ( uint i = 0; i < count; ++i ) { @@ -228,7 +228,7 @@ void LDAPOptionsWidget::saveSettings() KConfigGroupSaver saver( config, "LDAP" ); uint selected = 0; uint unselected = 0; - QListViewItemIterator it( mHostListView ); + TQListViewItemIterator it( mHostListView ); for ( ; it.current(); ++it ) { LDAPItem *item = dynamic_cast<LDAPItem*>( it.current() ); if ( !item ) @@ -258,46 +258,46 @@ void LDAPOptionsWidget::defaults() void LDAPOptionsWidget::initGUI() { - QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); - QVGroupBox *groupBox = new QVGroupBox( i18n( "LDAP Servers" ), this ); + TQVGroupBox *groupBox = new TQVGroupBox( i18n( "LDAP Servers" ), this ); groupBox->setInsideSpacing( KDialog::spacingHint() ); groupBox->setInsideMargin( KDialog::marginHint() ); - // Contents of the QVGroupBox: label and hbox - /*QLabel *label =*/ new QLabel( i18n( "Check all servers that should be used:" ), groupBox ); + // Contents of the TQVGroupBox: label and hbox + /*TQLabel *label =*/ new TQLabel( i18n( "Check all servers that should be used:" ), groupBox ); - QHBox* hBox = new QHBox( groupBox ); + TQHBox* hBox = new TQHBox( groupBox ); hBox->setSpacing( 6 ); // Contents of the hbox: listview and up/down buttons on the right (vbox) mHostListView = new KListView( hBox ); - QVBox* upDownBox = new QVBox( hBox ); + TQVBox* upDownBox = new TQVBox( hBox ); upDownBox->setSpacing( 6 ); - mUpButton = new QToolButton( upDownBox, "mUpButton" ); + mUpButton = new TQToolButton( upDownBox, "mUpButton" ); mUpButton->setIconSet( BarIconSet( "up", KIcon::SizeSmall ) ); mUpButton->setEnabled( false ); // b/c no item is selected yet - mDownButton = new QToolButton( upDownBox, "mDownButton" ); + mDownButton = new TQToolButton( upDownBox, "mDownButton" ); mDownButton->setIconSet( BarIconSet( "down", KIcon::SizeSmall ) ); mDownButton->setEnabled( false ); // b/c no item is selected yet - QWidget* spacer = new QWidget( upDownBox ); + TQWidget* spacer = new TQWidget( upDownBox ); upDownBox->setStretchFactor( spacer, 100 ); layout->addWidget( groupBox ); KButtonBox *buttons = new KButtonBox( this ); - buttons->addButton( i18n( "&Add Host..." ), this, SLOT( slotAddHost() ) ); - mEditButton = buttons->addButton( i18n( "&Edit Host..." ), this, SLOT( slotEditHost() ) ); + buttons->addButton( i18n( "&Add Host..." ), this, TQT_SLOT( slotAddHost() ) ); + mEditButton = buttons->addButton( i18n( "&Edit Host..." ), this, TQT_SLOT( slotEditHost() ) ); mEditButton->setEnabled( false ); - mRemoveButton = buttons->addButton( i18n( "&Remove Host" ), this, SLOT( slotRemoveHost() ) ); + mRemoveButton = buttons->addButton( i18n( "&Remove Host" ), this, TQT_SLOT( slotRemoveHost() ) ); mRemoveButton->setEnabled( false ); buttons->layout(); layout->addWidget( buttons ); - resize( QSize( 460, 300 ).expandedTo( sizeHint() ) ); + resize( TQSize( 460, 300 ).expandedTo( sizeHint() ) ); } #include "ldapoptionswidget.moc" |