From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'kaddressbook/geowidget.cpp') diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp index 13cd084..caff3b2 100644 --- a/kaddressbook/geowidget.cpp +++ b/kaddressbook/geowidget.cpp @@ -27,10 +27,17 @@ #include #else //KAB_EMBEDDED -#include +#include +//Added by qt3to4: +#include +#include +#include +#include #include #endif //KAB_EMBEDDED +#include + #include #include #include @@ -41,10 +48,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -59,7 +66,7 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) { QLabel *label = 0; - QGridLayout *topLayout = new QGridLayout( this, 4, 3 ); + Q3GridLayout *topLayout = new Q3GridLayout( this, 4, 3 ); topLayout->setMargin( KDialog::marginHint() ); topLayout->setSpacing( KDialog::spacingHint() ); @@ -69,7 +76,7 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) label->setPixmap( KGlobal::iconLoader()->loadIcon( "package_network", KIcon::Desktop, 0 ) ); label->setAlignment( Qt::AlignTop ); topLayout->addMultiCellWidget( label, 0, 3, 0, 0 ); - label->setAlignment( AlignCenter ); + label->setAlignment( Qt::AlignCenter ); mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this ); topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 ); @@ -167,16 +174,16 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) parent, name, true, true ), mUpdateSexagesimalInput( true ) { - QFrame *page = plainPage(); + Q3Frame *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 1, 1, marginHintSmall(), + Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 1, marginHintSmall(), spacingHint() ); //topLayout->setRowStretch( 1, 1 ); mMapWidget = new GeoMapWidget( page ); mCityCombo = new KComboBox( page ); - QGroupBox *sexagesimalGroup = new QGroupBox( 0, Vertical, i18n( "Sexagesimal" ), page ); - QGridLayout *sexagesimalLayout = new QGridLayout( sexagesimalGroup->layout(), + Q3GroupBox *sexagesimalGroup = new Q3GroupBox( 0, Qt::Vertical, i18n( "Sexagesimal" ), page ); + Q3GridLayout *sexagesimalLayout = new Q3GridLayout( sexagesimalGroup->layout(), 2, 5, spacingHint() ); QLabel *label; if ( QApplication::desktop()->width() < 320 ) { @@ -429,8 +436,8 @@ void GeoDialog::loadCityList() QFile file( fileName); - if ( file.open( IO_ReadOnly ) ) { - QTextStream s( &file ); + if ( file.open( QIODevice::ReadOnly ) ) { + Q3TextStream s( &file ); QString line, country; QRegExp coord( "[+-]\\d+[+-]\\d+" ); @@ -552,7 +559,7 @@ int GeoDialog::nearestCity( double x, double y ) GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name ) : QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 ) { - setBackgroundMode( NoBackground ); + setBackgroundMode( Qt::NoBackground ); setFixedSize( 240, 120 ); @@ -624,6 +631,6 @@ void GeoMapWidget::paintEvent( QPaintEvent* ) bitBlt( this, 0, 0, &world ); } -#ifndef KAB_EMBEDDED -#include "geowidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_geowidget.cpp" #endif //KAB_EMBEDDED -- cgit v0.9.0.2