equal
deleted
inserted
replaced
278 mAddCityDocloader->load(":/xml/clockaddcitydialog.docml", &success); |
278 mAddCityDocloader->load(":/xml/clockaddcitydialog.docml", &success); |
279 if (!success) { |
279 if (!success) { |
280 qFatal("Unable to load the document."); |
280 qFatal("Unable to load the document."); |
281 } |
281 } |
282 |
282 |
|
283 if (Qt::Horizontal == window->orientation()) { |
|
284 mAddCityDocloader->load(":/xml/clockaddcitydialog.docml", |
|
285 "landscape", &success); |
|
286 } else if (Qt::Vertical == window->orientation()) { |
|
287 mAddCityDocloader->load(":/xml/clockaddcitydialog.docml", |
|
288 "portrait", &success); |
|
289 } |
283 // Get the dialog. |
290 // Get the dialog. |
284 mAddOwnCityDialog = static_cast<HbDialog *> (mAddCityDocloader->findWidget("dialog")); |
291 mAddOwnCityDialog = static_cast<HbDialog *> (mAddCityDocloader->findWidget("dialog")); |
285 if (!mAddOwnCityDialog) { |
292 if (!mAddOwnCityDialog) { |
286 qFatal("Unable to get the selection view."); |
293 qFatal("Unable to get the selection view."); |
287 } |
294 } |
509 // Construct the model for the list. |
516 // Construct the model for the list. |
510 QTimer::singleShot(1, this, SLOT(populateListModel())); |
517 QTimer::singleShot(1, this, SLOT(populateListModel())); |
511 |
518 |
512 // Set the model to the list. |
519 // Set the model to the list. |
513 mListView->setModel(mProxyModel); |
520 mListView->setModel(mProxyModel); |
514 |
521 mListView->setItemPixmapCacheEnabled(true); |
515 // Listen for list item activated signal. |
522 // Listen for list item activated signal. |
516 connect( |
523 connect( |
517 mListView, SIGNAL(activated(QModelIndex)), |
524 mListView, SIGNAL(activated(QModelIndex)), |
518 this, SLOT(handleItemActivated(QModelIndex))); |
525 this, SLOT(handleItemActivated(QModelIndex))); |
519 |
526 |