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 /kaddressbook/phoneeditwidget.cpp | |
parent | 85d2ea5c17a2b2c7a4ae4dd954bc635a56239b57 (diff) | |
download | kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.zip kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.tar.gz kdepimpi-7a90e619147e06e5f4d4facef98364f78a4a04ef.tar.bz2 |
fixx
Diffstat (limited to 'kaddressbook/phoneeditwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/phoneeditwidget.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index 7e2aec1..5639aa2 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -38,73 +38,75 @@ #include <kbuttonbox.h> #include <klistview.h> #include <kapplication.h> #include <qapplication.h> #include <kconfig.h> #include <klineedit.h> #include <kcombobox.h> #include <klocale.h> #include <kdebug.h> #include <kglobal.h> #include <kiconloader.h> #include <kabc/phonenumber.h> #include "typecombo.h" #include "phoneeditwidget.h" PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) : QWidget(parent,name) { QGridLayout* gridLayout = new QGridLayout ( this, 2,2 ); QLabel *temp = new QLabel( "", this ); temp->setAlignment( Qt::AlignCenter ); temp->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); QPushButton *addBut = new QPushButton ( "add", this ); addBut->setPixmap ( SmallIcon("plus")); addBut->setMaximumSize( addBut->sizeHint().height(),addBut->sizeHint().height() ); connect(addBut,SIGNAL(clicked ()),SLOT(addNumber())); 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() ); sv->addChild(mw); sv->setResizePolicy( QScrollView::AutoOneFit ); mainLayout = new QVBoxLayout ( mw ); mainLayout->setMargin( 0 ); mainLayout->setSpacing( 0 ); + gridLayout->setMargin( 2 ); + gridLayout->setSpacing( 4 ); if ( QApplication::desktop()->width() == 240 || QApplication::desktop()->width() == 480 ) { gridLayout->addWidget( addBut, 0, 0 ); gridLayout->addWidget( temp, 0, 1 ); gridLayout->addMultiCellWidget( sv, 1,1 , 0,1 ); } else { gridLayout->addWidget( temp, 1, 0 ); gridLayout->addWidget( addBut, 0, 0 ); gridLayout->addMultiCellWidget( sv, 0, 1, 1,1 ); } setDefaults(); mTypeNumberEditList.setAutoDelete( true ); mPopup = new QPopupMenu( this ); QStringList list = PhoneNumber::supportedTypeListNames(); mPopupCount = list.count(); int i = 0; while ( i < mPopupCount ) { mPopup->insertItem( list[ i ], i ); ++i; } connect(mPopup,SIGNAL(activated(int)),this,SLOT(addNumberInt( int))); } PhoneEditWidget::~PhoneEditWidget() { } void PhoneEditWidget::setDefaults() { mTypeNumberEditList.clear(); PhoneTypeNumberEdit* edit = appendEditCombo(); KABC::PhoneNumber phoneNumber; phoneNumber.setType( KABC::PhoneNumber::Home | KABC::PhoneNumber::Pref ); |