summaryrefslogtreecommitdiffabout
path: root/kaddressbook/phoneeditwidget.cpp
authorzautrix <zautrix>2005-10-28 17:12:43 (UTC)
committer zautrix <zautrix>2005-10-28 17:12:43 (UTC)
commit16e87ac5b81352c51343715cf1080191aaba9611 (patch) (unidiff)
treeba64a88d20259728559af64e8def62179775c104 /kaddressbook/phoneeditwidget.cpp
parentd6eb485cf2ff7a14918f51a5b21b5306f9908fdb (diff)
downloadkdepimpi-16e87ac5b81352c51343715cf1080191aaba9611.zip
kdepimpi-16e87ac5b81352c51343715cf1080191aaba9611.tar.gz
kdepimpi-16e87ac5b81352c51343715cf1080191aaba9611.tar.bz2
ff
Diffstat (limited to 'kaddressbook/phoneeditwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/phoneeditwidget.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp
index f52cedb..7e2aec1 100644
--- a/kaddressbook/phoneeditwidget.cpp
+++ b/kaddressbook/phoneeditwidget.cpp
@@ -33,6 +33,7 @@
33#include <qhbox.h> 33#include <qhbox.h>
34#include <qcursor.h> 34#include <qcursor.h>
35#include <qtimer.h> 35#include <qtimer.h>
36#include <qapplication.h>
36 37
37#include <kbuttonbox.h> 38#include <kbuttonbox.h>
38#include <klistview.h> 39#include <klistview.h>
@@ -60,12 +61,10 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
60 QLabel *temp = new QLabel( "", this ); 61 QLabel *temp = new QLabel( "", this );
61 temp->setAlignment( Qt::AlignCenter ); 62 temp->setAlignment( Qt::AlignCenter );
62 temp->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); 63 temp->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) );
63 gridLayout->addWidget( temp, 1, 0 );
64 QPushButton *addBut = new QPushButton ( "add", this ); 64 QPushButton *addBut = new QPushButton ( "add", this );
65 addBut->setPixmap ( SmallIcon("plus")); 65 addBut->setPixmap ( SmallIcon("plus"));
66 addBut->setMaximumSize( addBut->sizeHint().height(),addBut->sizeHint().height() ); 66 addBut->setMaximumSize( addBut->sizeHint().height(),addBut->sizeHint().height() );
67 connect(addBut,SIGNAL(clicked ()),SLOT(addNumber())); 67 connect(addBut,SIGNAL(clicked ()),SLOT(addNumber()));
68 gridLayout->addWidget( addBut, 0, 0 );
69 68
70 sv = new QScrollView( this ); 69 sv = new QScrollView( this );
71 sv->setFrameStyle ( QFrame::Panel | QFrame::Plain ); 70 sv->setFrameStyle ( QFrame::Panel | QFrame::Plain );
@@ -77,7 +76,15 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
77 mainLayout = new QVBoxLayout ( mw ); 76 mainLayout = new QVBoxLayout ( mw );
78 mainLayout->setMargin( 0 ); 77 mainLayout->setMargin( 0 );
79 mainLayout->setSpacing( 0 ); 78 mainLayout->setSpacing( 0 );
79 if ( QApplication::desktop()->width() == 240 || QApplication::desktop()->width() == 480 ) {
80 gridLayout->addWidget( addBut, 0, 0 );
81 gridLayout->addWidget( temp, 0, 1 );
82 gridLayout->addMultiCellWidget( sv, 1,1 , 0,1 );
83 } else {
84 gridLayout->addWidget( temp, 1, 0 );
85 gridLayout->addWidget( addBut, 0, 0 );
80 gridLayout->addMultiCellWidget( sv, 0, 1, 1,1 ); 86 gridLayout->addMultiCellWidget( sv, 0, 1, 1,1 );
87 }
81 setDefaults(); 88 setDefaults();
82 mTypeNumberEditList.setAutoDelete( true ); 89 mTypeNumberEditList.setAutoDelete( true );
83 mPopup = new QPopupMenu( this ); 90 mPopup = new QPopupMenu( this );