author | zecke <zecke> | 2002-05-21 14:21:25 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-05-21 14:21:25 (UTC) |
commit | 3eb1e88e5915c9dbd521a150cc5dd7eb7dbb3663 (patch) (side-by-side diff) | |
tree | 59f3648e8a0848457f879058b1064017b9feca66 | |
parent | 54955c2fd698b2a1cf3ba8a79f2612013c8eb2f0 (diff) | |
download | opie-3eb1e88e5915c9dbd521a150cc5dd7eb7dbb3663.zip opie-3eb1e88e5915c9dbd521a150cc5dd7eb7dbb3663.tar.gz opie-3eb1e88e5915c9dbd521a150cc5dd7eb7dbb3663.tar.bz2 |
usbaility updates
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 21 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 348 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.h | 18 |
3 files changed, 208 insertions, 179 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index beb953a..8229212 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -192,5 +192,5 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, listContainer = new QWidget( this ); - + QVBoxLayout *vb = new QVBoxLayout( listContainer ); - + abList = new AbTable( &orderedFields, listContainer, "table" ); @@ -235,3 +235,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, slotSetFont(startFontSize); - + mbList->insertItem( tr("Font"), fontMenu); @@ -249,3 +249,3 @@ void AddressbookWindow::slotSetFont( int size ) { QFont *currentFont; - + switch (size) { @@ -473,3 +473,3 @@ static void parseName( const QString& name, QString *first, QString *middle, } - + } @@ -505,3 +505,3 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) } else { - abEditor->setEntry( cnt ); + abEditor->setEntry( cnt ); } @@ -796,3 +796,3 @@ void AddressbookWindow::initFields() startFontSize = cfg.readNumEntry( "fontSize", 1 ); - + @@ -861,3 +861,3 @@ void AddressbookWindow::slotFind() showList(); - + FindDialog frmFind( "Contacts", this ); @@ -866,5 +866,5 @@ void AddressbookWindow::slotFind() QObject::connect( abList, SIGNAL(signalWrapAround()), &frmFind, SLOT(slotWrapAround()) ); - + frmFind.exec(); - + if ( abList->numSelections() ) @@ -908,2 +908,3 @@ void AddressbookWindow::populateCategories() id = 1; + rememberId = 0; catMenu->insertItem( tr( "All" ), id++ ); diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index e74da87..fa60f98 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -59,5 +59,5 @@ ContactEditor::ContactEditor( const Contact &entry, orderedValues( newOrderedValues ), - slOrdered( slNewOrdered ) + slOrdered( *slNewOrdered ) { - + init(); @@ -76,3 +76,3 @@ void ContactEditor::init() { int i = 0; - +/** SHut up and stop leaking slHomeAddress = new QStringList; @@ -83,3 +83,3 @@ void ContactEditor::init() { slDynamicEntries = new QStringList; - +*/ //*slDynamicEntries = *slOrdered; @@ -87,4 +87,4 @@ void ContactEditor::init() { for (i = 0; i <= 6; i++) { - slHomeAddress->append( "" ); - slBusinessAddress->append( "" ); + slHomeAddress.append( "" ); + slBusinessAddress.append( "" ); } @@ -103,9 +103,9 @@ void ContactEditor::init() { hasCountry = FALSE; - - QStringList::ConstIterator it = slOrdered->begin(); - for ( i = 0; it != slOrdered->end(); i++, ++it ) { + + QStringList::ConstIterator it = slOrdered.begin(); + for ( i = 0; it != slOrdered.end(); i++, ++it ) { if ( (*it).right( 3 ) == tr( "Fax" ) ) { - slChooserNames->append( *it ); - slChooserValues->append( tr( "" ) ); + slChooserNames.append( *it ); + slChooserValues.append("" ); //slDynamicEntries->remove( it ); @@ -115,4 +115,4 @@ void ContactEditor::init() { if ( (*it).right( 5 ) == tr( "Phone" ) ) { - slChooserNames->append( *it ); - slChooserValues->append( "" ); + slChooserNames.append( *it ); + slChooserValues.append( "" ); //slDynamicEntries->remove( it ); @@ -122,4 +122,4 @@ void ContactEditor::init() { if ( (*it).right( 2 ) == tr( "IM" ) ) { - slChooserNames->append( *it ); - slChooserValues->append( "" ); + slChooserNames.append( *it ); + slChooserValues.append( "" ); //slDynamicEntries->remove( it ); @@ -129,4 +129,4 @@ void ContactEditor::init() { if ( (*it).right( 6 ) == tr( "Mobile" ) ) { - slChooserNames->append( *it ); - slChooserValues->append( "" ); + slChooserNames.append( *it ); + slChooserValues.append( "" ); //slDynamicEntries->remove( it ); @@ -136,4 +136,4 @@ void ContactEditor::init() { if ( (*it).right( 4 ) == tr( "Page" ) ) { - slChooserNames->append( *it ); - slChooserValues->append( "" ); + slChooserNames.append( *it ); + slChooserValues.append( "" ); //slDynamicEntries->remove( it ); @@ -143,4 +143,4 @@ void ContactEditor::init() { if ( (*it).right( 5 ) == tr( "Pager" ) ) { - slChooserNames->append( *it ); - slChooserValues->append( "" ); + slChooserNames.append( *it ); + slChooserValues.append( "" ); //slDynamicEntries->remove( it ); @@ -150,4 +150,4 @@ void ContactEditor::init() { if ( *it == tr( "Default Email" ) ) { - slChooserNames->append( *it ); - slChooserValues->append( "" ); + slChooserNames.append( *it ); + slChooserValues.append( "" ); //slDynamicEntries->remove( it ); @@ -157,4 +157,4 @@ void ContactEditor::init() { if ( *it == tr( "Emails" ) ) { - slChooserNames->append( *it ); - slChooserValues->append( "" ); + slChooserNames.append( *it ); + slChooserValues.append( "" ); //slDynamicEntries->remove( it ); @@ -167,3 +167,3 @@ void ContactEditor::init() { } - + if ( *it == tr( "First Name" ) ) { @@ -172,3 +172,3 @@ void ContactEditor::init() { } - + if ( *it == tr( "Middle Name" ) ) { @@ -177,3 +177,3 @@ void ContactEditor::init() { } - + if ( *it == tr( "Last Name" ) ) { @@ -182,3 +182,3 @@ void ContactEditor::init() { } - + if ( *it == tr( "Suffix" ) ) { @@ -192,3 +192,3 @@ void ContactEditor::init() { } - + if ( *it == tr( "Gender" ) ) { @@ -198,3 +198,3 @@ void ContactEditor::init() { } - + if ( *it == tr( "Job Title" ) ) { @@ -204,3 +204,3 @@ void ContactEditor::init() { } - + if ( *it == tr( "Company" ) ) { @@ -210,3 +210,3 @@ void ContactEditor::init() { } - + if ( *it == tr( "Notes" ) ) { @@ -216,3 +216,3 @@ void ContactEditor::init() { } - + if ( *it == tr( "Groups" ) ) { @@ -221,3 +221,3 @@ void ContactEditor::init() { } - + if ( (*it).right( 6 ) == tr( "Street" ) ) { @@ -227,3 +227,3 @@ void ContactEditor::init() { } - + if ( (*it).right( 8 ) == tr( "Street 2" ) ) { @@ -233,3 +233,3 @@ void ContactEditor::init() { } - + if ( (*it).right( 8 ) == tr( "P.O. Box" ) ) { @@ -239,3 +239,3 @@ void ContactEditor::init() { } - + if ( (*it).right( 4 ) == tr( "City" ) ) { @@ -245,3 +245,3 @@ void ContactEditor::init() { } - + if ( (*it).right( 5 ) == tr( "State" ) ) { @@ -251,3 +251,3 @@ void ContactEditor::init() { } - + if ( (*it).right( 3 ) == tr( "Zip" ) ) { @@ -257,3 +257,3 @@ void ContactEditor::init() { } - + if ( (*it).right( 7 ) == tr( "Country" ) ) { @@ -264,3 +264,3 @@ void ContactEditor::init() { - slDynamicEntries->append( *it ); + slDynamicEntries.append( *it ); } @@ -269,6 +269,6 @@ void ContactEditor::init() { QVBoxLayout *vb = new QVBoxLayout( this ); - + tabMain = new QTabWidget( this ); vb->addWidget( tabMain ); - + QWidget *tabViewport = new QWidget ( tabMain ); @@ -348,3 +348,3 @@ void ContactEditor::init() { - gl = new QGridLayout( container, 6, 3, 2, 4 ); + gl = new QGridLayout( container, 8, 3, 2, 4 ); // row 7 QSpacerItem @@ -362,3 +362,3 @@ void ContactEditor::init() { gl->addWidget( l, 2, 0 ); - txtAddress2 = new QLineEdit( container ); + txtAddress2 = new QLineEdit( container ); gl->addMultiCellWidget( txtAddress2, 2, 2, 1, 2 ); @@ -609,2 +609,8 @@ void ContactEditor::init() { gl->addMultiCellWidget( txtChooserField4, 6, 6, 1, 2 ); + + QSpacerItem *space = new QSpacerItem(1,1, + QSizePolicy::Maximum, + QSizePolicy::MinimumExpanding ); + gl->addItem( space, 7, 0 ); + tabMain->insertTab( tabViewport, tr( "Address" ) ); @@ -625,4 +631,4 @@ void ContactEditor::init() { - QStringList::ConstIterator it = slDynamicEntries->begin(); - for (i = 0; it != slDynamicEntries->end(); i++, ++it) { + QStringList::ConstIterator it = slDynamicEntries.begin(); + for (i = 0; it != slDynamicEntries.end(); i++, ++it) { l = new QLabel( *it, container ); @@ -636,3 +642,3 @@ void ContactEditor::init() { l = new QLabel( tr("Gender"), container ); - gl->addWidget( l, slDynamicEntries->count(), 0 ); + gl->addWidget( l, slDynamicEntries.count(), 0 ); cmbGender = new QComboBox( container ); @@ -641,6 +647,6 @@ void ContactEditor::init() { cmbGender->insertItem( tr("Female"), 2); - gl->addWidget( cmbGender, slDynamicEntries->count(), 1 ); - + gl->addWidget( cmbGender, slDynamicEntries.count(), 1 ); + tabMain->insertTab( tabViewport, tr( "Details" ) ); - + dlgNote = new QDialog( this, "Note Dialog", TRUE ); @@ -654,3 +660,3 @@ void ContactEditor::init() { dlgName->setCaption( tr("Edit Name") ); - gl = new QGridLayout( dlgName, 4, 2, 2, 3 ); + gl = new QGridLayout( dlgName, 5, 2, 2, 3 ); @@ -675,7 +681,11 @@ void ContactEditor::init() { gl->addWidget( txtSuffix, 3, 1 ); + space = new QSpacerItem(1,1, + QSizePolicy::Maximum, + QSizePolicy::MinimumExpanding ); + gl->addItem( space, 4, 0 ); - cmbChooserField1->insertStringList( *slChooserNames ); - cmbChooserField2->insertStringList( *slChooserNames ); - cmbChooserField3->insertStringList( *slChooserNames ); - cmbChooserField4->insertStringList( *slChooserNames ); + cmbChooserField1->insertStringList( slChooserNames ); + cmbChooserField2->insertStringList( slChooserNames ); + cmbChooserField3->insertStringList( slChooserNames ); + cmbChooserField4->insertStringList( slChooserNames ); @@ -684,24 +694,40 @@ void ContactEditor::init() { cmbChooserField3->setCurrentItem( 2 ); - + connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) ); - + connect( txtFullName, SIGNAL(textChanged(const QString &)), this, SLOT(slotFullNameChange(const QString &)) ); - - connect( txtChooserField1, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser1Change(const QString &)) ); - connect( txtChooserField2, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser2Change(const QString &)) ); - connect( txtChooserField3, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser3Change(const QString &)) ); - connect( txtChooserField4, SIGNAL(textChanged(const QString &)), this, SLOT(slotChooser4Change(const QString &)) ); - connect( txtAddress, SIGNAL(textChanged(const QString &)), this, SLOT(slotAddressChange(const QString &)) ); - //connect( txtAddress2, SIGNAL(textChanged(const QString &)), this, SLOT(slotAddress2Change(const QString &)) ); - //connect( txtPOBox, SIGNAL(textChanged(const QString &)), this, SLOT(slotPOBoxChange(const QString &)) ); - connect( txtCity, SIGNAL(textChanged(const QString &)), this, SLOT(slotCityChange(const QString &)) ); - connect( txtState, SIGNAL(textChanged(const QString &)), this, SLOT(slotStateChange(const QString &)) ); - connect( txtZip, SIGNAL(textChanged(const QString &)), this, SLOT(slotZipChange(const QString &)) ); - connect( cmbCountry, SIGNAL(textChanged(const QString &)), this, SLOT(slotCountryChange(const QString &)) ); - connect( cmbCountry, SIGNAL(activated(const QString &)), this, SLOT(slotCountryChange(const QString &)) ); - connect( cmbChooserField1, SIGNAL(activated(int)), this, SLOT(slotCmbChooser1Change(int)) ); - connect( cmbChooserField2, SIGNAL(activated(int)), this, SLOT(slotCmbChooser2Change(int)) ); - connect( cmbChooserField3, SIGNAL(activated(int)), this, SLOT(slotCmbChooser3Change(int)) ); - connect( cmbChooserField4, SIGNAL(activated(int)), this, SLOT(slotCmbChooser4Change(int)) ); - connect( cmbAddress, SIGNAL(activated(int)), this, SLOT(slotAddressTypeChange(int)) ); + + connect( txtChooserField1, SIGNAL(textChanged(const QString &)), + this, SLOT(slotChooser1Change(const QString &)) ); + connect( txtChooserField2, SIGNAL(textChanged(const QString &)), + this, SLOT(slotChooser2Change(const QString &)) ); + connect( txtChooserField3, SIGNAL(textChanged(const QString &)), + this, SLOT(slotChooser3Change(const QString &)) ); + connect( txtChooserField4, SIGNAL(textChanged(const QString &)), + this, SLOT(slotChooser4Change(const QString &)) ); + connect( txtAddress, SIGNAL(textChanged(const QString &)), + this, SLOT(slotAddressChange(const QString &)) ); + //connect( txtAddress2, SIGNAL(textChanged(const QString &)), this, SLOT(slotAddress2Change(const QString &)) ); + //connect( txtPOBox, SIGNAL(textChanged(const QString &)), this, SLOT(slotPOBoxChange(const QString &)) ); + connect( txtCity, SIGNAL(textChanged(const QString &)), + this, SLOT(slotCityChange(const QString &)) ); + connect( txtState, SIGNAL(textChanged(const QString &)), + this, SLOT(slotStateChange(const QString &)) ); + connect( txtZip, SIGNAL(textChanged(const QString &)), + this, SLOT(slotZipChange(const QString &)) ); + connect( cmbCountry, SIGNAL(textChanged(const QString &)), + this, SLOT(slotCountryChange(const QString &)) ); + connect( cmbCountry, SIGNAL(activated(const QString &)), + this, SLOT(slotCountryChange(const QString &)) ); + connect( cmbChooserField1, SIGNAL(activated(int)), + this, SLOT(slotCmbChooser1Change(int)) ); + connect( cmbChooserField2, SIGNAL(activated(int)), + this, SLOT(slotCmbChooser2Change(int)) ); + connect( cmbChooserField3, SIGNAL(activated(int)), + this, SLOT(slotCmbChooser3Change(int)) ); + connect( cmbChooserField4, SIGNAL(activated(int)), + this, SLOT(slotCmbChooser4Change(int)) ); + connect( cmbAddress, SIGNAL(activated(int)), + this, SLOT(slotAddressTypeChange(int)) ); + new QPEDialogListener(this); @@ -741,3 +767,3 @@ void ContactEditor::slotChooser1Change( const QString &textChanged ) { - (*slChooserValues)[index] = textChanged; + slChooserValues[index] = textChanged; @@ -749,3 +775,3 @@ void ContactEditor::slotChooser2Change( const QString &textChanged ) { - (*slChooserValues)[index] = textChanged; + slChooserValues[index] = textChanged; @@ -757,3 +783,3 @@ void ContactEditor::slotChooser3Change( const QString &textChanged ) { - (*slChooserValues)[index] = textChanged; + slChooserValues[index] = textChanged; @@ -765,3 +791,3 @@ void ContactEditor::slotChooser4Change( const QString &textChanged ) { - (*slChooserValues)[index] = textChanged; + slChooserValues[index] = textChanged; @@ -772,5 +798,5 @@ void ContactEditor::slotAddressChange( const QString &textChanged ) { if ( cmbAddress->currentItem() == 0 ) { - (*slBusinessAddress)[0] = textChanged; + slBusinessAddress[0] = textChanged; } else { - (*slHomeAddress)[0] = textChanged; + slHomeAddress[0] = textChanged; } @@ -781,5 +807,5 @@ void ContactEditor::slotAddress2Change( const QString &textChanged ) { if ( cmbAddress->currentItem() == 0 ) { - (*slBusinessAddress)[1] = textChanged; + slBusinessAddress[1] = textChanged; } else { - (*slHomeAddress)[1] = textChanged; + slHomeAddress[1] = textChanged; } @@ -790,5 +816,5 @@ void ContactEditor::slotPOBoxChange( const QString &textChanged ) { if ( cmbAddress->currentItem() == 0 ) { - (*slBusinessAddress)[2] = textChanged; + slBusinessAddress[2] = textChanged; } else { - (*slHomeAddress)[2] = textChanged; + slHomeAddress[2] = textChanged; } @@ -799,5 +825,5 @@ void ContactEditor::slotCityChange( const QString &textChanged ) { if ( cmbAddress->currentItem() == 0 ) { - (*slBusinessAddress)[3] = textChanged; + slBusinessAddress[3] = textChanged; } else { - (*slHomeAddress)[3] = textChanged; + slHomeAddress[3] = textChanged; } @@ -807,7 +833,7 @@ void ContactEditor::slotStateChange( const QString &textChanged ) { - + if ( cmbAddress->currentItem() == 0 ) { - (*slBusinessAddress)[4] = textChanged; + slBusinessAddress[4] = textChanged; } else { - (*slHomeAddress)[4] = textChanged; + slHomeAddress[4] = textChanged; } @@ -818,5 +844,5 @@ void ContactEditor::slotZipChange( const QString &textChanged ) { if ( cmbAddress->currentItem() == 0 ) { - (*slBusinessAddress)[5] = textChanged; + slBusinessAddress[5] = textChanged; } else { - (*slHomeAddress)[5] = textChanged; + slHomeAddress[5] = textChanged; } @@ -827,5 +853,5 @@ void ContactEditor::slotCountryChange( const QString &textChanged ) { if ( cmbAddress->currentItem() == 0 ) { - (*slBusinessAddress)[6] = textChanged; + slBusinessAddress[6] = textChanged; } else { - (*slHomeAddress)[6] = textChanged; + slHomeAddress[6] = textChanged; } @@ -835,4 +861,4 @@ void ContactEditor::slotCmbChooser1Change( int index ) { - txtChooserField1->setText( (*slChooserValues)[index] ); - + txtChooserField1->setText( slChooserValues[index] ); + txtChooserField1->setFocus(); } @@ -841,4 +867,4 @@ void ContactEditor::slotCmbChooser2Change( int index ) { - txtChooserField2->setText( (*slChooserValues)[index] ); - + txtChooserField2->setText( slChooserValues[index] ); + txtChooserField2->setFocus(); } @@ -847,3 +873,4 @@ void ContactEditor::slotCmbChooser3Change( int index ) { - txtChooserField3->setText( (*slChooserValues)[index] ); + txtChooserField3->setText( slChooserValues[index] ); + txtChooserField3->setFocus(); @@ -853,3 +880,4 @@ void ContactEditor::slotCmbChooser4Change( int index ) { - txtChooserField4->setText( (*slChooserValues)[index] ); + txtChooserField4->setText( slChooserValues[index] ); + txtChooserField4->setFocus(); @@ -861,10 +889,10 @@ void ContactEditor::slotAddressTypeChange( int index ) { - txtAddress->setText( (*slBusinessAddress)[0] ); + txtAddress->setText( slBusinessAddress[0] ); //txtAddress2->setText( (*slBusinessAddress)[1] ); //txtPOBox->setText( (*slBusinessAddress)[2] ); - txtCity->setText( (*slBusinessAddress)[3] ); - txtState->setText( (*slBusinessAddress)[4] ); - txtZip->setText( (*slBusinessAddress)[5] ); + txtCity->setText( slBusinessAddress[3] ); + txtState->setText( slBusinessAddress[4] ); + txtZip->setText( slBusinessAddress[5] ); QLineEdit *txtTmp = cmbCountry->lineEdit(); - txtTmp->setText( (*slBusinessAddress)[6] ); + txtTmp->setText( slBusinessAddress[6] ); @@ -872,10 +900,10 @@ void ContactEditor::slotAddressTypeChange( int index ) { - txtAddress->setText( (*slHomeAddress)[0] ); + txtAddress->setText( slHomeAddress[0] ); //txtAddress2->setText( (*slHomeAddress)[1] ); //txtPOBox->setText( (*slHomeAddress)[2] ); - txtCity->setText( (*slHomeAddress)[3] ); - txtState->setText( (*slHomeAddress)[4] ); - txtZip->setText( (*slHomeAddress)[5] ); + txtCity->setText( slHomeAddress[3] ); + txtState->setText( slHomeAddress[4] ); + txtZip->setText( slHomeAddress[5] ); QLineEdit *txtTmp = cmbCountry->lineEdit(); - txtTmp->setText( (*slHomeAddress)[6] ); + txtTmp->setText( slHomeAddress[6] ); @@ -900,3 +928,3 @@ void ContactEditor::slotFullNameChange( const QString &textChanged ) { -} +} @@ -906,3 +934,3 @@ void ContactEditor::loadFields() { QListIterator<QLabel> lit( listName ); - for ( it = slDynamicEntries->begin(); *lit; ++lit, ++it) { + for ( it = slDynamicEntries.begin(); *lit; ++lit, ++it) { (*lit)->setText( *it ); @@ -961,5 +989,5 @@ bool ContactEditor::isEmpty() { QString t = txtFullName->text(); - if ( !t.isEmpty() && containsAlphaNum( t ) ) + if ( !t.isEmpty() && containsAlphaNum( t ) ) return false; - + t = cmbFileAs->currentText(); @@ -984,3 +1012,3 @@ QString ContactEditor::parseName( const QString fullName, int type ) { int spPos2; - + @@ -990,3 +1018,3 @@ QString ContactEditor::parseName( const QString fullName, int type ) { if ( commapos == -1 ) { - + switch (spCount) { @@ -1046,3 +1074,3 @@ QString ContactEditor::parseName( const QString fullName, int type ) { simplifiedName = simplifiedName.simplifyWhiteSpace(); - + switch (spCount) { @@ -1100,3 +1128,3 @@ QString ContactEditor::parseName( const QString fullName, int type ) { } - + switch (type) { @@ -1132,4 +1160,4 @@ void ContactEditor::cleanupFields() { - QStringList::Iterator it = slChooserValues->begin(); - for ( int i = 0; it != slChooserValues->end(); i++, ++it ) { + QStringList::Iterator it = slChooserValues.begin(); + for ( int i = 0; it != slChooserValues.end(); i++, ++it ) { (*it) = ""; @@ -1138,4 +1166,4 @@ void ContactEditor::cleanupFields() { for ( int i = 0; i < 7; i++ ) { - (*slHomeAddress)[i] = ""; - (*slBusinessAddress)[i] = ""; + slHomeAddress[i] = ""; + slBusinessAddress[i] = ""; } @@ -1144,3 +1172,3 @@ void ContactEditor::cleanupFields() { QListIterator<QLineEdit> itLE( listValue ); - for ( cit = slDynamicEntries->begin(); cit != slDynamicEntries->end(); ++cit, ++itLE) { + for ( cit = slDynamicEntries.begin(); cit != slDynamicEntries.end(); ++cit, ++itLE) { (*itLE)->setText( "" ); @@ -1176,3 +1204,3 @@ void ContactEditor::setEntry( const Contact &entry ) { - + ent = entry; @@ -1186,5 +1214,5 @@ void ContactEditor::setEntry( const Contact &entry ) { QString *tmpString = new QString; - *tmpString = ent.firstName() + " " + ent.middleName() + + *tmpString = ent.firstName() + " " + ent.middleName() + + " " + ent.lastName() + " " + ent.suffix(); - + txtFullName->setText( tmpString->simplifyWhiteSpace() ); @@ -1196,3 +1224,3 @@ void ContactEditor::setEntry( const Contact &entry ) { - if (hasCompany) + if (hasCompany) txtOrganization->setText( ent.company() ); @@ -1203,4 +1231,4 @@ void ContactEditor::setEntry( const Contact &entry ) { if (hasStreet) { - (*slHomeAddress)[0] = ent.homeStreet(); - (*slBusinessAddress)[0] = ent.businessStreet(); + slHomeAddress[0] = ent.homeStreet(); + slBusinessAddress[0] = ent.businessStreet(); } @@ -1218,4 +1246,4 @@ void ContactEditor::setEntry( const Contact &entry ) { if (hasCity) { - (*slHomeAddress)[3] = ent.homeCity(); - (*slBusinessAddress)[3] = ent.businessCity(); + slHomeAddress[3] = ent.homeCity(); + slBusinessAddress[3] = ent.businessCity(); } @@ -1223,4 +1251,4 @@ void ContactEditor::setEntry( const Contact &entry ) { if (hasState) { - (*slHomeAddress)[4] = ent.homeState(); - (*slBusinessAddress)[4] = ent.businessState(); + slHomeAddress[4] = ent.homeState(); + slBusinessAddress[4] = ent.businessState(); } @@ -1228,4 +1256,4 @@ void ContactEditor::setEntry( const Contact &entry ) { if (hasZip) { - (*slHomeAddress)[5] = ent.homeZip(); - (*slBusinessAddress)[5] = ent.businessZip(); + slHomeAddress[5] = ent.homeZip(); + slBusinessAddress[5] = ent.businessZip(); } @@ -1233,4 +1261,4 @@ void ContactEditor::setEntry( const Contact &entry ) { if (hasCountry) { - (*slHomeAddress)[6] = ent.homeCountry(); - (*slBusinessAddress)[6] = ent.businessCountry(); + slHomeAddress[6] = ent.homeCountry(); + slBusinessAddress[6] = ent.businessCountry(); } @@ -1239,3 +1267,3 @@ void ContactEditor::setEntry( const Contact &entry ) { QListIterator<QLineEdit> itLE( listValue ); - for ( it = slDynamicEntries->begin(); it != slDynamicEntries->end(); ++it, ++itLE) { + for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { if ( *it == "Department" ) @@ -1276,3 +1304,3 @@ void ContactEditor::setEntry( const Contact &entry ) { QStringList::Iterator itV; - for ( it = slChooserNames->begin(), itV = slChooserValues->begin(); it != slChooserNames->end(); ++it, ++itV ) { + for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { @@ -1348,3 +1376,3 @@ void ContactEditor::setEntry( const Contact &entry ) { } - + cmbCat->setCategories( ent.categories(), "Contacts", tr("Contacts") ); @@ -1371,3 +1399,3 @@ void ContactEditor::saveEntry() { txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) ); - + useFullName = FALSE; @@ -1375,3 +1403,3 @@ void ContactEditor::saveEntry() { - /*if ( ent.firstName() != txtFirstName->text() || + /*if ( ent.firstName() != txtFirstName->text() || ent.lastName != txtLastName->text() || @@ -1387,3 +1415,3 @@ void ContactEditor::saveEntry() { ent.setFileAs( cmbFileAs->currentText() ); - + ent.setCategories( cmbCat->currentCategories() ); @@ -1393,3 +1421,3 @@ void ContactEditor::saveEntry() { - if (hasCompany) + if (hasCompany) ent.setCompany( txtOrganization->text() ); @@ -1400,4 +1428,4 @@ void ContactEditor::saveEntry() { if (hasStreet) { - ent.setHomeStreet( (*slHomeAddress)[0] ); - ent.setBusinessStreet( (*slBusinessAddress)[0] ); + ent.setHomeStreet( slHomeAddress[0] ); + ent.setBusinessStreet( slBusinessAddress[0] ); } @@ -1415,4 +1443,4 @@ void ContactEditor::saveEntry() { if (hasCity) { - ent.setHomeCity( (*slHomeAddress)[3] ); - ent.setBusinessCity( (*slBusinessAddress)[3] ); + ent.setHomeCity( slHomeAddress[3] ); + ent.setBusinessCity( slBusinessAddress[3] ); } @@ -1420,4 +1448,4 @@ void ContactEditor::saveEntry() { if (hasState) { - ent.setHomeState( (*slHomeAddress)[4] ); - ent.setBusinessState( (*slBusinessAddress)[4] ); + ent.setHomeState( slHomeAddress[4] ); + ent.setBusinessState( slBusinessAddress[4] ); } @@ -1425,9 +1453,9 @@ void ContactEditor::saveEntry() { if (hasZip) { - ent.setHomeZip( (*slHomeAddress)[5] ); - ent.setBusinessZip( (*slBusinessAddress)[5] ); + ent.setHomeZip( slHomeAddress[5] ); + ent.setBusinessZip( slBusinessAddress[5] ); } - + if (hasCountry) { - ent.setHomeCountry( (*slHomeAddress)[6] ); - ent.setBusinessCountry( (*slBusinessAddress)[6] ); + ent.setHomeCountry( slHomeAddress[6] ); + ent.setBusinessCountry( slBusinessAddress[6] ); } @@ -1436,3 +1464,3 @@ void ContactEditor::saveEntry() { QListIterator<QLineEdit> itLE( listValue ); - for ( it = slDynamicEntries->begin(); it != slDynamicEntries->end(); ++it, ++itLE) { + for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { if ( *it == "Department" ) @@ -1473,3 +1501,3 @@ void ContactEditor::saveEntry() { QStringList::ConstIterator itV; - for ( it = slChooserNames->begin(), itV = slChooserValues->begin(); it != slChooserNames->end(); ++it, ++itV ) { + for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { @@ -1550,3 +1578,3 @@ void ContactEditor::saveEntry() { } - + int gender = cmbGender->currentItem(); diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h index a58a860..4f3b56e 100644 --- a/core/pim/addressbook/contacteditor.h +++ b/core/pim/addressbook/contacteditor.h @@ -52,3 +52,3 @@ class ContactEditor : public QDialog { Q_OBJECT - + public: @@ -80,3 +80,3 @@ class ContactEditor : public QDialog { QString parseName( QString fullName, int type ); - + private slots: @@ -111,9 +111,9 @@ class ContactEditor : public QDialog { const QValueList<int> *orderedValues; - QStringList *slOrdered; - QStringList *slDynamicEntries; + QStringList slOrdered; + QStringList slDynamicEntries; - QStringList *slHomeAddress; - QStringList *slBusinessAddress; - QStringList *slChooserNames; - QStringList *slChooserValues; + QStringList slHomeAddress; + QStringList slBusinessAddress; + QStringList slChooserNames; + QStringList slChooserValues; @@ -145,3 +145,3 @@ class ContactEditor : public QDialog { CategorySelect *cmbCat; - + QScrollView *svAddress; |