diff options
Diffstat (limited to 'kaddressbook/addresseeeditorwidget.cpp')
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 260 |
1 files changed, 130 insertions, 130 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 253c3b45b..631d1a3ac 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp @@ -21,16 +21,16 @@ without including the source code for Qt in the source distribution. */ -#include <qcheckbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qtabwidget.h> -#include <qtextedit.h> -#include <qtoolbutton.h> -#include <qtooltip.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqtabwidget.h> +#include <tqtextedit.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> #include <kabc/resource.h> #include <kabc/stdaddressbook.h> @@ -67,7 +67,7 @@ #include "addresseeeditorwidget.h" -AddresseeEditorWidget::AddresseeEditorWidget( QWidget *parent, const char *name ) +AddresseeEditorWidget::AddresseeEditorWidget( TQWidget *parent, const char *name ) : AddresseeEditorBase( parent, name ), mBlockSignals( false ), mReadOnly( false ) { @@ -103,7 +103,7 @@ void AddresseeEditorWidget::setAddressee( const KABC::Addressee &addr ) } else if ( res->inherits( "KPIM::ResourceABC" ) ) { KPIM::ResourceABC *resAbc = static_cast<KPIM::ResourceABC *>( res ); - QString subresource = resAbc->uidToResourceMap()[ addr.uid() ]; + TQString subresource = resAbc->uidToResourceMap()[ addr.uid() ]; if ( !subresource.isEmpty() ) readOnly |= !resAbc->subresourceWritable( subresource ); } @@ -118,16 +118,16 @@ const KABC::Addressee &AddresseeEditorWidget::addressee() return mAddressee; } -void AddresseeEditorWidget::textChanged( const QString& ) +void AddresseeEditorWidget::textChanged( const TQString& ) { emitModified(); } void AddresseeEditorWidget::initGUI() { - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); - mTabWidget = new QTabWidget( this ); + mTabWidget = new TQTabWidget( this ); layout->addWidget( mTabWidget ); setupTab1(); @@ -135,39 +135,39 @@ void AddresseeEditorWidget::initGUI() setupAdditionalTabs(); setupCustomFieldsTabs(); - connect( mTabWidget, SIGNAL( currentChanged(QWidget*) ), - SLOT( pageChanged(QWidget*) ) ); + connect( mTabWidget, TQT_SIGNAL( currentChanged(TQWidget*) ), + TQT_SLOT( pageChanged(TQWidget*) ) ); } void AddresseeEditorWidget::setupTab1() { // This is the General tab - QWidget *tab1 = new QWidget( mTabWidget ); + TQWidget *tab1 = new TQWidget( mTabWidget ); - QGridLayout *layout = new QGridLayout( tab1, 11, 7 ); + TQGridLayout *layout = new TQGridLayout( tab1, 11, 7 ); layout->setMargin( KDialogBase::marginHint() ); layout->setSpacing( KDialogBase::spacingHint() ); - QLabel *label; + TQLabel *label; KSeparator* bar; - QPushButton *button; + TQPushButton *button; ////////////////////////////////// // Upper left group (person info) // Person icon - label = new QLabel( tab1 ); + label = new TQLabel( tab1 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 0, 1, 0, 0 ); // First name - button = new QPushButton( i18n( "Edit Name..." ), tab1 ); - QToolTip::add( button, i18n( "Edit the contact's name" ) ); + button = new TQPushButton( i18n( "Edit Name..." ), tab1 ); + TQToolTip::add( button, i18n( "Edit the contact's name" ) ); mNameEdit = new KLineEdit( tab1, "mNameEdit" ); - connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( nameTextChanged( const QString& ) ) ); - connect( button, SIGNAL( clicked() ), SLOT( nameButtonClicked() ) ); + connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( nameTextChanged( const TQString& ) ) ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( nameButtonClicked() ) ); mNameLabel = new KSqueezedTextLabel( tab1 ); if ( KABPrefs::instance()->automaticNameParsing() ) { @@ -181,25 +181,25 @@ void AddresseeEditorWidget::setupTab1() layout->addWidget( button, 0, 1 ); layout->addWidget( mNameEdit, 0, 2 ); layout->addWidget( mNameLabel, 0, 2 ); - label = new QLabel( i18n( "<roleLabel>:", "%1:" ).arg( KABC::Addressee::roleLabel() ), tab1 ); + label = new TQLabel( i18n( "<roleLabel>:", "%1:" ).arg( KABC::Addressee::roleLabel() ), tab1 ); mRoleEdit = new KLineEdit( tab1 ); - connect( mRoleEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mRoleEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mRoleEdit ); layout->addWidget( label, 1, 1 ); layout->addWidget( mRoleEdit, 1, 2 ); // Organization - label = new QLabel( i18n( "<organizationLabel>:", "%1:" ).arg( KABC::Addressee::organizationLabel() ), tab1 ); + label = new TQLabel( i18n( "<organizationLabel>:", "%1:" ).arg( KABC::Addressee::organizationLabel() ), tab1 ); mOrgEdit = new KLineEdit( tab1 ); label->setBuddy( mOrgEdit ); - connect( mOrgEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( organizationTextChanged( const QString& ) ) ); + connect( mOrgEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( organizationTextChanged( const TQString& ) ) ); layout->addWidget( label, 2, 1 ); layout->addWidget( mOrgEdit, 2, 2 ); // File as (formatted name) - label = new QLabel( i18n( "Formatted name:" ), tab1 ); + label = new TQLabel( i18n( "Formatted name:" ), tab1 ); mFormattedNameLabel = new KSqueezedTextLabel( tab1 ); layout->addWidget( label, 3, 1 ); layout->addWidget( mFormattedNameLabel, 3, 2 ); @@ -211,13 +211,13 @@ void AddresseeEditorWidget::setupTab1() ////////////////////////////////////// // Phone numbers (upper right) - label = new QLabel( tab1 ); + label = new TQLabel( tab1 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 0, 1, 3, 3 ); mPhoneEditWidget = new PhoneEditWidget( tab1 ); - connect( mPhoneEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); + connect( mPhoneEditWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) ); layout->addMultiCellWidget( mPhoneEditWidget, 0, 3, 4, 6 ); bar = new KSeparator( KSeparator::HLine, tab1 ); @@ -225,58 +225,58 @@ void AddresseeEditorWidget::setupTab1() ////////////////////////////////////// // Addresses (lower left) - label = new QLabel( tab1 ); + label = new TQLabel( tab1 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "kfm_home", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 5, 6, 0, 0 ); mAddressEditWidget = new AddressEditWidget( tab1 ); - connect( mAddressEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); + connect( mAddressEditWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) ); layout->addMultiCellWidget( mAddressEditWidget, 5, 10, 1, 2 ); ////////////////////////////////////// // Email / Web (lower right) - label = new QLabel( tab1 ); + label = new TQLabel( tab1 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 5, 6, 3, 3 ); mEmailWidget = new EmailEditWidget( tab1 ); - connect( mEmailWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); + connect( mEmailWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) ); layout->addMultiCellWidget( mEmailWidget, 5, 6, 4, 6 ); // add the separator bar = new KSeparator( KSeparator::HLine, tab1 ); layout->addMultiCellWidget( bar, 7, 7, 3, 6 ); - QHBoxLayout *homePageLayout = new QHBoxLayout( 0, 11, 7 ); + TQHBoxLayout *homePageLayout = new TQHBoxLayout( 0, 11, 7 ); - label = new QLabel( tab1 ); + label = new TQLabel( tab1 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop, KIcon::SizeMedium ) ); homePageLayout->addWidget( label ); - label = new QLabel( i18n( "<urlLabel>:", "%1:" ).arg( KABC::Addressee::urlLabel() ), tab1 ); + label = new TQLabel( i18n( "<urlLabel>:", "%1:" ).arg( KABC::Addressee::urlLabel() ), tab1 ); mURLEdit = new KLineEdit( tab1 ); - connect( mURLEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mURLEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mURLEdit ); homePageLayout->addWidget( label ); homePageLayout->addWidget( mURLEdit ); layout->addMultiCellLayout( homePageLayout, 8, 8, 3, 6 ); - QHBoxLayout *blogLayout = new QHBoxLayout( 0, 11, 7 ); - label = new QLabel( i18n("Blog feed:"), tab1 ); + TQHBoxLayout *blogLayout = new TQHBoxLayout( 0, 11, 7 ); + label = new TQLabel( i18n("Blog feed:"), tab1 ); blogLayout->addWidget( label ); mBlogEdit = new KLineEdit( tab1 ); blogLayout->addWidget( mBlogEdit ); - connect( mBlogEdit, SIGNAL( textChanged( const QString & ) ), - SLOT( textChanged( const QString & ) ) ); + connect( mBlogEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( textChanged( const TQString & ) ) ); label->setBuddy( mBlogEdit ); layout->addMultiCellLayout( blogLayout, 9, 9, 4, 6 ); mIMWidget = new IMEditWidget( tab1, mAddressee ); - connect( mIMWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); + connect( mIMWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) ); layout->addMultiCellWidget( mIMWidget, 10, 10, 4, 6 ); layout->addColSpacing( 6, 50 ); @@ -285,20 +285,20 @@ void AddresseeEditorWidget::setupTab1() layout->addMultiCellWidget( bar, 11, 11, 0, 6 ); /////////////////////////////////////// - QHBox *categoryBox = new QHBox( tab1 ); + TQHBox *categoryBox = new TQHBox( tab1 ); categoryBox->setSpacing( KDialogBase::spacingHint() ); // Categories - mCategoryButton = new QPushButton( i18n( "Select Categories..." ), categoryBox ); - connect( mCategoryButton, SIGNAL( clicked() ), SLOT( selectCategories() ) ); + mCategoryButton = new TQPushButton( i18n( "Select Categories..." ), categoryBox ); + connect( mCategoryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectCategories() ) ); mCategoryEdit = new KLineEdit( categoryBox ); mCategoryEdit->setReadOnly( true ); - connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mCategoryEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); mSecrecyWidget = new SecrecyWidget( categoryBox ); - connect( mSecrecyWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); + connect( mSecrecyWidget, TQT_SIGNAL( changed() ), TQT_SLOT( emitModified() ) ); layout->addMultiCellWidget( categoryBox, 12, 12, 0, 6 ); @@ -311,69 +311,69 @@ void AddresseeEditorWidget::setupTab1() void AddresseeEditorWidget::setupTab2() { // This is the Details tab - QWidget *tab2 = new QWidget( mTabWidget ); + TQWidget *tab2 = new TQWidget( mTabWidget ); - QGridLayout *layout = new QGridLayout( tab2, 6, 6 ); + TQGridLayout *layout = new TQGridLayout( tab2, 6, 6 ); layout->setMargin( KDialogBase::marginHint() ); layout->setSpacing( KDialogBase::spacingHint() ); - QLabel *label; + TQLabel *label; KSeparator* bar; /////////////////////// // Office info // Department - label = new QLabel( tab2 ); + label = new TQLabel( tab2 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 0, 1, 0, 0 ); - label = new QLabel( i18n( "Department:" ), tab2 ); + label = new TQLabel( i18n( "Department:" ), tab2 ); layout->addWidget( label, 0, 1 ); mDepartmentEdit = new KLineEdit( tab2 ); - connect( mDepartmentEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mDepartmentEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mDepartmentEdit ); layout->addWidget( mDepartmentEdit, 0, 2 ); - label = new QLabel( i18n( "Office:" ), tab2 ); + label = new TQLabel( i18n( "Office:" ), tab2 ); layout->addWidget( label, 1, 1 ); mOfficeEdit = new KLineEdit( tab2 ); - connect( mOfficeEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mOfficeEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mOfficeEdit ); layout->addWidget( mOfficeEdit, 1, 2 ); - label = new QLabel( i18n( "Profession:" ), tab2 ); + label = new TQLabel( i18n( "Profession:" ), tab2 ); layout->addWidget( label, 2, 1 ); mProfessionEdit = new KLineEdit( tab2 ); - connect( mProfessionEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mProfessionEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mProfessionEdit ); layout->addWidget( mProfessionEdit, 2, 2 ); - label = new QLabel( i18n( "Manager\'s name:" ), tab2 ); + label = new TQLabel( i18n( "Manager\'s name:" ), tab2 ); layout->addWidget( label, 0, 3 ); mManagerEdit = new KPIM::AddresseeLineEdit( tab2 ); - connect( mManagerEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mManagerEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mManagerEdit ); layout->addMultiCellWidget( mManagerEdit, 0, 0, 4, 5 ); - label = new QLabel( i18n( "Assistant's name:" ), tab2 ); + label = new TQLabel( i18n( "Assistant's name:" ), tab2 ); layout->addWidget( label, 1, 3 ); mAssistantEdit = new KPIM::AddresseeLineEdit( tab2 ); - connect( mAssistantEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mAssistantEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mAssistantEdit ); layout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 ); - label = new QLabel( i18n( "<titleLabel>:", "%1:" ).arg( KABC::Addressee::titleLabel() ), tab2 ); + label = new TQLabel( i18n( "<titleLabel>:", "%1:" ).arg( KABC::Addressee::titleLabel() ), tab2 ); layout->addWidget( label, 2, 3 ); mTitleEdit = new KLineEdit( tab2 ); - connect( mTitleEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mTitleEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mTitleEdit ); layout->addMultiCellWidget( mTitleEdit, 2, 2, 4, 5 ); @@ -383,44 +383,44 @@ void AddresseeEditorWidget::setupTab2() ///////////////////////////////////////////////// // Personal info - label = new QLabel( tab2 ); + label = new TQLabel( tab2 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 4, 5, 0, 0 ); - label = new QLabel( i18n( "Nickname:" ), tab2 ); + label = new TQLabel( i18n( "Nickname:" ), tab2 ); layout->addWidget( label, 4, 1 ); mNicknameEdit = new KLineEdit( tab2 ); - connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mNicknameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mNicknameEdit ); layout->addWidget( mNicknameEdit, 4, 2 ); - label = new QLabel( i18n( "Partner's name:" ), tab2 ); + label = new TQLabel( i18n( "Partner's name:" ), tab2 ); layout->addWidget( label, 5, 1 ); mSpouseEdit = new KPIM::AddresseeLineEdit( tab2 ); - connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mSpouseEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mSpouseEdit ); layout->addWidget( mSpouseEdit, 5, 2 ); - label = new QLabel( i18n( "Birthdate:" ), tab2 ); + label = new TQLabel( i18n( "Birthdate:" ), tab2 ); layout->addWidget( label, 4, 3 ); mBirthdayPicker = new KDateEdit( tab2 ); - connect( mBirthdayPicker, SIGNAL( dateChanged( const QDate& ) ), - SLOT( dateChanged( const QDate& ) ) ); - connect( mBirthdayPicker, SIGNAL( textChanged( const QString& ) ), - SLOT( emitModified() ) ); + connect( mBirthdayPicker, TQT_SIGNAL( dateChanged( const TQDate& ) ), + TQT_SLOT( dateChanged( const TQDate& ) ) ); + connect( mBirthdayPicker, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( emitModified() ) ); label->setBuddy( mBirthdayPicker ); layout->addWidget( mBirthdayPicker, 4, 4 ); - label = new QLabel( i18n( "Anniversary:" ), tab2 ); + label = new TQLabel( i18n( "Anniversary:" ), tab2 ); layout->addWidget( label, 5, 3 ); mAnniversaryPicker = new KDateEdit( tab2 ); - connect( mAnniversaryPicker, SIGNAL( dateChanged( const QDate& ) ), - SLOT( dateChanged( const QDate& ) ) ); - connect( mAnniversaryPicker, SIGNAL( textChanged( const QString& ) ), - SLOT( emitModified() ) ); + connect( mAnniversaryPicker, TQT_SIGNAL( dateChanged( const TQDate& ) ), + TQT_SLOT( dateChanged( const TQDate& ) ) ); + connect( mAnniversaryPicker, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( emitModified() ) ); label->setBuddy( mAnniversaryPicker ); layout->addWidget( mAnniversaryPicker, 5, 4 ); @@ -429,13 +429,13 @@ void AddresseeEditorWidget::setupTab2() ////////////////////////////////////// // Notes - label = new QLabel( i18n( "Note:" ), tab2 ); + label = new TQLabel( i18n( "Note:" ), tab2 ); label->setAlignment( Qt::AlignTop | Qt::AlignLeft ); layout->addWidget( label, 7, 0 ); - mNoteEdit = new QTextEdit( tab2 ); - mNoteEdit->setWordWrap( QTextEdit::WidgetWidth ); + mNoteEdit = new TQTextEdit( tab2 ); + mNoteEdit->setWordWrap( TQTextEdit::WidgetWidth ); mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); - connect( mNoteEdit, SIGNAL( textChanged() ), SLOT( emitModified() ) ); + connect( mNoteEdit, TQT_SIGNAL( textChanged() ), TQT_SLOT( emitModified() ) ); label->setBuddy( mNoteEdit ); layout->addMultiCellWidget( mNoteEdit, 7, 7, 1, 5 ); @@ -451,8 +451,8 @@ void AddresseeEditorWidget::setupAdditionalTabs() // create all tab pages and add the widgets for ( int i = 0; i < manager->count(); ++i ) { - QString pageIdentifier = manager->factory( i )->pageIdentifier(); - QString pageTitle = manager->factory( i )->pageTitle(); + TQString pageIdentifier = manager->factory( i )->pageIdentifier(); + TQString pageTitle = manager->factory( i )->pageTitle(); if ( pageIdentifier == "misc" ) pageTitle = i18n( "Misc" ); @@ -464,7 +464,7 @@ void AddresseeEditorWidget::setupAdditionalTabs() mTabWidget->addTab( page, pageTitle ); - connect( page, SIGNAL( changed() ), SLOT( emitModified() ) ); + connect( page, TQT_SIGNAL( changed() ), TQT_SLOT( emitModified() ) ); } KAB::ContactEditorWidget *widget @@ -475,17 +475,17 @@ void AddresseeEditorWidget::setupAdditionalTabs() } // query the layout update - QDictIterator<ContactEditorTabPage> it( mTabPages ); + TQDictIterator<ContactEditorTabPage> it( mTabPages ); for ( ; it.current(); ++it ) it.current()->updateLayout(); } void AddresseeEditorWidget::setupCustomFieldsTabs() { - QStringList activePages = KABPrefs::instance()->advancedCustomFields(); + TQStringList activePages = KABPrefs::instance()->advancedCustomFields(); - const QStringList list = KGlobal::dirs()->findAllResources( "data", "kaddressbook/contacteditorpages/*.ui", true, true ); - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { + const TQStringList list = KGlobal::dirs()->findAllResources( "data", "kaddressbook/contacteditorpages/*.ui", true, true ); + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { if ( activePages.find( (*it).mid( (*it).findRev('/') + 1 ) ) == activePages.end() ) continue; @@ -498,7 +498,7 @@ void AddresseeEditorWidget::setupCustomFieldsTabs() page->addWidget( wdg ); page->updateLayout(); - connect( page, SIGNAL( changed() ), SLOT( emitModified() ) ); + connect( page, TQT_SIGNAL( changed() ), TQT_SLOT( emitModified() ) ); } else delete page; } @@ -557,8 +557,8 @@ void AddresseeEditorWidget::load() mAddressEditWidget->setAddresses( mAddressee, mAddressee.addresses() ); mBirthdayPicker->setDate( mAddressee.birthday().date() ); - QString anniversaryStr = mAddressee.custom( "KADDRESSBOOK", "X-Anniversary" ); - QDate anniversary = (anniversaryStr.isEmpty() ? QDate() : QDate::fromString( anniversaryStr, Qt::ISODate )); + TQString anniversaryStr = mAddressee.custom( "KADDRESSBOOK", "X-Anniversary" ); + TQDate anniversary = (anniversaryStr.isEmpty() ? TQDate() : TQDate::fromString( anniversaryStr, Qt::ISODate )); mAnniversaryPicker->setDate( anniversary ); mNicknameEdit->setText( mAddressee.nickName() ); mCategoryEdit->setText( mAddressee.categories().join( "," ) ); @@ -574,7 +574,7 @@ void AddresseeEditorWidget::load() mProfessionEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Profession" ) ); mTitleEdit->setText( mAddressee.title() ); - QDictIterator<ContactEditorTabPage> it( mTabPages ); + TQDictIterator<ContactEditorTabPage> it( mTabPages ); for ( ; it.current(); ++it ) it.current()->loadContact( &mAddressee ); @@ -599,7 +599,7 @@ void AddresseeEditorWidget::save() mAddressee.removeCustom( "KADDRESSBOOK", "X-Department" ); #endif - QString homepage = mURLEdit->text().stripWhiteSpace(); + TQString homepage = mURLEdit->text().stripWhiteSpace(); if ( homepage.isEmpty() ) mAddressee.setUrl( KURL() ); else { @@ -614,12 +614,12 @@ void AddresseeEditorWidget::save() mAddressee.setNote( mNoteEdit->text() ); if ( mBirthdayPicker->date().isValid() ) - mAddressee.setBirthday( QDateTime( mBirthdayPicker->date() ) ); + mAddressee.setBirthday( TQDateTime( mBirthdayPicker->date() ) ); else - mAddressee.setBirthday( QDateTime() ); + mAddressee.setBirthday( TQDateTime() ); mAddressee.setNickName( mNicknameEdit->text() ); - mAddressee.setCategories( QStringList::split( ",", mCategoryEdit->text() ) ); + mAddressee.setCategories( TQStringList::split( ",", mCategoryEdit->text() ) ); mAddressee.setSecrecy( mSecrecyWidget->secrecy() ); @@ -687,7 +687,7 @@ void AddresseeEditorWidget::save() ++addressIter ) mAddressee.insertAddress( *addressIter ); - QDictIterator<ContactEditorTabPage> it( mTabPages ); + TQDictIterator<ContactEditorTabPage> it( mTabPages ); for ( ; it.current(); ++it ) it.current()->storeContact( &mAddressee ); @@ -699,13 +699,13 @@ bool AddresseeEditorWidget::dirty() return mDirty; } -void AddresseeEditorWidget::nameTextChanged( const QString &text ) +void AddresseeEditorWidget::nameTextChanged( const TQString &text ) { // use the addressee class to parse the name for us AddresseeConfig config( mAddressee ); if ( config.automaticNameParsing() ) { if ( !mAddressee.formattedName().isEmpty() ) { - QString fn = mAddressee.formattedName(); + TQString fn = mAddressee.formattedName(); mAddressee.setNameFromString( text ); mAddressee.setFormattedName( fn ); } else { @@ -725,7 +725,7 @@ void AddresseeEditorWidget::nameTextChanged( const QString &text ) emitModified(); } -void AddresseeEditorWidget::organizationTextChanged( const QString &text ) +void AddresseeEditorWidget::organizationTextChanged( const TQString &text ) { AddresseeConfig config( mAddressee ); @@ -798,17 +798,17 @@ void AddresseeEditorWidget::selectCategories() // Show the category dialog if ( mCategorySelectDialog == 0 ) { mCategorySelectDialog = new KPIM::CategorySelectDialog( KABPrefs::instance(), this ); - connect( mCategorySelectDialog, SIGNAL( categoriesSelected( const QStringList& ) ), - this, SLOT( categoriesSelected( const QStringList& ) ) ); - connect( mCategorySelectDialog, SIGNAL( editCategories() ), - this, SLOT( editCategories() ) ); + connect( mCategorySelectDialog, TQT_SIGNAL( categoriesSelected( const TQStringList& ) ), + this, TQT_SLOT( categoriesSelected( const TQStringList& ) ) ); + connect( mCategorySelectDialog, TQT_SIGNAL( editCategories() ), + this, TQT_SLOT( editCategories() ) ); } - mCategorySelectDialog->setSelected( QStringList::split( ",", mCategoryEdit->text() ) ); + mCategorySelectDialog->setSelected( TQStringList::split( ",", mCategoryEdit->text() ) ); mCategorySelectDialog->exec(); } -void AddresseeEditorWidget::categoriesSelected( const QStringList &list ) +void AddresseeEditorWidget::categoriesSelected( const TQStringList &list ) { mCategoryEdit->setText( list.join( "," ) ); } @@ -817,8 +817,8 @@ void AddresseeEditorWidget::editCategories() { if ( mCategoryEditDialog == 0 ) { mCategoryEditDialog = new KPIM::CategoryEditDialog( KABPrefs::instance(), this ); - connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ), - mCategorySelectDialog, SLOT( updateCategoryConfig() ) ); + connect( mCategoryEditDialog, TQT_SIGNAL( categoryConfigChanged() ), + mCategorySelectDialog, TQT_SLOT( updateCategoryConfig() ) ); } mCategoryEditDialog->exec(); @@ -834,7 +834,7 @@ void AddresseeEditorWidget::emitModified() emit modified(); } -void AddresseeEditorWidget::dateChanged( const QDate& ) +void AddresseeEditorWidget::dateChanged( const TQDate& ) { emitModified(); } @@ -844,7 +844,7 @@ void AddresseeEditorWidget::invalidDate() KMessageBox::sorry( this, i18n( "You must specify a valid date" ) ); } -void AddresseeEditorWidget::pageChanged( QWidget *wdg ) +void AddresseeEditorWidget::pageChanged( TQWidget *wdg ) { if ( wdg ) KAcceleratorManager::manage( wdg ); @@ -859,7 +859,7 @@ bool AddresseeEditorWidget::readyToClose() { bool ok = true; - QDate date = mBirthdayPicker->date(); + TQDate date = mBirthdayPicker->date(); if ( !date.isValid() && !mBirthdayPicker->currentText().isEmpty() ) { KMessageBox::error( this, i18n( "You have to enter a valid birthdate." ) ); ok = false; @@ -901,7 +901,7 @@ void AddresseeEditorWidget::setReadOnly( bool readOnly ) mAnniversaryPicker->setEnabled( !readOnly ); mNoteEdit->setReadOnly( mReadOnly ); - QDictIterator<ContactEditorTabPage> it( mTabPages ); + TQDictIterator<ContactEditorTabPage> it( mTabPages ); for ( ; it.current(); ++it ) it.current()->setReadOnly( readOnly ); } |