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 @@ -67,8 +67,11 @@ class PhoneEditWidget : public QScrollView private slots: + void deleteEdit( PhoneTypeNumberEdit* ew ); void addNumber(); + void pendingDelete(); protected: private: + PhoneTypeNumberEdit* mPendingDelete; void setDefaults(); PhoneTypeNumberEdit* appendEditCombo(); @@ -213,7 +216,8 @@ public: this, SLOT ( textChanged ( const QString & ) ) ); mCombo->insertStringList( PhoneNumber::supportedTypeListNames() ); - mIsValid = true; } - + ~PhoneTypeNumberEdit() { + // qDebug("~PhoneTypeNumberEdit() "); + } void setPhoneNumber( const KABC::PhoneNumber &phoneNumber ) { @@ -222,5 +226,4 @@ public: mCombo->setCurrentItem( index ); mNumber->setText( mPhoneNumber.number() ); - mIsValid = true; show(); @@ -235,5 +238,4 @@ public: bool isValid() { - if ( !mIsValid ) return false; if ( mNumber->text().isEmpty() )return false; return true; @@ -250,7 +252,5 @@ public: void deleteNumber() { - emit modified(); - hide(); - mIsValid = false; + emit deleteMe( this ); } void comboTypeChange( int index ) @@ -276,7 +276,7 @@ public: void typeChange( int oldType, int newType ); void modified(); + void deleteMe( PhoneTypeNumberEdit* ); private: - bool mIsValid; KABC::PhoneNumber mPhoneNumber; QPushButton* mMinusButton; |