summaryrefslogtreecommitdiffabout
path: root/kaddressbook/phoneeditwidget.h
authorzautrix <zautrix>2005-10-28 12:10:35 (UTC)
committer zautrix <zautrix>2005-10-28 12:10:35 (UTC)
commitcee83f70d8e4a6945f4456c55ab1b280d3425f0f (patch) (side-by-side diff)
tree1b317655a344f1a3640ef2561d61075e0feddd64 /kaddressbook/phoneeditwidget.h
parentb27cb619bb9005ad4345d38bbee3b1c3d0eda1b2 (diff)
downloadkdepimpi-cee83f70d8e4a6945f4456c55ab1b280d3425f0f.zip
kdepimpi-cee83f70d8e4a6945f4456c55ab1b280d3425f0f.tar.gz
kdepimpi-cee83f70d8e4a6945f4456c55ab1b280d3425f0f.tar.bz2
commit
Diffstat (limited to 'kaddressbook/phoneeditwidget.h') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/phoneeditwidget.h16
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
@@ -66,10 +66,13 @@ class PhoneEditWidget : public QScrollView
void typeChange( int oldType, int newType );
private slots:
+ void deleteEdit( PhoneTypeNumberEdit* ew );
void addNumber();
+ void pendingDelete();
protected:
private:
+ PhoneTypeNumberEdit* mPendingDelete;
void setDefaults();
PhoneTypeNumberEdit* appendEditCombo();
QWidget* mw;
@@ -212,16 +215,16 @@ public:
connect( mNumber , SIGNAL ( textChanged ( const QString & ) ),
this, SLOT ( textChanged ( const QString & ) ) );
mCombo->insertStringList( PhoneNumber::supportedTypeListNames() );
- mIsValid = true;
}
-
+ ~PhoneTypeNumberEdit() {
+ // qDebug("~PhoneTypeNumberEdit() ");
+ }
void setPhoneNumber( const KABC::PhoneNumber &phoneNumber )
{
mPhoneNumber = phoneNumber;
int index = PhoneNumber::typeListIndex4Type( mPhoneNumber.type() );
mCombo->setCurrentItem( index );
mNumber->setText( mPhoneNumber.number() );
- mIsValid = true;
show();
}
@@ -234,7 +237,6 @@ public:
}
bool isValid()
{
- if ( !mIsValid ) return false;
if ( mNumber->text().isEmpty() )return false;
return true;
}
@@ -249,9 +251,7 @@ public:
}
void deleteNumber()
{
- emit modified();
- hide();
- mIsValid = false;
+ emit deleteMe( this );
}
void comboTypeChange( int index )
{
@@ -275,9 +275,9 @@ public:
signals:
void typeChange( int oldType, int newType );
void modified();
+ void deleteMe( PhoneTypeNumberEdit* );
private:
- bool mIsValid;
KABC::PhoneNumber mPhoneNumber;
QPushButton* mMinusButton;
KComboBox *mCombo;