Diffstat (limited to 'kaddressbook/phoneeditwidget.h') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/phoneeditwidget.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kaddressbook/phoneeditwidget.h b/kaddressbook/phoneeditwidget.h index 6a514ed..c730c7b 100644 --- a/kaddressbook/phoneeditwidget.h +++ b/kaddressbook/phoneeditwidget.h @@ -68,3 +68,5 @@ class PhoneEditWidget : public QScrollView private slots: + void deleteEdit( PhoneTypeNumberEdit* ew ); void addNumber(); + void pendingDelete(); protected: @@ -72,2 +74,3 @@ class PhoneEditWidget : public QScrollView private: + PhoneTypeNumberEdit* mPendingDelete; void setDefaults(); @@ -214,5 +217,6 @@ public: mCombo->insertStringList( PhoneNumber::supportedTypeListNames() ); - mIsValid = true; } - + ~PhoneTypeNumberEdit() { + // qDebug("~PhoneTypeNumberEdit() "); + } void setPhoneNumber( const KABC::PhoneNumber &phoneNumber ) @@ -223,3 +227,2 @@ public: mNumber->setText( mPhoneNumber.number() ); - mIsValid = true; show(); @@ -236,3 +239,2 @@ public: { - if ( !mIsValid ) return false; if ( mNumber->text().isEmpty() )return false; @@ -251,5 +253,3 @@ public: { - emit modified(); - hide(); - mIsValid = false; + emit deleteMe( this ); } @@ -277,5 +277,5 @@ void typeChange( int oldType, int newType ); void modified(); + void deleteMe( PhoneTypeNumberEdit* ); private: - bool mIsValid; KABC::PhoneNumber mPhoneNumber; |