summaryrefslogtreecommitdiffabout
path: root/kaddressbook/phoneeditwidget.cpp
Unidiff
Diffstat (limited to 'kaddressbook/phoneeditwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/phoneeditwidget.cpp60
1 files changed, 33 insertions, 27 deletions
diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp
index df3b551..3661677 100644
--- a/kaddressbook/phoneeditwidget.cpp
+++ b/kaddressbook/phoneeditwidget.cpp
@@ -29,6 +29,6 @@
29#include <qstring.h> 29#include <qstring.h>
30#include <qlistbox.h> 30#include <q3listbox.h>
31#include <qlistview.h> 31#include <q3listview.h>
32#include <qbuttongroup.h> 32#include <q3buttongroup.h>
33#include <qhbox.h> 33#include <q3hbox.h>
34#include <qcursor.h> 34#include <qcursor.h>
@@ -36,2 +36,8 @@
36#include <qapplication.h> 36#include <qapplication.h>
37//Added by qt3to4:
38#include <Q3ValueList>
39#include <Q3GridLayout>
40#include <Q3Frame>
41#include <Q3PopupMenu>
42#include <Q3VBoxLayout>
37 43
@@ -59,3 +65,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
59{ 65{
60 QGridLayout* gridLayout = new QGridLayout ( this, 2,2 ); 66 Q3GridLayout* gridLayout = new Q3GridLayout ( this, 2,2 );
61 67
@@ -69,4 +75,4 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
69 75
70 sv = new QScrollView( this ); 76 sv = new Q3ScrollView( this );
71 sv->setFrameStyle ( QFrame::Plain ); 77 sv->setFrameStyle ( Q3Frame::Plain );
72 sv->setLineWidth ( 0 ); 78 sv->setLineWidth ( 0 );
@@ -75,4 +81,4 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
75 sv->addChild(mw); 81 sv->addChild(mw);
76 sv->setResizePolicy( QScrollView::AutoOneFit ); 82 sv->setResizePolicy( Q3ScrollView::AutoOneFit );
77 mainLayout = new QVBoxLayout ( mw ); 83 mainLayout = new Q3VBoxLayout ( mw );
78 mainLayout->setMargin( 0 ); 84 mainLayout->setMargin( 0 );
@@ -92,3 +98,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
92 mTypeNumberEditList.setAutoDelete( true ); 98 mTypeNumberEditList.setAutoDelete( true );
93 mPopup = new QPopupMenu( this ); 99 mPopup = new Q3PopupMenu( this );
94 QStringList list = PhoneNumber::supportedTypeListNames(); 100 QStringList list = PhoneNumber::supportedTypeListNames();
@@ -228,3 +234,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
228{ 234{
229 QGridLayout *layout = new QGridLayout( this, 4, 1 ); 235 Q3GridLayout *layout = new Q3GridLayout( this, 4, 1 );
230//US layout->setSpacing( KDialog::spacingHint() ); 236//US layout->setSpacing( KDialog::spacingHint() );
@@ -238,3 +244,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
238 label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); 244 label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) );
239 label->setAlignment( AlignCenter ); 245 label->setAlignment( Qt::AlignCenter );
240//US layout->addMultiCellWidget( label, 0, 1, 3, 3 ); 246//US layout->addMultiCellWidget( label, 0, 1, 3, 3 );
@@ -329,3 +335,3 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list )
329 335
330 QValueList<int> defaultTypes; 336 Q3ValueList<int> defaultTypes;
331 defaultTypes << KABC::PhoneNumber::Home; 337 defaultTypes << KABC::PhoneNumber::Home;
@@ -339,3 +345,3 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list )
339 // combos. 345 // combos.
340 QValueList<int>::ConstIterator it; 346 Q3ValueList<int>::ConstIterator it;
341 for( it = defaultTypes.begin(); it != defaultTypes.end(); ++it ) { 347 for( it = defaultTypes.begin(); it != defaultTypes.end(); ++it ) {
@@ -489,6 +495,6 @@ void PhoneEditWidget::updateOtherEdit( PhoneTypeCombo *combo, PhoneTypeCombo *ot
489 495
490class PhoneViewItem : public QListViewItem 496class PhoneViewItem : public Q3ListViewItem
491{ 497{
492public: 498public:
493 PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ); 499 PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number );
494 500
@@ -513,4 +519,4 @@ private:
513 519
514PhoneViewItem::PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ) 520PhoneViewItem::PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number )
515 : QListViewItem( parent ), mPhoneNumber( number ) 521 : Q3ListViewItem( parent ), mPhoneNumber( number )
516{ 522{
@@ -546,3 +552,3 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
546 552
547 QGridLayout *layout = new QGridLayout( page, 1, 2 ); 553 Q3GridLayout *layout = new Q3GridLayout( page, 1, 2 );
548 layout->setSpacing( spacingHint() ); 554 layout->setSpacing( spacingHint() );
@@ -554,3 +560,3 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
554 560
555 KButtonBox *buttonBox = new KButtonBox( page, Vertical ); 561 KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical );
556 562
@@ -567,3 +573,3 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
567 connect( mListView, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()) ); 573 connect( mListView, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()) );
568 connect( mListView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber())); 574 connect( mListView, SIGNAL(doubleClicked( Q3ListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber()));
569 575
@@ -590,3 +596,3 @@ void PhoneEditDialog::slotAddPhoneNumber()
590 if ( dlg.exec() ) { 596 if ( dlg.exec() ) {
591 QListViewItem* i = mListView->firstChild(); 597 Q3ListViewItem* i = mListView->firstChild();
592 KABC::PhoneNumber phoneNumber = dlg.phoneNumber(); 598 KABC::PhoneNumber phoneNumber = dlg.phoneNumber();
@@ -622,3 +628,3 @@ void PhoneEditDialog::slotRemovePhoneNumber()
622 mPhoneNumberList.remove( item->phoneNumber() ); 628 mPhoneNumberList.remove( item->phoneNumber() );
623 QListViewItem *currItem = mListView->currentItem(); 629 Q3ListViewItem *currItem = mListView->currentItem();
624 mListView->takeItem( currItem ); 630 mListView->takeItem( currItem );
@@ -675,3 +681,3 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber,
675 QLabel *label = 0; 681 QLabel *label = 0;
676 QGridLayout *layout = new QGridLayout( page, 3, 2, marginHint(), spacingHint() ); 682 Q3GridLayout *layout = new Q3GridLayout( page, 3, 2, marginHint(), spacingHint() );
677 683
@@ -685,3 +691,3 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber,
685 691
686 mGroup = new QButtonGroup( 2, Horizontal, i18n( "Types" ), page ); 692 mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Types" ), page );
687 layout->addMultiCellWidget( mGroup, 2, 2, 0, 1 ); 693 layout->addMultiCellWidget( mGroup, 2, 2, 0, 1 );
@@ -728,4 +734,4 @@ KABC::PhoneNumber PhoneTypeDialog::phoneNumber()
728#endif 734#endif
729#ifndef KAB_EMBEDDED 735#ifndef KAB_EMBEDDED_
730#include "phoneeditwidget.moc" 736#include "moc_phoneeditwidget.cpp"
731#endif //KAB_EMBEDDED 737#endif //KAB_EMBEDDED