author | zautrix <zautrix> | 2005-10-28 23:31:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-28 23:31:46 (UTC) |
commit | 7a90e619147e06e5f4d4facef98364f78a4a04ef (patch) (side-by-side diff) | |
tree | f1b11d0ca9c123d42f9b632bae1cc6608ee5e740 | |
parent | 85d2ea5c17a2b2c7a4ae4dd954bc635a56239b57 (diff) | |
download | kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.zip kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.tar.gz kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.tar.bz2 |
fixx
-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 21 | ||||
-rw-r--r-- | kaddressbook/phoneeditwidget.cpp | 8 | ||||
-rw-r--r-- | kaddressbook/phoneeditwidget.h | 112 |
3 files changed, 18 insertions, 123 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 966efa5..c4083a9 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp @@ -162,3 +162,3 @@ void AddresseeEditorWidget::setupTab1() } - QGridLayout *layout = new QGridLayout( tab1, 8-maxCol, maxCol ); + QGridLayout *layout = new QGridLayout( tab1, 7-maxCol, maxCol ); @@ -204,5 +204,10 @@ void AddresseeEditorWidget::setupTab1() //label->setBuddy( mRoleEdit ); - layout->addWidget( button, 1, 0 ); - layout->addWidget( mRoleEdit, 1, 1 ); - + if ( horLayout ) { + layout->addWidget( button, 0, 2 ); + layout->addWidget( mRoleEdit, 0, 3 ); + + } else { + layout->addWidget( button, 1, 0 ); + layout->addWidget( mRoleEdit, 1, 1 ); + } // Organization @@ -228,4 +233,4 @@ void AddresseeEditorWidget::setupTab1() if ( horLayout ) { - layout->addWidget( label, 0,2 ); - layout->addWidget( mFormattedNameLabel, 0, 3 ); + layout->addWidget( label, 1,0 ); + layout->addWidget( mFormattedNameLabel, 1, 1 ); } else { @@ -260,4 +265,4 @@ void AddresseeEditorWidget::setupTab1() #endif - layout->addMultiCellWidget( mPhoneEditWidget, 4, iii, 0, maxCol ); - ++iii; + layout->addMultiCellWidget( mPhoneEditWidget, 5-maxCol, 5-maxCol+4, 0, maxCol ); + iii = 6-maxCol+4; /* LR diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index 7e2aec1..5639aa2 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -69,5 +69,5 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) sv = new QScrollView( this ); - sv->setFrameStyle ( QFrame::Panel | QFrame::Plain ); - sv->setLineWidth ( 1 ); - sv->setMidLineWidth ( 1 ); + sv->setFrameStyle ( QFrame::Plain ); + sv->setLineWidth ( 0 ); + sv->setMidLineWidth ( 0 ); mw = new QWidget ( sv->viewport() ); @@ -78,2 +78,4 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) mainLayout->setSpacing( 0 ); + gridLayout->setMargin( 2 ); + gridLayout->setSpacing( 4 ); if ( QApplication::desktop()->width() == 240 || QApplication::desktop()->width() == 480 ) { diff --git a/kaddressbook/phoneeditwidget.h b/kaddressbook/phoneeditwidget.h index 0477b6c..fbf9fe7 100644 --- a/kaddressbook/phoneeditwidget.h +++ b/kaddressbook/phoneeditwidget.h @@ -87,3 +87,2 @@ class PhoneEditWidget : public QWidget - KABC::PhoneNumber::List mPhoneList; }; @@ -91,113 +90,2 @@ class PhoneEditWidget : public QWidget - - - -#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 |