-rw-r--r-- | kaddressbook/geowidget.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp index 13cd084..caff3b2 100644 --- a/kaddressbook/geowidget.cpp +++ b/kaddressbook/geowidget.cpp | |||
@@ -28,8 +28,15 @@ | |||
28 | #else //KAB_EMBEDDED | 28 | #else //KAB_EMBEDDED |
29 | 29 | ||
30 | #include <qtextstream.h> | 30 | #include <q3textstream.h> |
31 | //Added by qt3to4: | ||
32 | #include <QPaintEvent> | ||
33 | #include <Q3GridLayout> | ||
34 | #include <Q3Frame> | ||
35 | #include <QMouseEvent> | ||
31 | #include <kglobal.h> | 36 | #include <kglobal.h> |
32 | #endif //KAB_EMBEDDED | 37 | #endif //KAB_EMBEDDED |
33 | 38 | ||
39 | #include <QDesktopWidget> | ||
40 | |||
34 | #include <knuminput.h> | 41 | #include <knuminput.h> |
35 | #include <kcombobox.h> | 42 | #include <kcombobox.h> |
@@ -42,8 +49,8 @@ | |||
42 | #include <qfile.h> | 49 | #include <qfile.h> |
43 | #include <qapplication.h> | 50 | #include <qapplication.h> |
44 | #include <qgroupbox.h> | 51 | #include <q3groupbox.h> |
45 | #include <qlabel.h> | 52 | #include <qlabel.h> |
46 | #include <qlayout.h> | 53 | #include <qlayout.h> |
47 | #include <qlistbox.h> | 54 | #include <q3listbox.h> |
48 | #include <qpainter.h> | 55 | #include <qpainter.h> |
49 | #include <qpixmap.h> | 56 | #include <qpixmap.h> |
@@ -60,5 +67,5 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) | |||
60 | QLabel *label = 0; | 67 | QLabel *label = 0; |
61 | 68 | ||
62 | QGridLayout *topLayout = new QGridLayout( this, 4, 3 ); | 69 | Q3GridLayout *topLayout = new Q3GridLayout( this, 4, 3 ); |
63 | topLayout->setMargin( KDialog::marginHint() ); | 70 | topLayout->setMargin( KDialog::marginHint() ); |
64 | topLayout->setSpacing( KDialog::spacingHint() ); | 71 | topLayout->setSpacing( KDialog::spacingHint() ); |
@@ -70,5 +77,5 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) | |||
70 | label->setAlignment( Qt::AlignTop ); | 77 | label->setAlignment( Qt::AlignTop ); |
71 | topLayout->addMultiCellWidget( label, 0, 3, 0, 0 ); | 78 | topLayout->addMultiCellWidget( label, 0, 3, 0, 0 ); |
72 | label->setAlignment( AlignCenter ); | 79 | label->setAlignment( Qt::AlignCenter ); |
73 | mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this ); | 80 | mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this ); |
74 | topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 ); | 81 | topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 ); |
@@ -168,7 +175,7 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) | |||
168 | mUpdateSexagesimalInput( true ) | 175 | mUpdateSexagesimalInput( true ) |
169 | { | 176 | { |
170 | QFrame *page = plainPage(); | 177 | Q3Frame *page = plainPage(); |
171 | 178 | ||
172 | QGridLayout *topLayout = new QGridLayout( page, 1, 1, marginHintSmall(), | 179 | Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 1, marginHintSmall(), |
173 | spacingHint() ); | 180 | spacingHint() ); |
174 | //topLayout->setRowStretch( 1, 1 ); | 181 | //topLayout->setRowStretch( 1, 1 ); |
@@ -176,6 +183,6 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) | |||
176 | mMapWidget = new GeoMapWidget( page ); | 183 | mMapWidget = new GeoMapWidget( page ); |
177 | mCityCombo = new KComboBox( page ); | 184 | mCityCombo = new KComboBox( page ); |
178 | QGroupBox *sexagesimalGroup = new QGroupBox( 0, Vertical, i18n( "Sexagesimal" ), page ); | 185 | Q3GroupBox *sexagesimalGroup = new Q3GroupBox( 0, Qt::Vertical, i18n( "Sexagesimal" ), page ); |
179 | QGridLayout *sexagesimalLayout = new QGridLayout( sexagesimalGroup->layout(), | 186 | Q3GridLayout *sexagesimalLayout = new Q3GridLayout( sexagesimalGroup->layout(), |
180 | 2, 5, spacingHint() ); | 187 | 2, 5, spacingHint() ); |
181 | QLabel *label; | 188 | QLabel *label; |
@@ -430,6 +437,6 @@ void GeoDialog::loadCityList() | |||
430 | QFile file( fileName); | 437 | QFile file( fileName); |
431 | 438 | ||
432 | if ( file.open( IO_ReadOnly ) ) { | 439 | if ( file.open( QIODevice::ReadOnly ) ) { |
433 | QTextStream s( &file ); | 440 | Q3TextStream s( &file ); |
434 | 441 | ||
435 | QString line, country; | 442 | QString line, country; |
@@ -553,5 +560,5 @@ GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name ) | |||
553 | : QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 ) | 560 | : QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 ) |
554 | { | 561 | { |
555 | setBackgroundMode( NoBackground ); | 562 | setBackgroundMode( Qt::NoBackground ); |
556 | 563 | ||
557 | setFixedSize( 240, 120 ); | 564 | setFixedSize( 240, 120 ); |
@@ -625,5 +632,5 @@ void GeoMapWidget::paintEvent( QPaintEvent* ) | |||
625 | } | 632 | } |
626 | 633 | ||
627 | #ifndef KAB_EMBEDDED | 634 | #ifndef KAB_EMBEDDED_ |
628 | #include "geowidget.moc" | 635 | #include "moc_geowidget.cpp" |
629 | #endif //KAB_EMBEDDED | 636 | #endif //KAB_EMBEDDED |