-rw-r--r-- | core/settings/citytime/citytime.cpp | 4 | ||||
-rw-r--r-- | core/settings/citytime/citytimebase.cpp | 2 | ||||
-rw-r--r-- | core/settings/citytime/zonemap.cpp | 16 |
3 files changed, 11 insertions, 11 deletions
diff --git a/core/settings/citytime/citytime.cpp b/core/settings/citytime/citytime.cpp index e7f0c46..721285d 100644 --- a/core/settings/citytime/citytime.cpp +++ b/core/settings/citytime/citytime.cpp | |||
@@ -100,26 +100,26 @@ CityTime::CityTime( QWidget *parent, const char* name, | |||
100 | lblCTime6->hide(); | 100 | lblCTime6->hide(); |
101 | cmdCity4->hide(); | 101 | cmdCity4->hide(); |
102 | cmdCity5->hide(); | 102 | cmdCity5->hide(); |
103 | cmdCity6->hide(); | 103 | cmdCity6->hide(); |
104 | } | 104 | } |
105 | 105 | ||
106 | selWidget = frmMap->selectionWidget( this ); | 106 | selWidget = frmMap->selectionWidget( this ); |
107 | selWidget->hide(); | 107 | selWidget->hide(); |
108 | CityTimeBaseLayout->addWidget( selWidget ); | 108 | CityTimeBaseLayout->addWidget( selWidget ); |
109 | bAdded = true; | 109 | bAdded = true; |
110 | readInTimes(); | 110 | readInTimes(); |
111 | changed = FALSE; | 111 | changed = FALSE; |
112 | QObject::connect( qApp, SIGNAL( clockChanged( bool ) ), | 112 | QObject::connect( qApp, SIGNAL( clockChanged(bool) ), |
113 | this, SLOT( changeClock( bool ) ) ); | 113 | this, SLOT( changeClock(bool) ) ); |
114 | // now start the timer so we can update the time quickly every second | 114 | // now start the timer so we can update the time quickly every second |
115 | timerEvent( 0 ); | 115 | timerEvent( 0 ); |
116 | } | 116 | } |
117 | 117 | ||
118 | CityTime::~CityTime() | 118 | CityTime::~CityTime() |
119 | { | 119 | { |
120 | if ( changed ) { | 120 | if ( changed ) { |
121 | Config cfg("CityTime"); | 121 | Config cfg("CityTime"); |
122 | cfg.setGroup("TimeZones"); | 122 | cfg.setGroup("TimeZones"); |
123 | QListIterator<QToolButton> itCity( listCities ); | 123 | QListIterator<QToolButton> itCity( listCities ); |
124 | int i; | 124 | int i; |
125 | bool realTzWritten = FALSE; | 125 | bool realTzWritten = FALSE; |
diff --git a/core/settings/citytime/citytimebase.cpp b/core/settings/citytime/citytimebase.cpp index a3483cc..323929b 100644 --- a/core/settings/citytime/citytimebase.cpp +++ b/core/settings/citytime/citytimebase.cpp | |||
@@ -221,25 +221,25 @@ CityTimeBase::CityTimeBase( QWidget* parent, const char* name, WFlags ) | |||
221 | QFont cmdCity9_font( cmdCity9->font() ); | 221 | QFont cmdCity9_font( cmdCity9->font() ); |
222 | cmdCity9_font.setBold( TRUE ); | 222 | cmdCity9_font.setBold( TRUE ); |
223 | cmdCity9->setFont( cmdCity9_font ); | 223 | cmdCity9->setFont( cmdCity9_font ); |
224 | cmdCity9->setFocusPolicy( QToolButton::TabFocus ); | 224 | cmdCity9->setFocusPolicy( QToolButton::TabFocus ); |
225 | cmdCity9->setText( tr( "" ) ); | 225 | cmdCity9->setText( tr( "" ) ); |
226 | cmdCity9->setToggleButton( TRUE ); | 226 | cmdCity9->setToggleButton( TRUE ); |
227 | cmdCity9->setToggleButton( TRUE ); | 227 | cmdCity9->setToggleButton( TRUE ); |
228 | 228 | ||
229 | Layout2->addWidget( cmdCity9, 2, 2 ); | 229 | Layout2->addWidget( cmdCity9, 2, 2 ); |
230 | CityTimeBaseLayout->addWidget( buttonWidget ); | 230 | CityTimeBaseLayout->addWidget( buttonWidget ); |
231 | 231 | ||
232 | // signals and slots connections | 232 | // signals and slots connections |
233 | connect( frmMap, SIGNAL( signalTz(const QString &, const QString &) ), this, SLOT( slotNewTz(const QString &, const QString &) ) ); | 233 | connect( frmMap, SIGNAL( signalTz(const QString&,const QString&) ), this, SLOT( slotNewTz(const QString&,const QString&) ) ); |
234 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); | 234 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); |
235 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); | 235 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); |
236 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); | 236 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); |
237 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 237 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
238 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); | 238 | connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); |
239 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); | 239 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); |
240 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); | 240 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); |
241 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); | 241 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); |
242 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 242 | connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
243 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); | 243 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); |
244 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); | 244 | connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); |
245 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); | 245 | connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); |
diff --git a/core/settings/citytime/zonemap.cpp b/core/settings/citytime/zonemap.cpp index b83da59..b6843d2 100644 --- a/core/settings/citytime/zonemap.cpp +++ b/core/settings/citytime/zonemap.cpp | |||
@@ -178,30 +178,30 @@ ZoneMap::ZoneMap( QWidget *parent, const char* name ) | |||
178 | 178 | ||
179 | // A timer to make sure the label gets hidden | 179 | // A timer to make sure the label gets hidden |
180 | tHide = new QTimer( this, "Label Timer" ); | 180 | tHide = new QTimer( this, "Label Timer" ); |
181 | QObject::connect( tHide, SIGNAL( timeout() ), | 181 | QObject::connect( tHide, SIGNAL( timeout() ), |
182 | lblCity, SLOT( hide() ) ); | 182 | lblCity, SLOT( hide() ) ); |
183 | QObject::connect( tHide, SIGNAL( timeout() ), | 183 | QObject::connect( tHide, SIGNAL( timeout() ), |
184 | this, SLOT( slotRedraw() ) ); | 184 | this, SLOT( slotRedraw() ) ); |
185 | QTimer *tUpdate = new QTimer( this, "Update Timer" ); | 185 | QTimer *tUpdate = new QTimer( this, "Update Timer" ); |
186 | QObject::connect( tUpdate, SIGNAL( timeout() ), | 186 | QObject::connect( tUpdate, SIGNAL( timeout() ), |
187 | this, SLOT( slotUpdate() ) ); | 187 | this, SLOT( slotUpdate() ) ); |
188 | QObject::connect( qApp, SIGNAL( timeChanged() ), | 188 | QObject::connect( qApp, SIGNAL( timeChanged() ), |
189 | this, SLOT( slotUpdate() ) ); | 189 | this, SLOT( slotUpdate() ) ); |
190 | QObject::connect( cmdZoom, SIGNAL( toggled( bool ) ), | 190 | QObject::connect( cmdZoom, SIGNAL( toggled(bool) ), |
191 | this, SLOT( slotZoom( bool ) ) ); | 191 | this, SLOT( slotZoom(bool) ) ); |
192 | QObject::connect( &norm, SIGNAL( signalNewPoint( const QPoint& ) ), | 192 | QObject::connect( &norm, SIGNAL( signalNewPoint(const QPoint&) ), |
193 | this, SLOT( slotFindCity( const QPoint& ) ) ); | 193 | this, SLOT( slotFindCity(const QPoint&) ) ); |
194 | QObject::connect( qApp, SIGNAL( clockChanged( bool ) ), | 194 | QObject::connect( qApp, SIGNAL( clockChanged(bool) ), |
195 | this, SLOT( changeClock( bool ) ) ); | 195 | this, SLOT( changeClock(bool) ) ); |
196 | // update the sun's movement every 5 minutes | 196 | // update the sun's movement every 5 minutes |
197 | tUpdate->start( 5 * 60 * 1000 ); | 197 | tUpdate->start( 5 * 60 * 1000 ); |
198 | // May as well read in the timezone information too... | 198 | // May as well read in the timezone information too... |
199 | readZones(); | 199 | readZones(); |
200 | } | 200 | } |
201 | 201 | ||
202 | ZoneMap::~ZoneMap() | 202 | ZoneMap::~ZoneMap() |
203 | { | 203 | { |
204 | } | 204 | } |
205 | 205 | ||
206 | void ZoneMap::readZones( void ) | 206 | void ZoneMap::readZones( void ) |
207 | { | 207 | { |
@@ -457,25 +457,25 @@ void ZoneMap::showZones( void ) const | |||
457 | } | 457 | } |
458 | 458 | ||
459 | 459 | ||
460 | QWidget* ZoneMap::selectionWidget( QWidget *parent) { | 460 | QWidget* ZoneMap::selectionWidget( QWidget *parent) { |
461 | 461 | ||
462 | QWidget *returnWidget = new QWidget( parent ); | 462 | QWidget *returnWidget = new QWidget( parent ); |
463 | 463 | ||
464 | QVBoxLayout *layout = new QVBoxLayout( returnWidget ); | 464 | QVBoxLayout *layout = new QVBoxLayout( returnWidget ); |
465 | QHBox *hBox = new QHBox( returnWidget ); | 465 | QHBox *hBox = new QHBox( returnWidget ); |
466 | QListView *continentView = new QListView( hBox ); | 466 | QListView *continentView = new QListView( hBox ); |
467 | continentView->addColumn( tr("Continent") ); | 467 | continentView->addColumn( tr("Continent") ); |
468 | QWhatsThis::add( continentView, tr("Select a continent/country here, then select a city") ); | 468 | QWhatsThis::add( continentView, tr("Select a continent/country here, then select a city") ); |
469 | connect ( continentView, SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( slotGetCities( QListViewItem * ) ) ); | 469 | connect ( continentView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( slotGetCities(QListViewItem*) ) ); |
470 | 470 | ||
471 | QStringList continentList; | 471 | QStringList continentList; |
472 | QListIterator<ZoneField> itZone( zones ); | 472 | QListIterator<ZoneField> itZone( zones ); |
473 | for ( itZone.toFirst(); itZone.current(); ++itZone ) { | 473 | for ( itZone.toFirst(); itZone.current(); ++itZone ) { |
474 | ZoneField *pZone = itZone.current(); | 474 | ZoneField *pZone = itZone.current(); |
475 | if ( continentList.contains( pZone->country() ) == 0 ) { | 475 | if ( continentList.contains( pZone->country() ) == 0 ) { |
476 | QString name; | 476 | QString name; |
477 | QListViewItem *item; | 477 | QListViewItem *item; |
478 | if ( !(pZone->country().length() > 24) ) { | 478 | if ( !(pZone->country().length() > 24) ) { |
479 | name = pZone->country().left(pZone->country().length()-1 ); | 479 | name = pZone->country().left(pZone->country().length()-1 ); |
480 | } else { | 480 | } else { |
481 | name = pZone->country().left( 24 ); | 481 | name = pZone->country().left( 24 ); |
@@ -493,25 +493,25 @@ QWidget* ZoneMap::selectionWidget( QWidget *parent) { | |||
493 | } | 493 | } |
494 | 494 | ||
495 | void ZoneMap::slotGetCities( QListViewItem * contItem) { | 495 | void ZoneMap::slotGetCities( QListViewItem * contItem) { |
496 | 496 | ||
497 | cityView->clear(); | 497 | cityView->clear(); |
498 | selectedCont = contItem->text( 1 ); | 498 | selectedCont = contItem->text( 1 ); |
499 | QListIterator<ZoneField> itZone( zones ); | 499 | QListIterator<ZoneField> itZone( zones ); |
500 | for ( itZone.toFirst(); itZone.current(); ++itZone ) { | 500 | for ( itZone.toFirst(); itZone.current(); ++itZone ) { |
501 | ZoneField *pZone = itZone.current(); | 501 | ZoneField *pZone = itZone.current(); |
502 | if ( pZone->country() == contItem->text( 1 ) ) { | 502 | if ( pZone->country() == contItem->text( 1 ) ) { |
503 | QListViewItem *item; | 503 | QListViewItem *item; |
504 | item = new QListViewItem( cityView, pZone->city() ); | 504 | item = new QListViewItem( cityView, pZone->city() ); |
505 | connect ( cityView, SIGNAL( clicked ( QListViewItem* ) ), this, SLOT( slotCitySelected( QListViewItem* ) ) ); | 505 | connect ( cityView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( slotCitySelected(QListViewItem*) ) ); |
506 | } | 506 | } |
507 | } | 507 | } |
508 | } | 508 | } |
509 | 509 | ||
510 | void ZoneMap::slotCitySelected( QListViewItem *cityItem ) { | 510 | void ZoneMap::slotCitySelected( QListViewItem *cityItem ) { |
511 | if ( cityItem ) { | 511 | if ( cityItem ) { |
512 | emit signalTz( selectedCont, cityItem->text( 0 ) ); | 512 | emit signalTz( selectedCont, cityItem->text( 0 ) ); |
513 | } | 513 | } |
514 | } | 514 | } |
515 | 515 | ||
516 | void ZoneMap::drawCities( QPainter *p ) | 516 | void ZoneMap::drawCities( QPainter *p ) |
517 | { | 517 | { |