author | zautrix <zautrix> | 2005-10-28 23:31:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-28 23:31:46 (UTC) |
commit | 7a90e619147e06e5f4d4facef98364f78a4a04ef (patch) (side-by-side diff) | |
tree | f1b11d0ca9c123d42f9b632bae1cc6608ee5e740 /kaddressbook/addresseeeditorwidget.cpp | |
parent | 85d2ea5c17a2b2c7a4ae4dd954bc635a56239b57 (diff) | |
download | kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.zip kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.tar.gz kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.tar.bz2 |
fixx
Diffstat (limited to 'kaddressbook/addresseeeditorwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 966efa5..c4083a9 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp @@ -151,25 +151,25 @@ void AddresseeEditorWidget::initGUI() void AddresseeEditorWidget::setupTab1() { // This is the General tab QWidget *tab1 = new QWidget( mTabWidget ); //US QGridLayout *layout = new QGridLayout( tab1, 11, 7 ); bool horLayout = false; int maxCol = 1; if ( QApplication::desktop()->width() == 640 || QApplication::desktop()->width() == 320 ) { horLayout = true; maxCol = 3; } - QGridLayout *layout = new QGridLayout( tab1, 8-maxCol, maxCol ); + QGridLayout *layout = new QGridLayout( tab1, 7-maxCol, maxCol ); layout->setMargin( KDialogBase::marginHintSmall() ); layout->setSpacing( KDialogBase::spacingHintSmall() ); QLabel *label; KSeparator* bar; QPushButton *button; ////////////////////////////////// // Upper left group (person info) // Person icon @@ -193,50 +193,55 @@ void AddresseeEditorWidget::setupTab1() layout->addWidget( button, 0, 0 ); layout->addWidget( mNameEdit, 0, 1 ); layout->addWidget( mNameLabel, 0, 1 ); button = new QPushButton( i18n( "Role:" ), tab1 ); connect( button, SIGNAL( clicked() ), SLOT( setRole2FN() ) ); //label = new QLabel( i18n( "Role:" ), tab1 ); mRoleEdit = new KLineEdit( tab1 ); connect( mRoleEdit, SIGNAL( textChanged( const QString& ) ), SLOT( textChanged( const QString& ) ) ); //label->setBuddy( mRoleEdit ); - layout->addWidget( button, 1, 0 ); - layout->addWidget( mRoleEdit, 1, 1 ); - + if ( horLayout ) { + layout->addWidget( button, 0, 2 ); + layout->addWidget( mRoleEdit, 0, 3 ); + + } else { + layout->addWidget( button, 1, 0 ); + layout->addWidget( mRoleEdit, 1, 1 ); + } // Organization button = new QPushButton( i18n( "Organization:" ), tab1 ); connect( button, SIGNAL( clicked() ), SLOT( setCompany2FN() ) ); //label = new QLabel( i18n( "Organization:" ), tab1 ); mOrgEdit = new KLineEdit( tab1 ); //label->setBuddy( mOrgEdit ); connect( mOrgEdit, SIGNAL( textChanged( const QString& ) ), SLOT( textChanged( const QString& ) ) ); if ( horLayout ) { layout->addWidget( button, 1, 2 ); layout->addWidget( mOrgEdit, 1, 3 ); } else { layout->addWidget( button, 2, 0 ); layout->addWidget( mOrgEdit, 2, 1 ); } // File as (formatted name) label = new QLabel( i18n( "Format.n.:" ), tab1 ); mFormattedNameLabel = new KSqueezedTextLabel( tab1 ); if ( horLayout ) { - layout->addWidget( label, 0,2 ); - layout->addWidget( mFormattedNameLabel, 0, 3 ); + layout->addWidget( label, 1,0 ); + layout->addWidget( mFormattedNameLabel, 1, 1 ); } else { layout->addWidget( label, 3, 0 ); layout->addWidget( mFormattedNameLabel, 3, 1 ); } /* LR // 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 ); layout->addMultiCellWidget( bar, 4, 4, 0, 2 ); */ ////////////////////////////////////// @@ -249,26 +254,26 @@ void AddresseeEditorWidget::setupTab1() //US layout->addMultiCellWidget( label, 0, 1, 3, 3 ); layout->addMultiCellWidget( label, 5, 6, 0, 0 ); */ mPhoneEditWidget = new PhoneEditWidget( tab1 ); connect( mPhoneEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); //US layout->addMultiCellWidget( mPhoneEditWidget, 0, 3, 4, 6 ); int iii; #ifndef DESKTOP_VERSION iii = 7; #else iii = 8; #endif - layout->addMultiCellWidget( mPhoneEditWidget, 4, iii, 0, maxCol ); - ++iii; + layout->addMultiCellWidget( mPhoneEditWidget, 5-maxCol, 5-maxCol+4, 0, maxCol ); + iii = 6-maxCol+4; /* LR bar = new KSeparator( KSeparator::HLine, tab1 ); //US layout->addMultiCellWidget( bar, 4, 4, 3, 6 ); layout->addMultiCellWidget( bar, 9, 9, 0, 2 ); */ /*US ////////////////////////////////////// // Addresses (lower left) label = new QLabel( tab1 ); //US loadIcon call is ambiguous. Add one more parameter //US label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop ) ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) ); |