author | tille <tille> | 2002-12-18 13:01:15 (UTC) |
---|---|---|
committer | tille <tille> | 2002-12-18 13:01:15 (UTC) |
commit | 9471f69c44e811781ed9f643f5b84d7b459df601 (patch) (side-by-side diff) | |
tree | f8daf275c36b9a068cbec9ff487a195e639ff8bf | |
parent | 930884a92b064766ed436111778fc55f157c6e1c (diff) | |
download | opie-9471f69c44e811781ed9f643f5b84d7b459df601.zip opie-9471f69c44e811781ed9f643f5b84d7b459df601.tar.gz opie-9471f69c44e811781ed9f643f5b84d7b459df601.tar.bz2 |
changing from defaultemail to something else now hides the combo
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 17 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.h | 3 |
2 files changed, 13 insertions, 7 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index f125edb..cc3908a 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -71,6 +71,6 @@ ContactEditor::ContactEditor( const OContact &entry, init(); setEntry( entry ); - cmbDefaultEmail = 0; + defaultEmailChooserPosition = -1; } @@ -632,6 +632,7 @@ void ContactEditor::defaultEmailChanged(int i){ } -void ContactEditor::chooserChange( const QString &textChanged, int index, QLineEdit *inputWid ) { +void ContactEditor::chooserChange( const QString &textChanged, int index, QLineEdit *inputWid, int widgetPos ) { + qDebug("defaultEmailChooserPosition %i, widgetPos %i ",defaultEmailChooserPosition,widgetPos); if (slChooserNames[index] == "Default Email"){ if (cmbDefaultEmail) delete cmbDefaultEmail; @@ -647,4 +648,8 @@ void ContactEditor::chooserChange( const QString &textChanged, int index, QLineE cmbDefaultEmail->show(); + defaultEmailChooserPosition = widgetPos; + }else if (defaultEmailChooserPosition == widgetPos){ + qDebug("cmbDefaultEmail->hide()"); + if (cmbDefaultEmail) cmbDefaultEmail->hide(); } @@ -655,18 +660,18 @@ void ContactEditor::chooserChange( const QString &textChanged, int index, QLineE void ContactEditor::slotChooser1Change( const QString &textChanged ) { - chooserChange( textChanged, cmbChooserField1->currentItem(), txtChooserField1); + chooserChange( textChanged, cmbChooserField1->currentItem(), txtChooserField1, 1); } void ContactEditor::slotChooser2Change( const QString &textChanged ) { - chooserChange( textChanged, cmbChooserField2->currentItem(), txtChooserField2); + chooserChange( textChanged, cmbChooserField2->currentItem(), txtChooserField2, 2); } void ContactEditor::slotChooser3Change( const QString &textChanged ) { - chooserChange( textChanged, cmbChooserField3->currentItem(), txtChooserField3); + chooserChange( textChanged, cmbChooserField3->currentItem(), txtChooserField3, 3); } void ContactEditor::slotChooser4Change( const QString &textChanged ) { - chooserChange( textChanged, cmbChooserField4->currentItem(), txtChooserField4); + chooserChange( textChanged, cmbChooserField4->currentItem(), txtChooserField4, 4); } diff --git a/core/pim/addressbook/contacteditor.h b/core/pim/addressbook/contacteditor.h index d4b7f27..63257f8 100644 --- a/core/pim/addressbook/contacteditor.h +++ b/core/pim/addressbook/contacteditor.h @@ -104,5 +104,6 @@ class ContactEditor : public QDialog { private: - void chooserChange( const QString&, int , QLineEdit* ); + int defaultEmailChooserPosition; + void chooserChange( const QString&, int , QLineEdit*, int ); bool useFullName; |