summaryrefslogtreecommitdiffstats
path: root/kaddressbook/addresseeeditorwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/addresseeeditorwidget.cpp')
-rw-r--r--kaddressbook/addresseeeditorwidget.cpp144
1 files changed, 72 insertions, 72 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp
index 6d2e2ea8b..690f9fd58 100644
--- a/kaddressbook/addresseeeditorwidget.cpp
+++ b/kaddressbook/addresseeeditorwidget.cpp
@@ -24,11 +24,11 @@
#include <tqcheckbox.h>
#include <tqhbox.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqlistbox.h>
#include <tqpushbutton.h>
#include <tqtabwidget.h>
-#include <tqtextedit.h>
+#include <textedit.h>
#include <tqtoolbutton.h>
#include <tqtooltip.h>
@@ -125,10 +125,10 @@ void AddresseeEditorWidget::textChanged( const TQString& )
void AddresseeEditorWidget::initGUI()
{
- TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this );
mTabWidget = new TQTabWidget( this );
- tqlayout->addWidget( mTabWidget );
+ layout->addWidget( mTabWidget );
setupTab1();
setupTab2();
@@ -144,9 +144,9 @@ void AddresseeEditorWidget::setupTab1()
// This is the General tab
TQWidget *tab1 = new TQWidget( mTabWidget );
- TQGridLayout *tqlayout = new TQGridLayout( tab1, 11, 7 );
- tqlayout->setMargin( KDialogBase::marginHint() );
- tqlayout->setSpacing( KDialogBase::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( tab1, 11, 7 );
+ layout->setMargin( KDialogBase::marginHint() );
+ layout->setSpacing( KDialogBase::spacingHint() );
TQLabel *label;
KSeparator* bar;
@@ -159,7 +159,7 @@ void AddresseeEditorWidget::setupTab1()
label = new TQLabel( tab1 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop,
KIcon::SizeMedium ) );
- tqlayout->addMultiCellWidget( label, 0, 1, 0, 0 );
+ layout->addMultiCellWidget( label, 0, 1, 0, 0 );
// First name
button = new TQPushButton( i18n( "Edit Name..." ), tab1 );
@@ -178,76 +178,76 @@ void AddresseeEditorWidget::setupTab1()
mNameLabel->show();
}
- tqlayout->addWidget( button, 0, 1 );
- tqlayout->addWidget( mNameEdit, 0, 2 );
- tqlayout->addWidget( mNameLabel, 0, 2 );
- label = new TQLabel( i18n( "<roleLabel>:", "%1:" ).tqarg( KABC::Addressee::roleLabel() ), tab1 );
+ layout->addWidget( button, 0, 1 );
+ layout->addWidget( mNameEdit, 0, 2 );
+ layout->addWidget( mNameLabel, 0, 2 );
+ label = new TQLabel( i18n( "<roleLabel>:", "%1:" ).arg( KABC::Addressee::roleLabel() ), tab1 );
mRoleEdit = new KLineEdit( tab1 );
connect( mRoleEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mRoleEdit );
- tqlayout->addWidget( label, 1, 1 );
- tqlayout->addWidget( mRoleEdit, 1, 2 );
+ layout->addWidget( label, 1, 1 );
+ layout->addWidget( mRoleEdit, 1, 2 );
// Organization
- label = new TQLabel( i18n( "<organizationLabel>:", "%1:" ).tqarg( KABC::Addressee::organizationLabel() ), tab1 );
+ label = new TQLabel( i18n( "<organizationLabel>:", "%1:" ).arg( KABC::Addressee::organizationLabel() ), tab1 );
mOrgEdit = new KLineEdit( tab1 );
label->setBuddy( mOrgEdit );
connect( mOrgEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( organizationTextChanged( const TQString& ) ) );
- tqlayout->addWidget( label, 2, 1 );
- tqlayout->addWidget( mOrgEdit, 2, 2 );
+ layout->addWidget( label, 2, 1 );
+ layout->addWidget( mOrgEdit, 2, 2 );
// File as (formatted name)
label = new TQLabel( i18n( "Formatted name:" ), tab1 );
mFormattedNameLabel = new KSqueezedTextLabel( tab1 );
- tqlayout->addWidget( label, 3, 1 );
- tqlayout->addWidget( mFormattedNameLabel, 3, 2 );
+ layout->addWidget( label, 3, 1 );
+ layout->addWidget( mFormattedNameLabel, 3, 2 );
// Left hand separator. This separator doesn't go all the way
// across so the dialog still flows from top to bottom
bar = new KSeparator( KSeparator::HLine, tab1 );
- tqlayout->addMultiCellWidget( bar, 4, 4, 0, 2 );
+ layout->addMultiCellWidget( bar, 4, 4, 0, 2 );
//////////////////////////////////////
// Phone numbers (upper right)
label = new TQLabel( tab1 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook",
KIcon::Desktop, KIcon::SizeMedium ) );
- tqlayout->addMultiCellWidget( label, 0, 1, 3, 3 );
+ layout->addMultiCellWidget( label, 0, 1, 3, 3 );
mPhoneEditWidget = new PhoneEditWidget( tab1 );
connect( mPhoneEditWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) );
- tqlayout->addMultiCellWidget( mPhoneEditWidget, 0, 3, 4, 6 );
+ layout->addMultiCellWidget( mPhoneEditWidget, 0, 3, 4, 6 );
bar = new KSeparator( KSeparator::HLine, tab1 );
- tqlayout->addMultiCellWidget( bar, 4, 4, 3, 6 );
+ layout->addMultiCellWidget( bar, 4, 4, 3, 6 );
//////////////////////////////////////
// Addresses (lower left)
label = new TQLabel( tab1 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "kfm_home", KIcon::Desktop,
KIcon::SizeMedium ) );
- tqlayout->addMultiCellWidget( label, 5, 6, 0, 0 );
+ layout->addMultiCellWidget( label, 5, 6, 0, 0 );
mAddressEditWidget = new AddressEditWidget( tab1 );
connect( mAddressEditWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) );
- tqlayout->addMultiCellWidget( mAddressEditWidget, 5, 10, 1, 2 );
+ layout->addMultiCellWidget( mAddressEditWidget, 5, 10, 1, 2 );
//////////////////////////////////////
// Email / Web (lower right)
label = new TQLabel( tab1 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop,
KIcon::SizeMedium ) );
- tqlayout->addMultiCellWidget( label, 5, 6, 3, 3 );
+ layout->addMultiCellWidget( label, 5, 6, 3, 3 );
mEmailWidget = new EmailEditWidget( tab1 );
connect( mEmailWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) );
- tqlayout->addMultiCellWidget( mEmailWidget, 5, 6, 4, 6 );
+ layout->addMultiCellWidget( mEmailWidget, 5, 6, 4, 6 );
// add the separator
bar = new KSeparator( KSeparator::HLine, tab1 );
- tqlayout->addMultiCellWidget( bar, 7, 7, 3, 6 );
+ layout->addMultiCellWidget( bar, 7, 7, 3, 6 );
TQHBoxLayout *homePageLayout = new TQHBoxLayout( 0, 11, 7 );
@@ -256,14 +256,14 @@ void AddresseeEditorWidget::setupTab1()
KIcon::SizeMedium ) );
homePageLayout->addWidget( label );
- label = new TQLabel( i18n( "<urlLabel>:", "%1:" ).tqarg( KABC::Addressee::urlLabel() ), tab1 );
+ label = new TQLabel( i18n( "<urlLabel>:", "%1:" ).arg( KABC::Addressee::urlLabel() ), tab1 );
mURLEdit = new KLineEdit( tab1 );
connect( mURLEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mURLEdit );
homePageLayout->addWidget( label );
homePageLayout->addWidget( mURLEdit );
- tqlayout->addMultiCellLayout( homePageLayout, 8, 8, 3, 6 );
+ layout->addMultiCellLayout( homePageLayout, 8, 8, 3, 6 );
TQHBoxLayout *blogLayout = new TQHBoxLayout( 0, 11, 7 );
label = new TQLabel( i18n("Blog feed:"), tab1 );
@@ -273,16 +273,16 @@ void AddresseeEditorWidget::setupTab1()
connect( mBlogEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
TQT_SLOT( textChanged( const TQString & ) ) );
label->setBuddy( mBlogEdit );
- tqlayout->addMultiCellLayout( blogLayout, 9, 9, 4, 6 );
+ layout->addMultiCellLayout( blogLayout, 9, 9, 4, 6 );
mIMWidget = new IMEditWidget( tab1, mAddressee );
connect( mIMWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) );
- tqlayout->addMultiCellWidget( mIMWidget, 10, 10, 4, 6 );
+ layout->addMultiCellWidget( mIMWidget, 10, 10, 4, 6 );
- tqlayout->addColSpacing( 6, 50 );
+ layout->addColSpacing( 6, 50 );
bar = new KSeparator( KSeparator::HLine, tab1 );
- tqlayout->addMultiCellWidget( bar, 11, 11, 0, 6 );
+ layout->addMultiCellWidget( bar, 11, 11, 0, 6 );
///////////////////////////////////////
TQHBox *categoryBox = new TQHBox( tab1 );
@@ -300,10 +300,10 @@ void AddresseeEditorWidget::setupTab1()
mSecrecyWidget = new SecrecyWidget( categoryBox );
connect( mSecrecyWidget, TQT_SIGNAL( changed() ), TQT_SLOT( emitModified() ) );
- tqlayout->addMultiCellWidget( categoryBox, 12, 12, 0, 6 );
+ layout->addMultiCellWidget( categoryBox, 12, 12, 0, 6 );
- // Build the tqlayout and add to the tab widget
- tqlayout->activate(); // required
+ // Build the layout and add to the tab widget
+ layout->activate(); // required
mTabWidget->addTab( tab1, i18n( "&General" ) );
}
@@ -313,9 +313,9 @@ void AddresseeEditorWidget::setupTab2()
// This is the Details tab
TQWidget *tab2 = new TQWidget( mTabWidget );
- TQGridLayout *tqlayout = new TQGridLayout( tab2, 6, 6 );
- tqlayout->setMargin( KDialogBase::marginHint() );
- tqlayout->setSpacing( KDialogBase::spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( tab2, 6, 6 );
+ layout->setMargin( KDialogBase::marginHint() );
+ layout->setSpacing( KDialogBase::spacingHint() );
TQLabel *label;
KSeparator* bar;
@@ -327,58 +327,58 @@ void AddresseeEditorWidget::setupTab2()
label = new TQLabel( tab2 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop,
KIcon::SizeMedium ) );
- tqlayout->addMultiCellWidget( label, 0, 1, 0, 0 );
+ layout->addMultiCellWidget( label, 0, 1, 0, 0 );
label = new TQLabel( i18n( "Department:" ), tab2 );
- tqlayout->addWidget( label, 0, 1 );
+ layout->addWidget( label, 0, 1 );
mDepartmentEdit = new KLineEdit( tab2 );
connect( mDepartmentEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mDepartmentEdit );
- tqlayout->addWidget( mDepartmentEdit, 0, 2 );
+ layout->addWidget( mDepartmentEdit, 0, 2 );
label = new TQLabel( i18n( "Office:" ), tab2 );
- tqlayout->addWidget( label, 1, 1 );
+ layout->addWidget( label, 1, 1 );
mOfficeEdit = new KLineEdit( tab2 );
connect( mOfficeEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mOfficeEdit );
- tqlayout->addWidget( mOfficeEdit, 1, 2 );
+ layout->addWidget( mOfficeEdit, 1, 2 );
label = new TQLabel( i18n( "Profession:" ), tab2 );
- tqlayout->addWidget( label, 2, 1 );
+ layout->addWidget( label, 2, 1 );
mProfessionEdit = new KLineEdit( tab2 );
connect( mProfessionEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mProfessionEdit );
- tqlayout->addWidget( mProfessionEdit, 2, 2 );
+ layout->addWidget( mProfessionEdit, 2, 2 );
label = new TQLabel( i18n( "Manager\'s name:" ), tab2 );
- tqlayout->addWidget( label, 0, 3 );
+ layout->addWidget( label, 0, 3 );
mManagerEdit = new KPIM::AddresseeLineEdit( tab2 );
connect( mManagerEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mManagerEdit );
- tqlayout->addMultiCellWidget( mManagerEdit, 0, 0, 4, 5 );
+ layout->addMultiCellWidget( mManagerEdit, 0, 0, 4, 5 );
label = new TQLabel( i18n( "Assistant's name:" ), tab2 );
- tqlayout->addWidget( label, 1, 3 );
+ layout->addWidget( label, 1, 3 );
mAssistantEdit = new KPIM::AddresseeLineEdit( tab2 );
connect( mAssistantEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mAssistantEdit );
- tqlayout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 );
+ layout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 );
- label = new TQLabel( i18n( "<titleLabel>:", "%1:" ).tqarg( KABC::Addressee::titleLabel() ), tab2 );
- tqlayout->addWidget( label, 2, 3 );
+ label = new TQLabel( i18n( "<titleLabel>:", "%1:" ).arg( KABC::Addressee::titleLabel() ), tab2 );
+ layout->addWidget( label, 2, 3 );
mTitleEdit = new KLineEdit( tab2 );
connect( mTitleEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mTitleEdit );
- tqlayout->addMultiCellWidget( mTitleEdit, 2, 2, 4, 5 );
+ layout->addMultiCellWidget( mTitleEdit, 2, 2, 4, 5 );
bar = new KSeparator( KSeparator::HLine, tab2 );
- tqlayout->addMultiCellWidget( bar, 3, 3, 0, 5 );
+ layout->addMultiCellWidget( bar, 3, 3, 0, 5 );
/////////////////////////////////////////////////
// Personal info
@@ -386,61 +386,61 @@ void AddresseeEditorWidget::setupTab2()
label = new TQLabel( tab2 );
label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop,
KIcon::SizeMedium ) );
- tqlayout->addMultiCellWidget( label, 4, 5, 0, 0 );
+ layout->addMultiCellWidget( label, 4, 5, 0, 0 );
label = new TQLabel( i18n( "Nickname:" ), tab2 );
- tqlayout->addWidget( label, 4, 1 );
+ layout->addWidget( label, 4, 1 );
mNicknameEdit = new KLineEdit( tab2 );
connect( mNicknameEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mNicknameEdit );
- tqlayout->addWidget( mNicknameEdit, 4, 2 );
+ layout->addWidget( mNicknameEdit, 4, 2 );
label = new TQLabel( i18n( "Partner's name:" ), tab2 );
- tqlayout->addWidget( label, 5, 1 );
+ layout->addWidget( label, 5, 1 );
mSpouseEdit = new KPIM::AddresseeLineEdit( tab2 );
connect( mSpouseEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
TQT_SLOT( textChanged( const TQString& ) ) );
label->setBuddy( mSpouseEdit );
- tqlayout->addWidget( mSpouseEdit, 5, 2 );
+ layout->addWidget( mSpouseEdit, 5, 2 );
label = new TQLabel( i18n( "Birthdate:" ), tab2 );
- tqlayout->addWidget( label, 4, 3 );
+ layout->addWidget( label, 4, 3 );
mBirthdayPicker = new KDateEdit( tab2 );
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 );
- tqlayout->addWidget( mBirthdayPicker, 4, 4 );
+ layout->addWidget( mBirthdayPicker, 4, 4 );
label = new TQLabel( i18n( "Anniversary:" ), tab2 );
- tqlayout->addWidget( label, 5, 3 );
+ layout->addWidget( label, 5, 3 );
mAnniversaryPicker = new KDateEdit( tab2 );
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 );
- tqlayout->addWidget( mAnniversaryPicker, 5, 4 );
+ layout->addWidget( mAnniversaryPicker, 5, 4 );
bar = new KSeparator( KSeparator::HLine, tab2 );
- tqlayout->addMultiCellWidget( bar, 6, 6, 0, 5 );
+ layout->addMultiCellWidget( bar, 6, 6, 0, 5 );
//////////////////////////////////////
// Notes
label = new TQLabel( i18n( "Note:" ), tab2 );
- label->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft );
- tqlayout->addWidget( label, 7, 0 );
+ label->setAlignment( TQt::AlignTop | TQt::AlignLeft );
+ layout->addWidget( label, 7, 0 );
mNoteEdit = new TQTextEdit( tab2 );
mNoteEdit->setWordWrap( TQTextEdit::WidgetWidth );
- mNoteEdit->setMinimumSize( mNoteEdit->tqsizeHint() );
+ mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() );
connect( mNoteEdit, TQT_SIGNAL( textChanged() ), TQT_SLOT( emitModified() ) );
label->setBuddy( mNoteEdit );
- tqlayout->addMultiCellWidget( mNoteEdit, 7, 7, 1, 5 );
+ layout->addMultiCellWidget( mNoteEdit, 7, 7, 1, 5 );
- // Build the tqlayout and add to the tab widget
- tqlayout->activate(); // required
+ // Build the layout and add to the tab widget
+ layout->activate(); // required
mTabWidget->addTab( tab2, i18n( "&Details" ) );
}
@@ -474,7 +474,7 @@ void AddresseeEditorWidget::setupAdditionalTabs()
page->addWidget( widget );
}
- // query the tqlayout update
+ // query the layout update
TQDictIterator<ContactEditorTabPage> it( mTabPages );
for ( ; it.current(); ++it )
it.current()->updateLayout();