summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.cpp34
1 files changed, 1 insertions, 33 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 6d92ac3..0e752ca 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -500,178 +500,146 @@ o cfg2.setGroup( "XMLFields" );
strCfg2 = cfg2.readEntry( "XMLField" + QString::number(i++),
QString::null );
}
*/
}
void ContactEditor::slotChooser1Change( const QString &textChanged ) {
int index = cmbChooserField1->currentItem();
(*slChooserValues)[index] = textChanged;
}
void ContactEditor::slotChooser2Change( const QString &textChanged ) {
int index = cmbChooserField2->currentItem();
(*slChooserValues)[index] = textChanged;
}
void ContactEditor::slotChooser3Change( const QString &textChanged ) {
int index = cmbChooserField3->currentItem();
(*slChooserValues)[index] = textChanged;
}
void ContactEditor::slotAddressChange( const QString &textChanged ) {
- qDebug((*slBusinessAddress)[0]);
- qDebug((*slHomeAddress)[0]);
- qDebug(textChanged);
if ( cmbAddress->currentItem() == 0 ) {
(*slBusinessAddress)[0] = textChanged;
} else {
(*slHomeAddress)[0] = textChanged;
}
}
void ContactEditor::slotAddress2Change( const QString &textChanged ) {
- qDebug((*slBusinessAddress)[1]);
- qDebug((*slHomeAddress)[1]);
- qDebug(textChanged);
-
if ( cmbAddress->currentItem() == 0 ) {
(*slBusinessAddress)[1] = textChanged;
} else {
(*slHomeAddress)[1] = textChanged;
}
}
void ContactEditor::slotPOBoxChange( const QString &textChanged ) {
- qDebug((*slBusinessAddress)[2]);
- qDebug((*slHomeAddress)[2]);
- qDebug(textChanged);
if ( cmbAddress->currentItem() == 0 ) {
(*slBusinessAddress)[2] = textChanged;
} else {
(*slHomeAddress)[2] = textChanged;
}
}
void ContactEditor::slotCityChange( const QString &textChanged ) {
- qDebug((*slBusinessAddress)[3]);
- qDebug((*slHomeAddress)[3]);
- qDebug(textChanged);
if ( cmbAddress->currentItem() == 0 ) {
(*slBusinessAddress)[3] = textChanged;
} else {
(*slHomeAddress)[3] = textChanged;
}
}
void ContactEditor::slotStateChange( const QString &textChanged ) {
- qDebug((*slBusinessAddress)[4]);
- qDebug((*slHomeAddress)[4]);
- qDebug(textChanged);
if ( cmbAddress->currentItem() == 0 ) {
(*slBusinessAddress)[4] = textChanged;
} else {
(*slHomeAddress)[4] = textChanged;
}
}
void ContactEditor::slotZipChange( const QString &textChanged ) {
- qDebug((*slBusinessAddress)[5]);
- qDebug((*slHomeAddress)[5]);
- qDebug(textChanged);
if ( cmbAddress->currentItem() == 0 ) {
(*slBusinessAddress)[5] = textChanged;
} else {
(*slHomeAddress)[5] = textChanged;
}
}
void ContactEditor::slotCountryChange( const QString &textChanged ) {
- qDebug((*slBusinessAddress)[6]);
- qDebug((*slHomeAddress)[6]);
- qDebug(textChanged);
if ( cmbAddress->currentItem() == 0 ) {
(*slBusinessAddress)[6] = textChanged;
} else {
(*slHomeAddress)[6] = textChanged;
}
}
void ContactEditor::slotCmbChooser1Change( int index ) {
txtChooserField1->setText( (*slChooserValues)[index] );
}
void ContactEditor::slotCmbChooser2Change( int index ) {
txtChooserField2->setText( (*slChooserValues)[index] );
}
void ContactEditor::slotCmbChooser3Change( int index ) {
txtChooserField3->setText( (*slChooserValues)[index] );
}
void ContactEditor::slotAddressTypeChange( int index ) {
- qDebug((*slBusinessAddress)[0]);
- qDebug((*slBusinessAddress)[1]);
- qDebug((*slBusinessAddress)[2]);
-qDebug((*slBusinessAddress)[3]);
-qDebug((*slBusinessAddress)[4]);
-qDebug((*slBusinessAddress)[5]);
-qDebug((*slBusinessAddress)[6]);
-
-
-
if ( index == 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] );
QLineEdit *txtTmp = cmbCountry->lineEdit();
txtTmp->setText( (*slBusinessAddress)[6] );
} else {
txtAddress->setText( (*slHomeAddress)[0] );
//txtAddress2->setText( (*slHomeAddress)[1] );
//txtPOBox->setText( (*slHomeAddress)[2] );
txtCity->setText( (*slHomeAddress)[3] );
txtState->setText( (*slHomeAddress)[4] );
txtZip->setText( (*slHomeAddress)[5] );
QLineEdit *txtTmp = cmbCountry->lineEdit();
txtTmp->setText( (*slHomeAddress)[6] );
}
}
void ContactEditor::slotFullNameChange( const QString &textChanged ) {
int index = cmbFileAs->currentItem();
cmbFileAs->clear();
@@ -973,65 +941,65 @@ void ContactEditor::setEntry( const Contact &entry ) {
+ " " + ent.lastName() + " " + ent.suffix();
txtFullName->setText( tmpString->simplifyWhiteSpace() );
cmbFileAs->setEditText( ent.fileAs() );
if (hasTitle)
txtJobTitle->setText( ent.jobTitle() );
if (hasCompany)
txtOrganization->setText( ent.company() );
if (hasNotes)
txtNote->setText( ent.notes() );
if (hasStreet) {
(*slHomeAddress)[0] = ent.homeStreet();
(*slBusinessAddress)[0] = ent.businessStreet();
}
/*
if (hasStreet2) {
(*slHomeAddress)[1] = ent.homeStreet2();
(*slBusinessAddress)[1] = ent.businessStreet2();
}
if (hasPOBox) {
(*slHomeAddress)[2] = ent.homePOBox();
(*slBusinessAddress)[2] = ent.businessPOBox();
}
*/
if (hasCity) {
(*slHomeAddress)[3] = ent.homeCity();
- (*slBusinessAddress)[3] = ent.homeCity();
+ (*slBusinessAddress)[3] = ent.businessCity();
}
if (hasState) {
(*slHomeAddress)[4] = ent.homeState();
(*slBusinessAddress)[4] = ent.businessState();
}
if (hasZip) {
(*slHomeAddress)[5] = ent.homeZip();
(*slBusinessAddress)[5] = ent.businessZip();
}
if (hasCountry) {
(*slHomeAddress)[6] = ent.homeCountry();
(*slBusinessAddress)[6] = ent.businessCountry();
}
QStringList::ConstIterator it;
QListIterator<QLineEdit> itLE( listValue );
for ( it = slDynamicEntries->begin(); it != slDynamicEntries->end(); ++it, ++itLE) {
if ( *it == "Department" )
(*itLE)->setText( ent.department() );
if ( *it == "Company" )
(*itLE)->setText( ent.company() );
if ( *it == "Office" )
(*itLE)->setText( ent.office() );
if ( *it == "Profession" )
(*itLE)->setText( ent.profession() );