summaryrefslogtreecommitdiffabout
path: root/kaddressbook/phoneeditwidget.h
Unidiff
Diffstat (limited to 'kaddressbook/phoneeditwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/phoneeditwidget.h18
1 files changed, 9 insertions, 9 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
67 67
68 private slots: 68 private slots:
69 void addNumber(); 69 void deleteEdit( PhoneTypeNumberEdit* ew );
70 void addNumber();
71 void pendingDelete();
70 protected: 72 protected:
71 73
72 private: 74 private:
75 PhoneTypeNumberEdit* mPendingDelete;
73 void setDefaults(); 76 void setDefaults();
74 PhoneTypeNumberEdit* appendEditCombo(); 77 PhoneTypeNumberEdit* appendEditCombo();
@@ -213,7 +216,8 @@ public:
213 this, SLOT ( textChanged ( const QString & ) ) ); 216 this, SLOT ( textChanged ( const QString & ) ) );
214 mCombo->insertStringList( PhoneNumber::supportedTypeListNames() ); 217 mCombo->insertStringList( PhoneNumber::supportedTypeListNames() );
215 mIsValid = true;
216 } 218 }
217 219 ~PhoneTypeNumberEdit() {
220 // qDebug("~PhoneTypeNumberEdit() ");
221 }
218 void setPhoneNumber( const KABC::PhoneNumber &phoneNumber ) 222 void setPhoneNumber( const KABC::PhoneNumber &phoneNumber )
219 { 223 {
@@ -222,5 +226,4 @@ public:
222 mCombo->setCurrentItem( index ); 226 mCombo->setCurrentItem( index );
223 mNumber->setText( mPhoneNumber.number() ); 227 mNumber->setText( mPhoneNumber.number() );
224 mIsValid = true;
225 show(); 228 show();
226 229
@@ -235,5 +238,4 @@ public:
235 bool isValid() 238 bool isValid()
236 { 239 {
237 if ( !mIsValid ) return false;
238 if ( mNumber->text().isEmpty() )return false; 240 if ( mNumber->text().isEmpty() )return false;
239 return true; 241 return true;
@@ -250,7 +252,5 @@ public:
250 void deleteNumber() 252 void deleteNumber()
251 { 253 {
252 emit modified(); 254 emit deleteMe( this );
253 hide();
254 mIsValid = false;
255 } 255 }
256 void comboTypeChange( int index ) 256 void comboTypeChange( int index )
@@ -276,7 +276,7 @@ public:
276void typeChange( int oldType, int newType ); 276void typeChange( int oldType, int newType );
277 void modified(); 277 void modified();
278 void deleteMe( PhoneTypeNumberEdit* );
278 279
279private: 280private:
280 bool mIsValid;
281 KABC::PhoneNumber mPhoneNumber; 281 KABC::PhoneNumber mPhoneNumber;
282 QPushButton* mMinusButton; 282 QPushButton* mMinusButton;