summaryrefslogtreecommitdiff
path: root/core/settings/citytime/citytime.cpp
Side-by-side diff
Diffstat (limited to 'core/settings/citytime/citytime.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/citytime/citytime.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/core/settings/citytime/citytime.cpp b/core/settings/citytime/citytime.cpp
index b2f9f14..f33b19f 100644
--- a/core/settings/citytime/citytime.cpp
+++ b/core/settings/citytime/citytime.cpp
@@ -15,31 +15,33 @@
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
+// changes by Maximilian Reiss <harlekin@handhelds.org>
+
#include "zonemap.h"
#include "citytime.h"
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/timestring.h>
#include <qpe/tzselect.h>
#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
#include <qpe/qcopenvelope_qws.h>
#endif
-
#include <qdir.h>
#include <qfile.h>
#include <qlabel.h>
#include <qmessagebox.h>
#include <qregexp.h>
#include <qtextstream.h>
#include <qtoolbutton.h>
+#include <qlayout.h>
#include <stdlib.h>
CityTime::CityTime( QWidget *parent, const char* name,
WFlags fl )
: CityTimeBase( parent, name, fl ),
@@ -74,13 +76,12 @@ CityTime::CityTime( QWidget *parent, const char* name,
// kludgy way of getting the screen size so we don't have to depend
// on a resize event...
QWidget *d = QApplication::desktop();
if ( d->width() < d->height() ) {
// append for that 4 down look
-
listCities.append( cmdCity4 );
listCities.append( cmdCity5 );
listCities.append( cmdCity6 );
listTimes.append( lblCTime4 );
listTimes.append( lblCTime5 );
listTimes.append( lblCTime6 );
@@ -101,17 +102,21 @@ CityTime::CityTime( QWidget *parent, const char* name,
lblCTime5->hide();
lblCTime6->hide();
cmdCity4->hide();
cmdCity5->hide();
cmdCity6->hide();
}
+
+ selWidget = frmMap->selectionWidget( this );
+ selWidget->hide();
+ CityTimeBaseLayout->addWidget( selWidget );
bAdded = true;
readInTimes();
changed = FALSE;
- QObject::connect( qApp, SIGNAL( clockChanged(bool) ),
- this, SLOT( changeClock(bool) ) );
+ QObject::connect( qApp, SIGNAL( clockChanged( bool ) ),
+ this, SLOT( changeClock( bool ) ) );
// now start the timer so we can update the time quickly every second
timerEvent( 0 );
}
CityTime::~CityTime()
{
@@ -196,13 +201,16 @@ void CityTime::showTime( void )
}
}
}
void CityTime::beginNewTz()
{
+ buttonWidget->hide();
frmMap->setFocus();
+ selWidget->show();
+ // CityTimeBaseLayout->addWidget( selWidget );
}
void CityTime::slotNewTz( const QString & strNewCountry,
const QString & strNewCity )
{
// determine what to do based on what putton is pressed...
@@ -220,12 +228,14 @@ void CityTime::slotNewTz( const QString & strNewCountry,
// that is ever pressed!
changed = TRUE;
break;
}
}
showTime();
+ buttonWidget->show();
+ selWidget->hide();
}
void CityTime::readInTimes( void )
{
Config cfg("CityTime");
cfg.setGroup("TimeZones");