summaryrefslogtreecommitdiffabout
path: root/kaddressbook/phoneeditwidget.h
authorzautrix <zautrix>2005-10-28 23:31:46 (UTC)
committer zautrix <zautrix>2005-10-28 23:31:46 (UTC)
commit7a90e619147e06e5f4d4facef98364f78a4a04ef (patch) (side-by-side diff)
treef1b11d0ca9c123d42f9b632bae1cc6608ee5e740 /kaddressbook/phoneeditwidget.h
parent85d2ea5c17a2b2c7a4ae4dd954bc635a56239b57 (diff)
downloadkdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.zip
kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.tar.gz
kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.tar.bz2
fixx
Diffstat (limited to 'kaddressbook/phoneeditwidget.h') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/phoneeditwidget.h112
1 files changed, 0 insertions, 112 deletions
diff --git a/kaddressbook/phoneeditwidget.h b/kaddressbook/phoneeditwidget.h
index 0477b6c..fbf9fe7 100644
--- a/kaddressbook/phoneeditwidget.h
+++ b/kaddressbook/phoneeditwidget.h
@@ -64,163 +64,51 @@ class PhoneEditWidget : public QWidget
signals:
void modified();
void typeChange( int oldType, int newType );
private slots:
void bottomVisible();
void addNumberInt( int );
void deleteEdit( PhoneTypeNumberEdit* ew );
void addNumber();
void pendingDelete();
protected:
private:
QScrollView* sv;
QPopupMenu *mPopup;
int mPopupCount;
PhoneTypeNumberEdit* mPendingDelete;
void setDefaults();
PhoneTypeNumberEdit* appendEditCombo();
QWidget* mw;
QVBoxLayout* mainLayout;
QPtrList <PhoneTypeNumberEdit> mTypeNumberEditList;
- KABC::PhoneNumber::List mPhoneList;
};
-
-
-
-#if 0
-class PhoneEditWidget : public QWidget
-{
- Q___OBJECT
-
- public:
- PhoneEditWidget( QWidget *parent, const char *name = 0 );
- ~PhoneEditWidget();
-
- void setPhoneNumbers( const KABC::PhoneNumber::List &list );
- KABC::PhoneNumber::List phoneNumbers();
-
- void updateTypeCombo( const KABC::PhoneNumber::List&, KComboBox* );
- KABC::PhoneNumber currentPhoneNumber( KComboBox*, int );
-
- sig_nals:
- void modified();
- void typeChange( int oldType, int newType );
-
- private sl_ots:
- void edit();
-
- void updatePrefEdit();
- void updateSecondEdit();
- void updateThirdEdit();
- void updateFourthEdit();
-
- void slotPrefEditChanged();
- void slotSecondEditChanged();
- void slotThirdEditChanged();
- void slotFourthEditChanged();
-
- protected:
- void updateLineEdits();
- void updateCombos();
-
- private:
- QPtrList <PhoneTypeNumberEdit> mTypeNumberEditList;
- void updateEdit( PhoneTypeCombo *combo );
- void updatePhoneNumber( PhoneTypeCombo *combo );
- void updateOtherEdit( PhoneTypeCombo *combo, PhoneTypeCombo *otherCombo );
-
- PhoneTypeCombo *mPrefCombo;
- PhoneTypeCombo *mSecondCombo;
- PhoneTypeCombo *mThirdCombo;
- PhoneTypeCombo *mFourthCombo;
-
- KLineEdit *mPrefEdit;
- KLineEdit *mSecondEdit;
- KLineEdit *mThirdEdit;
- KLineEdit *mFourthEdit;
-
- KABC::PhoneNumber::List mPhoneList;
-};
-
-/**
- Dialog for editing lists of phonenumbers.
-*/
-class PhoneEditDialog : public KDialogBase
-{
- Q___OBJECT
-
- public:
- PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *parent, const char *name = 0 );
- ~PhoneEditDialog();
-
- const KABC::PhoneNumber::List &phoneNumbers();
- bool changed() const;
-
- protected s__lots:
- void slotAddPhoneNumber();
- void slotRemovePhoneNumber();
- void slotEditPhoneNumber();
- void slotSelectionChanged();
-
- private:
- KABC::PhoneNumber::List mPhoneNumberList;
- KABC::PhoneNumber::TypeList mTypeList;
- KComboBox *mTypeBox;
- KListView *mListView;
-
- QPushButton *mRemoveButton;
- QPushButton *mEditButton;
-
- bool mChanged;
-};
-
-/**
- Dialog for editing phone number types.
-*/
-class PhoneTypeDialog : public KDialogBase
-{
- Q___OBJECT
-public:
- PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber, QWidget *parent, const char *name = 0 );
-
- KABC::PhoneNumber phoneNumber();
-
-private:
- KABC::PhoneNumber mPhoneNumber;
- KABC::PhoneNumber::TypeList mTypeList;
-
- QButtonGroup *mGroup;
- QCheckBox *mPreferredBox;
- KLineEdit *mNumber;
-};
-#endif
-
class PhoneTypeNumberEdit : public QWidget
{
Q_OBJECT
public:
PhoneTypeNumberEdit( QWidget *parent, const char *name = 0 ) :QWidget( parent )
{
QHBoxLayout * lay = new QHBoxLayout( this );
lay->setSpacing( 2 );
lay->setMargin( 0 );
mMinusButton = new QPushButton ( this );
mMinusButton->setPixmap ( SmallIcon("minus"));
mCombo = new KComboBox( this );
mNumber = new KLineEdit( this );
mMinusButton->setMaximumHeight( mNumber->sizeHint().height() + 6);
lay->addWidget( mMinusButton );
lay->addWidget( mCombo );
lay->addWidget( mNumber );
connect( mMinusButton , SIGNAL ( clicked() ), this, SLOT ( deleteNumber() ) );
connect( mCombo , SIGNAL ( activated ( int ) ), this, SLOT ( comboTypeChange( int ) ) );
connect( mNumber , SIGNAL ( textChanged ( const QString & ) ),
this, SLOT ( textChanged ( const QString & ) ) );
mCombo->insertStringList( PhoneNumber::supportedTypeListNames() );
}
~PhoneTypeNumberEdit() {