clock/clockui/clockcityselectionlist/src/clockcityselectionlist_p.cpp
changeset 57 bb2d3e476f29
parent 55 2c54b51f39c4
child 70 a5ed90760192
equal deleted inserted replaced
55:2c54b51f39c4 57:bb2d3e476f29
     1 /*
     1 	/*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
    44 #include "clockcitylistproxymodel.h"
    44 #include "clockcitylistproxymodel.h"
    45 #include "clockcityselectionlistcommon.h"
    45 #include "clockcityselectionlistcommon.h"
    46 
    46 
    47 #include "timezoneclient.h"
    47 #include "timezoneclient.h"
    48 #include "clockdatatypes.h"
    48 #include "clockdatatypes.h"
       
    49 #include "OstTraceDefinitions.h"
       
    50 #ifdef OST_TRACE_COMPILER_IN_USE
       
    51 #include "clockcityselectionlist_pTraces.h"
       
    52 #endif
       
    53 
    49 
    54 
    50 /*!
    55 /*!
    51 	\class ClockCitySelectionListPrivate
    56 	\class ClockCitySelectionListPrivate
    52 
    57 
    53 	This is the private implementation class for ClockCitySelectionList class.
    58 	This is the private implementation class for ClockCitySelectionList class.
    63 		TimezoneClient *client, QObject *parent)
    68 		TimezoneClient *client, QObject *parent)
    64 :QObject(parent),
    69 :QObject(parent),
    65  mLoader(0),
    70  mLoader(0),
    66  mOwnsClient(false)
    71  mOwnsClient(false)
    67 {
    72 {
       
    73 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_CLOCKCITYSELECTIONLISTPRIVATE_ENTRY );
    68 	// First get the q-pointer.
    74 	// First get the q-pointer.
    69 	q_ptr = static_cast<ClockCitySelectionList *> (parent);
    75 	q_ptr = static_cast<ClockCitySelectionList *> (parent);
    70 
    76 
    71 	mClient = client;
    77 	mClient = client;
    72 	if (!mClient) {
    78 	if (!mClient) {
    73 		mClient = TimezoneClient::getInstance();
    79 		mClient = TimezoneClient::getInstance();
    74 		mOwnsClient = true;
    80 		mOwnsClient = true;
    75 	}
    81 	}
       
    82 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_CLOCKCITYSELECTIONLISTPRIVATE_EXIT );
    76 }
    83 }
    77 
    84 
    78 /*!
    85 /*!
    79 	Destructor.
    86 	Destructor.
    80  */
    87  */
    81 ClockCitySelectionListPrivate::~ClockCitySelectionListPrivate()
    88 ClockCitySelectionListPrivate::~ClockCitySelectionListPrivate()
    82 {
    89 {
       
    90 	OstTraceFunctionEntry0( DUP1_CLOCKCITYSELECTIONLISTPRIVATE_CLOCKCITYSELECTIONLISTPRIVATE_ENTRY );
    83 	if (mOwnsClient) {
    91 	if (mOwnsClient) {
    84 		mClient->deleteInstance();
    92 		mClient->deleteInstance();
    85 	}
    93 	}
    86 	if (mLoader) {
    94 	if (mLoader) {
    87 		mLoader->reset();
    95 		mLoader->reset();
    99 	}
   107 	}
   100 	if (mVirtualKeyboard) {
   108 	if (mVirtualKeyboard) {
   101 	    delete mVirtualKeyboard;
   109 	    delete mVirtualKeyboard;
   102     }
   110     }
   103 
   111 
       
   112 	OstTraceFunctionExit0( DUP1_CLOCKCITYSELECTIONLISTPRIVATE_CLOCKCITYSELECTIONLISTPRIVATE_EXIT );
   104 }
   113 }
   105 
   114 
   106 /*!
   115 /*!
   107 	Populates the list model by getting the data from timezone client.
   116 	Populates the list model by getting the data from timezone client.
   108  */
   117  */
   109 void ClockCitySelectionListPrivate::populateListModel()
   118 void ClockCitySelectionListPrivate::populateListModel()
   110 {
   119 {
       
   120 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_POPULATELISTMODEL_ENTRY );
   111 	// First get the data from the timezone client.
   121 	// First get the data from the timezone client.
   112 	QList<LocationInfo> &infoList = mClient->getLocations();
   122 	QList<LocationInfo> &infoList = mClient->getLocations();
   113 
   123 
   114 	// Sanity check.
   124 	// Sanity check.
   115 	if (!mListModel) {
   125 	if (!mListModel) {
   143 				index, info.countryName, Qt::UserRole + 104);
   153 				index, info.countryName, Qt::UserRole + 104);
   144 	}
   154 	}
   145 
   155 
   146 	// Cleanup.
   156 	// Cleanup.
   147 	infoList.clear();
   157 	infoList.clear();
       
   158 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_POPULATELISTMODEL_EXIT );
   148 }
   159 }
   149 
   160 
   150 /*!
   161 /*!
   151 	Slot to handle the case when a list item is activated. Here we return the
   162 	Slot to handle the case when a list item is activated. Here we return the
   152 	city selected by the user. We emit a signal notifying this event and close
   163 	city selected by the user. We emit a signal notifying this event and close
   153 	the editor.
   164 	the editor.
   154  */
   165  */
   155 void ClockCitySelectionListPrivate::handleItemActivated(
   166 void ClockCitySelectionListPrivate::handleItemActivated(
   156 		const QModelIndex &index)
   167 		const QModelIndex &index)
   157 {
   168 {
       
   169 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_HANDLEITEMACTIVATED_ENTRY );
   158 	LocationInfo selectedInfo;
   170 	LocationInfo selectedInfo;
   159 	selectedInfo.timezoneId = index.data(Qt::UserRole + 101).value<int>();
   171 	selectedInfo.timezoneId = index.data(Qt::UserRole + 101).value<int>();
   160 	selectedInfo.cityGroupId = index.data(Qt::UserRole + 102).value<int>();
   172 	selectedInfo.cityGroupId = index.data(Qt::UserRole + 102).value<int>();
   161 	selectedInfo.cityName = index.data(Qt::UserRole + 103).value<QString>();
   173 	selectedInfo.cityName = index.data(Qt::UserRole + 103).value<QString>();
   162 	selectedInfo.countryName = index.data(Qt::UserRole + 104).value<QString>();
   174 	selectedInfo.countryName = index.data(Qt::UserRole + 104).value<QString>();
   167 	// We have the information. Now emit a signal to notify clients if any.
   179 	// We have the information. Now emit a signal to notify clients if any.
   168 	emit q_ptr->citySelected(selectedInfo);
   180 	emit q_ptr->citySelected(selectedInfo);
   169 
   181 
   170 	// Close the list.
   182 	// Close the list.
   171 	closeCityList();
   183 	closeCityList();
       
   184 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_HANDLEITEMACTIVATED_EXIT );
   172 }
   185 }
   173 
   186 
   174 /*!
   187 /*!
   175 	Slot to handle back action is pressed.
   188 	Slot to handle back action is pressed.
   176  */
   189  */
   177 void ClockCitySelectionListPrivate::handleBackAction()
   190 void ClockCitySelectionListPrivate::handleBackAction()
   178 {
   191 {
       
   192 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_HANDLEBACKACTION_ENTRY );
   179 	LocationInfo info;
   193 	LocationInfo info;
   180 	info.timezoneId = -1;
   194 	info.timezoneId = -1;
   181 
   195 
   182 	// Test code...
   196 	// Test code...
   183 	int rowCount = mListModel->rowCount();
   197 	int rowCount = mListModel->rowCount();
   191 	// Emit the signal to notify the closure.
   205 	// Emit the signal to notify the closure.
   192 	emit q_ptr->citySelected(info);
   206 	emit q_ptr->citySelected(info);
   193 
   207 
   194 	// Close the list.
   208 	// Close the list.
   195 	closeCityList();
   209 	closeCityList();
       
   210 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_HANDLEBACKACTION_EXIT );
   196 }
   211 }
   197 
   212 
   198 /*!
   213 /*!
   199 	closes the city selection list.
   214 	closes the city selection list.
   200  */
   215  */
   201 void ClockCitySelectionListPrivate::closeCityList()
   216 void ClockCitySelectionListPrivate::closeCityList()
   202 {
   217 {
       
   218 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_CLOSECITYLIST_ENTRY );
   203 	// We are done, lets remove the view off the main window.
   219 	// We are done, lets remove the view off the main window.
   204 	HbMainWindow *window = hbInstance->allMainWindows().at(0);
   220 	HbMainWindow *window = hbInstance->allMainWindows().at(0);
   205 	window->removeView(mView);
   221 	window->removeView(mView);
   206 
   222 
   207 	if (mLoader) {
   223 	if (mLoader) {
   211 	}
   227 	}
   212 
   228 
   213 	if (mListModel) {
   229 	if (mListModel) {
   214 		delete mListModel;
   230 		delete mListModel;
   215 	}
   231 	}
       
   232 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_CLOSECITYLIST_EXIT );
   216 }
   233 }
   217 
   234 
   218 /*!
   235 /*!
   219 	Updates the search criteria with the proxy model.
   236 	Updates the search criteria with the proxy model.
   220 
   237 
   221 	\param criteria The string entered by the user.
   238 	\param criteria The string entered by the user.
   222  */
   239  */
   223 void ClockCitySelectionListPrivate::updateSearchCriteria(
   240 void ClockCitySelectionListPrivate::updateSearchCriteria(
   224 		const QString &criteria)
   241 		const QString &criteria)
   225 {
   242 {
       
   243      OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_UPDATESEARCHCRITERIA_ENTRY );
   226      int originalMask  = mListView->enabledAnimations();
   244      int originalMask  = mListView->enabledAnimations();
   227      mListView->setEnabledAnimations(HbAbstractItemView::TouchDown);
   245      mListView->setEnabledAnimations(HbAbstractItemView::TouchDown);
   228 
   246 
   229 	// Create the reg ex so that search is performed for match immediately
   247 	// Create the reg ex so that search is performed for match immediately
   230 	// after word boundary.
   248 	// after word boundary.
   234 	QRegExp searchExp;
   252 	QRegExp searchExp;
   235 	searchExp.setPattern(searchPattern);
   253 	searchExp.setPattern(searchPattern);
   236 
   254 
   237 	mProxyModel->setFilterRegExp(searchExp);
   255 	mProxyModel->setFilterRegExp(searchExp);
   238 	mProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
   256 	mProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
       
   257 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_UPDATESEARCHCRITERIA_EXIT );
   239 }
   258 }
   240 
   259 
   241 /*!
   260 /*!
   242 	Handles add own city menu action
   261 	Handles add own city menu action
   243  */
   262  */
   244 void ClockCitySelectionListPrivate::handleAddOwnCityAction()
   263 void ClockCitySelectionListPrivate::handleAddOwnCityAction()
   245 {
   264 {
       
   265 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_HANDLEADDOWNCITYACTION_ENTRY );
   246 	if (mAddOwnCityDialog) {
   266 	if (mAddOwnCityDialog) {
   247 		delete mAddOwnCityDialog;
   267 		delete mAddOwnCityDialog;
   248 	}
   268 	}
   249 	
   269 	
   250 	HbMainWindow *window = hbInstance->allMainWindows().first();
   270 	HbMainWindow *window = hbInstance->allMainWindows().first();
   281 	addCountryListField();
   301 	addCountryListField();
   282 	
   302 	
   283 	mOkAction = static_cast<HbAction *> (mAddCityDocloader->findObject("okAction"));
   303 	mOkAction = static_cast<HbAction *> (mAddCityDocloader->findObject("okAction"));
   284 	
   304 	
   285 	mAddOwnCityDialog->open(this, SLOT(selectedAction(HbAction*)));
   305 	mAddOwnCityDialog->open(this, SLOT(selectedAction(HbAction*)));
       
   306 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_HANDLEADDOWNCITYACTION_EXIT );
   286 }
   307 }
   287 
   308 
   288 /*!
   309 /*!
   289 	Hanldes Ok action of add own city dialog
   310 	Hanldes Ok action of add own city dialog
   290  */
   311  */
   291 void ClockCitySelectionListPrivate::handleOkAction()
   312 void ClockCitySelectionListPrivate::handleOkAction()
   292 {
   313 {
       
   314 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_HANDLEOKACTION_ENTRY );
   293 	QString cityName = mCityNameEdit->text();
   315 	QString cityName = mCityNameEdit->text();
   294 
   316 
   295 	// Add the city if city name is not empty
   317 	// Add the city if city name is not empty
   296 	if (!cityName.isEmpty()) {
   318 	if (!cityName.isEmpty()) {
   297 		int selectedTZOffset =
   319 		int selectedTZOffset =
   315 		if (!addedCity.cityName.compare(cityName)) {
   337 		if (!addedCity.cityName.compare(cityName)) {
   316 			// Refresh the city list.
   338 			// Refresh the city list.
   317 			populateListModel();
   339 			populateListModel();
   318 		}
   340 		}
   319 	}
   341 	}
       
   342 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_HANDLEOKACTION_EXIT );
   320 }
   343 }
   321 
   344 
   322 /*!
   345 /*!
   323 	Handles the selection of time zone offset.
   346 	Handles the selection of time zone offset.
   324 	Populates the country list.
   347 	Populates the country list.
   325  */
   348  */
   326 void ClockCitySelectionListPrivate::handleTimeZoneSelection(int index)
   349 void ClockCitySelectionListPrivate::handleTimeZoneSelection(int index)
   327 {
   350 {
       
   351 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_HANDLETIMEZONESELECTION_ENTRY );
   328 	// Get the selected time zone offset.
   352 	// Get the selected time zone offset.
   329 	int selectedTimeZoneOffset = mTimeZoneOffsetList.at(index);
   353 	int selectedTimeZoneOffset = mTimeZoneOffsetList.at(index);
   330 
   354 
   331 	if(mCountryList.count()) {
   355 	if(mCountryList.count()) {
   332 		mCountryList.clear();
   356 		mCountryList.clear();
   340 		countries.append(mCountryList.at(index).countryName);
   364 		countries.append(mCountryList.at(index).countryName);
   341 
   365 
   342 	qSort(countries);
   366 	qSort(countries);
   343 	mCountryComboBox->setItems(countries);
   367 	mCountryComboBox->setItems(countries);
   344 	}
   368 	}
       
   369 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_HANDLETIMEZONESELECTION_EXIT );
   345 }
   370 }
   346 
   371 
   347 /*!
   372 /*!
   348 	Slot to handle the selected action
   373 	Slot to handle the selected action
   349  */
   374  */
   350 void ClockCitySelectionListPrivate::selectedAction(HbAction *action)
   375 void ClockCitySelectionListPrivate::selectedAction(HbAction *action)
   351 {
   376 {
       
   377 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_SELECTEDACTION_ENTRY );
   352 	if (action==mOkAction) {
   378 	if (action==mOkAction) {
   353 		handleOkAction();
   379 		handleOkAction();
   354 	}
   380 	}
       
   381 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_SELECTEDACTION_EXIT );
   355 }
   382 }
   356 
   383 
   357 /*!
   384 /*!
   358 	Slot to handle the orientation change.
   385 	Slot to handle the orientation change.
   359  */
   386  */
   360 void ClockCitySelectionListPrivate::loadSection(Qt::Orientation orientation)
   387 void ClockCitySelectionListPrivate::loadSection(Qt::Orientation orientation)
   361 {
   388 {
       
   389 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_LOADSECTION_ENTRY );
   362 	bool loadSuccess;
   390 	bool loadSuccess;
   363 	if (mAddOwnCityDialog) {
   391 	if (mAddOwnCityDialog) {
   364 		if (Qt::Horizontal == orientation) {
   392 		if (Qt::Horizontal == orientation) {
   365 			mAddCityDocloader->load(":/xml/clockaddcitydialog.docml",
   393 			mAddCityDocloader->load(":/xml/clockaddcitydialog.docml",
   366 					"landscape", &loadSuccess);
   394 					"landscape", &loadSuccess);
   367 		} else if (Qt::Vertical == orientation) {
   395 		} else if (Qt::Vertical == orientation) {
   368 			mAddCityDocloader->load(":/xml/clockaddcitydialog.docml",
   396 			mAddCityDocloader->load(":/xml/clockaddcitydialog.docml",
   369 					"portrait", &loadSuccess);
   397 					"portrait", &loadSuccess);
   370 		}
   398 		}
   371 	}
   399 	}
       
   400 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_LOADSECTION_EXIT );
   372 }
   401 }
   373 
   402 
   374 /*!
   403 /*!
   375 	Slot to handle close action of search panel.
   404 	Slot to handle close action of search panel.
   376 	This slot cancels the search and dismisses the vkb.
   405 	This slot cancels the search and dismisses the vkb.
   377  */
   406  */
   378 void ClockCitySelectionListPrivate::cancelSearch()
   407 void ClockCitySelectionListPrivate::cancelSearch()
   379 {
   408 {
       
   409 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_CANCELSEARCH_ENTRY );
   380 	// Clear the search criteria.
   410 	// Clear the search criteria.
   381 	mSearchBox->setCriteria(QString(""));
   411 	mSearchBox->setCriteria(QString(""));
   382 	
   412 	
   383 	// Hide the virtual keyborad.	
   413 	// Hide the virtual keyborad.	
   384 	QInputContext *ic = qApp->inputContext();
   414 	QInputContext *ic = qApp->inputContext();
   388 		delete event;
   418 		delete event;
   389 	}
   419 	}
   390 	
   420 	
   391 	// Set focus to the first city in the list.
   421 	// Set focus to the first city in the list.
   392 	mListView->scrollTo(mProxyModel->index(0, 0));
   422 	mListView->scrollTo(mProxyModel->index(0, 0));
       
   423 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_CANCELSEARCH_EXIT );
   393 }
   424 }
   394 
   425 
   395 /*!
   426 /*!
   396     Focuses the line edit when the city selection list is opened.
   427     Focuses the line edit when the city selection list is opened.
   397  */
   428  */
   398 void ClockCitySelectionListPrivate::focusLineEdit()
   429 void ClockCitySelectionListPrivate::focusLineEdit()
   399 {
   430 {
       
   431 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_FOCUSLINEEDIT_ENTRY );
   400 	if (mSearchBox) {
   432 	if (mSearchBox) {
   401 		// mView->scene()->setFocusItem(mSearchBox);
   433 		// mView->scene()->setFocusItem(mSearchBox);
   402 		HbLineEdit *searchBoxEditor = 0;
   434 		HbLineEdit *searchBoxEditor = 0;
   403 		searchBoxEditor = static_cast<HbLineEdit*>(
   435 		searchBoxEditor = static_cast<HbLineEdit*>(
   404 				mSearchBox->primitive("lineedit"));
   436 				mSearchBox->primitive("lineedit"));
   417 			QEvent *event = new QEvent(QEvent::RequestSoftwareInputPanel);
   449 			QEvent *event = new QEvent(QEvent::RequestSoftwareInputPanel);
   418 			ic->filterEvent(event);
   450 			ic->filterEvent(event);
   419 			delete event;
   451 			delete event;
   420 		}
   452 		}
   421 	}
   453 	}
       
   454 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_FOCUSLINEEDIT_EXIT );
   422 }
   455 }
   423 
   456 
   424 /*!
   457 /*!
   425 	Displays the city selection list.
   458 	Displays the city selection list.
   426  */
   459  */
   427 void ClockCitySelectionListPrivate::showCityList()
   460 void ClockCitySelectionListPrivate::showCityList()
   428 {
   461 {
       
   462 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_SHOWCITYLIST_ENTRY );
   429 	// Construct the document loader.
   463 	// Construct the document loader.
   430 	bool success = false;
   464 	bool success = false;
   431 	mLoader = new HbDocumentLoader;
   465 	mLoader = new HbDocumentLoader;
   432 	mLoader->load(":/xml/clockcityselectionlist.docml", &success);
   466 	mLoader->load(":/xml/clockcityselectionlist.docml", &success);
   433 	if (!success) {
   467 	if (!success) {
   504 	window->setCurrentView(mView);
   538 	window->setCurrentView(mView);
   505 	
   539 	
   506 	// Focus the search box.
   540 	// Focus the search box.
   507 	focusLineEdit();
   541 	focusLineEdit();
   508 
   542 
       
   543 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_SHOWCITYLIST_EXIT );
   509 }
   544 }
   510 
   545 
   511 /*!
   546 /*!
   512 	Get all the time zone offset texts.
   547 	Get all the time zone offset texts.
   513  */
   548  */
   514 QStringList ClockCitySelectionListPrivate::getOffsetTexts()
   549 QStringList ClockCitySelectionListPrivate::getOffsetTexts()
   515 {
   550 {
       
   551 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_GETOFFSETTEXTS_ENTRY );
   516 	int offsetCount(mTimeZoneOffsetList.count());
   552 	int offsetCount(mTimeZoneOffsetList.count());
   517 
   553 
   518 	// Get all the time zone offsets
   554 	// Get all the time zone offsets
   519 	if (!offsetCount) {
   555 	if (!offsetCount) {
   520 		mTimeZoneOffsetList = mClient->getAllTimeZoneOffsets();
   556 		mTimeZoneOffsetList = mClient->getAllTimeZoneOffsets();
   543 				r_qtn_time_durat_short_with_zero);
   579 				r_qtn_time_durat_short_with_zero);
   544 
   580 
   545 	offsetTextList.append(offsetText);
   581 	offsetTextList.append(offsetText);
   546 	offsetText.clear();
   582 	offsetText.clear();
   547 	}
   583 	}
       
   584 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_GETOFFSETTEXTS_EXIT );
   548 	return offsetTextList;
   585 	return offsetTextList;
   549 }
   586 }
   550 
   587 
   551 /*!
   588 /*!
   552 	Add city name edit field to add own city popup.
   589 	Add city name edit field to add own city popup.
   553  */
   590  */
   554 void ClockCitySelectionListPrivate::addCityNameField()
   591 void ClockCitySelectionListPrivate::addCityNameField()
   555 {
   592 {
       
   593 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_ADDCITYNAMEFIELD_ENTRY );
   556 	mCityNameEdit = new HbLineEdit();
   594 	mCityNameEdit = new HbLineEdit();
   557 	mCityNameEdit->setFocus(Qt::MouseFocusReason);
   595 	mCityNameEdit->setFocus(Qt::MouseFocusReason);
       
   596 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_ADDCITYNAMEFIELD_EXIT );
   558 }
   597 }
   559 
   598 
   560 /*!
   599 /*!
   561 	Add timezone field to add own city popup.
   600 	Add timezone field to add own city popup.
   562  */
   601  */
   563 void ClockCitySelectionListPrivate::addTimeZoneField()
   602 void ClockCitySelectionListPrivate::addTimeZoneField()
   564 {
   603 {
       
   604 OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_ADDTIMEZONEFIELD_ENTRY );
   565 //	mTimeZoneComboBox = new HbComboBox();
   605 //	mTimeZoneComboBox = new HbComboBox();
   566 
   606 
   567 	QStringList texts = getOffsetTexts();
   607 	QStringList texts = getOffsetTexts();
   568 	mTimeZoneComboBox->addItems(texts);
   608 	mTimeZoneComboBox->addItems(texts);
   569 
   609 
   574 	mTimeZoneComboBox->setCurrentIndex(mCurrentTZOffsetIndex);
   614 	mTimeZoneComboBox->setCurrentIndex(mCurrentTZOffsetIndex);
   575 
   615 
   576 	connect(
   616 	connect(
   577 			mTimeZoneComboBox, SIGNAL(currentIndexChanged(int)),
   617 			mTimeZoneComboBox, SIGNAL(currentIndexChanged(int)),
   578 			this, SLOT(handleTimeZoneSelection(int)));
   618 			this, SLOT(handleTimeZoneSelection(int)));
       
   619 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_ADDTIMEZONEFIELD_EXIT );
   579 }
   620 }
   580 
   621 
   581 /*!
   622 /*!
   582 	Add country list field to add own city popup.
   623 	Add country list field to add own city popup.
   583  */
   624  */
   584 void ClockCitySelectionListPrivate::addCountryListField()
   625 void ClockCitySelectionListPrivate::addCountryListField()
   585 {
   626 {
       
   627 	OstTraceFunctionEntry0( CLOCKCITYSELECTIONLISTPRIVATE_ADDCOUNTRYLISTFIELD_ENTRY );
   586 	// Populate the country list based on the current TZ offset selected.
   628 	// Populate the country list based on the current TZ offset selected.
   587 	handleTimeZoneSelection(mCurrentTZOffsetIndex);
   629 	handleTimeZoneSelection(mCurrentTZOffsetIndex);
       
   630 	OstTraceFunctionExit0( CLOCKCITYSELECTIONLISTPRIVATE_ADDCOUNTRYLISTFIELD_EXIT );
   588 }
   631 }
   589 
   632 
   590 // End of file	--Don't remove this.
   633 // End of file	--Don't remove this.