386 emit viewActivated( mViewManager, aArgs ); |
382 emit viewActivated( mViewManager, aArgs ); |
387 |
383 |
388 CNT_EXIT |
384 CNT_EXIT |
389 } |
385 } |
390 |
386 |
|
387 QString CntContactCardViewPrivate::externalize(QDataStream &stream) |
|
388 { |
|
389 // set activity parameters |
|
390 CntViewParameters viewParameters; |
|
391 viewParameters.insert(EViewId, mArgs.value(EViewId).toInt()); |
|
392 |
|
393 if (mArgs.value(ESelectedContact).isValid()) |
|
394 { |
|
395 QContact contact = mArgs.value(ESelectedContact).value<QContact>(); |
|
396 viewParameters.insert(ESelectedContactId, contact.localId()); |
|
397 } |
|
398 if (mArgs.value(ESelectedGroupContact).isValid()) |
|
399 { |
|
400 QContact contact = mArgs.value(ESelectedGroupContact).value<QContact>(); |
|
401 viewParameters.insert(ESelectedGroupContactId, QVariant(contact.localId())); |
|
402 } |
|
403 if (mArgs.value(EMyCard).isValid()) |
|
404 { |
|
405 viewParameters.insert(EMyCard, mArgs.value(EMyCard)); |
|
406 } |
|
407 if (mArgs.value(EExtraAction).isValid()) |
|
408 { |
|
409 viewParameters.insert(EExtraAction, mArgs.value(EExtraAction)); |
|
410 } |
|
411 |
|
412 stream << viewParameters; |
|
413 |
|
414 return CNT_ACTIVITY_CONTACTCARD; |
|
415 } |
|
416 |
|
417 bool CntContactCardViewPrivate::internalize(QDataStream &stream, CntViewParameters &viewParameters) |
|
418 { |
|
419 CntViewParameters tempViewParameters; |
|
420 stream >> tempViewParameters; |
|
421 |
|
422 viewParameters.insert(EViewId, tempViewParameters.value(EViewId)); |
|
423 |
|
424 if (tempViewParameters.value(ESelectedContactId).isValid()) |
|
425 { |
|
426 QContact contact = contactManager()->contact(tempViewParameters.value(ESelectedContactId).toInt()); |
|
427 if (contact.isEmpty()) |
|
428 { |
|
429 // a contact has been deleted. |
|
430 return false; |
|
431 } |
|
432 else |
|
433 { |
|
434 QVariant var; |
|
435 var.setValue(contact); |
|
436 viewParameters.insert(ESelectedContact, var); |
|
437 } |
|
438 } |
|
439 if (tempViewParameters.value(ESelectedGroupContactId).isValid()) |
|
440 { |
|
441 QVariant var; |
|
442 var.setValue(contactManager()->contact(tempViewParameters.value(ESelectedGroupContactId).toInt())); |
|
443 viewParameters.insert(ESelectedGroupContact, var); |
|
444 } |
|
445 if (tempViewParameters.value(EMyCard).isValid()) |
|
446 { |
|
447 viewParameters.insert(EMyCard, tempViewParameters.value(EMyCard)); |
|
448 } |
|
449 if (tempViewParameters.value(EMyCard).isValid()) |
|
450 { |
|
451 viewParameters.insert(EExtraAction, tempViewParameters.value(EExtraAction)); |
|
452 } |
|
453 |
|
454 return true; |
|
455 } |
|
456 |
391 void CntContactCardViewPrivate::populateHeadingItem() |
457 void CntContactCardViewPrivate::populateHeadingItem() |
392 { |
458 { |
393 CNT_ENTRY |
459 CNT_ENTRY |
394 |
460 |
395 Q_ASSERT(mHeadingItem != NULL && mContact != NULL); |
461 Q_ASSERT(mHeadingItem != NULL && mContact != NULL); |
450 { |
512 { |
451 CNT_ENTRY |
513 CNT_ENTRY |
452 |
514 |
453 Q_ASSERT(mContact != NULL && mScrollArea != NULL); |
515 Q_ASSERT(mContact != NULL && mScrollArea != NULL); |
454 |
516 |
455 if (mListPopulationProgress == CntListPopulationNotInProgress) { |
517 if (mListPopulationProgress == CntListPopulationNotInProgress) |
|
518 { |
456 mListPopulationProgress = 0; |
519 mListPopulationProgress = 0; |
457 |
520 |
458 if (!mDataContainer) { |
521 if (!mDataContainer) |
|
522 { |
459 mDataContainer = new CntContactCardDataContainer( |
523 mDataContainer = new CntContactCardDataContainer( |
460 mMaptile, |
524 mMaptile, |
461 mEngine->extensionManager(), |
525 mEngine->extensionManager(), |
462 mView->mainWindow()->orientation()); |
526 mView->mainWindow()->orientation()); |
463 } |
527 } |
464 |
528 |
465 // fill the data container with contact details |
529 // fill the data container with contact details |
466 mDataContainer->setContactData(mContact); |
530 mDataContainer->setContactData(mContact); |
467 |
531 |
468 // scroll area + container widget |
532 if (mContainerLayout) |
469 mContainerWidget = mScrollArea->contentWidget(); |
533 { |
470 if (!mContainerWidget) { |
534 // Remove the separator obj from previous layout |
471 // initialize |
535 // It needs to be reused |
472 mScrollArea->setScrollDirections(Qt::Vertical); |
536 mContainerLayout->removeItem(mSeparatorlabel); |
473 |
537 } |
474 mContainerWidget = new QGraphicsWidget(); |
538 // initialize |
475 mScrollArea->setContentWidget(mContainerWidget); // takes ownership. Old widget is deleted |
539 mScrollArea->setScrollDirections(Qt::Vertical); |
476 |
540 |
477 mContainerLayout = new QGraphicsLinearLayout(Qt::Vertical); |
541 mContainerWidget = new QGraphicsWidget(); |
478 mContainerLayout->setContentsMargins(0, 0, 0, 0); |
542 mScrollArea->setContentWidget(mContainerWidget); // takes ownership. |
479 mContainerLayout->setSpacing(0); |
543 |
480 mContainerLayout->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); |
544 mContainerLayout = new QGraphicsLinearLayout(Qt::Vertical); |
481 |
545 mContainerLayout->setContentsMargins(0, 0, 0, 0); |
482 mContainerWidget->setLayout(mContainerLayout); // takes ownership. Old layout is deleted |
546 mContainerLayout->setSpacing(0); |
483 } else { |
547 mContainerLayout->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); |
484 // Already initialized |
548 |
485 Q_ASSERT(mContainerLayout != NULL); |
549 mContainerWidget->setLayout(mContainerLayout); // takes ownership. |
486 |
550 } |
487 // Clear the container |
551 |
488 int count = mContainerLayout->count(); |
552 |
489 for (int i = 0; i < count; i++) { |
553 do { |
490 // do not delete items. They will be deleted automatically |
554 if (mListPopulationProgress == mDataContainer->itemCount() || mStopListPopulation) |
491 mContainerLayout->removeAt(i); |
555 { |
|
556 if (!mStopListPopulation && mFetchAvatar) |
|
557 { |
|
558 // fetch the avatar if it has not yet been fetched |
|
559 mFetchAvatar = false; |
|
560 mThumbnailManager->getThumbnail(ThumbnailManager::ThumbnailLarge, mAvatar->imageUrl().toString()); |
492 } |
561 } |
493 } |
|
494 |
|
495 // Delete all the detail pointers if any |
|
496 qDeleteAll(mDetailPtrs); |
|
497 mDetailPtrs.clear(); |
|
498 } |
|
499 |
|
500 |
|
501 do { |
|
502 if (mListPopulationProgress == mDataContainer->itemCount() || mStopListPopulation) { |
|
503 // population of the list has completed |
562 // population of the list has completed |
504 mListPopulationProgress = CntListPopulationNotInProgress; |
563 mListPopulationProgress = CntListPopulationNotInProgress; |
505 mStopListPopulation = false; |
564 mStopListPopulation = false; |
506 disconnect(mView->mainWindow(), SIGNAL(viewReady()), this, SLOT(populateListItems())); |
565 disconnect(mView->mainWindow(), SIGNAL(viewReady()), this, SLOT(populateListItems())); |
|
566 CNT_EXIT_ARGS("population completed") |
507 return; |
567 return; |
508 } |
568 } |
509 |
569 |
510 CntContactCardDataItem* dataItem = mDataContainer->dataItem(mListPopulationProgress); |
570 CntContactCardDataItem* dataItem = mDataContainer->dataItem(mListPopulationProgress); |
511 int pos = dataItem->position(); |
571 int pos = dataItem->position(); |
512 |
572 |
513 // communication methods |
573 // communication methods |
514 if (pos < CntContactCardDataItem::ESeparator && dataItem->isFocusable()) |
574 if (pos < CntContactCardDataItem::ESeparator && dataItem->isFocusable()) |
515 { |
575 { |
516 CntContactCardDetailItem* item = new CntContactCardDetailItem(mListPopulationProgress, mContainerWidget); |
576 CntContactCardDetailItem* item = new CntContactCardDetailItem(mListPopulationProgress, mContainerWidget); |
517 mDetailPtrs.append(item); |
|
518 |
577 |
519 connect(item, SIGNAL(clicked()), this, SLOT(onItemActivated())); |
578 connect(item, SIGNAL(clicked()), this, SLOT(onItemActivated())); |
520 |
579 |
521 if (!mIsTemporary) |
580 if (!mIsTemporary) |
522 { |
581 { |
646 Connects the action with a slot and also sets the view as the parent for the action. |
718 Connects the action with a slot and also sets the view as the parent for the action. |
647 */ |
719 */ |
648 void CntContactCardViewPrivate::connectAction(QString actionName, const char* slot) |
720 void CntContactCardViewPrivate::connectAction(QString actionName, const char* slot) |
649 { |
721 { |
650 HbAction *action = qobject_cast<HbAction *>(document()->findObject(actionName)); |
722 HbAction *action = qobject_cast<HbAction *>(document()->findObject(actionName)); |
651 if (action) { |
723 if (action) |
|
724 { |
652 action->setParent(mView); |
725 action->setParent(mView); |
653 if (slot != NULL) { |
726 if (slot != NULL) |
|
727 { |
654 connect(action, SIGNAL(triggered()), this, slot); |
728 connect(action, SIGNAL(triggered()), this, slot); |
655 } |
729 } |
656 } |
730 } |
657 } |
731 } |
658 |
732 |
659 /* |
733 /* |
660 Updates the maptile fetching spinning indicator icon |
734 Updates the maptile fetching spinning indicator icon |
661 */ |
735 */ |
662 void CntContactCardViewPrivate::updateSpinningIndicator() |
736 void CntContactCardViewPrivate::updateSpinningIndicator() |
663 { |
737 { |
664 //Check all address details( Preferred, Home, Work ) |
738 CNT_ENTRY |
665 for( int index = 0 ; index < mAddressList.count(); ) |
739 |
666 { |
740 // Check all address details( Preferred, Home, Work ) |
667 //Maptile status not received update the rotating icon |
741 for (int index = 0 ; index < mAddressList.count();) |
668 if( mAddressList[index]->maptileStatus == CNT_UNKNOWN_MAPTILE_STATUS ) |
742 { |
669 { |
743 // Maptile status not received update the rotating icon |
670 QString iconName("qtg_anim_small_loading_"); |
744 if (mAddressList[index]->maptileStatus == CNT_UNKNOWN_MAPTILE_STATUS) |
671 mAddressList[index]->mProgressCount = mAddressList[index]->mProgressCount % 10 + 1; |
745 { |
672 iconName.append(QVariant(mAddressList[index]->mProgressCount).toString()); |
746 QString iconName("qtg_anim_small_loading_"); |
|
747 mAddressList[index]->mProgressCount = mAddressList[index]->mProgressCount % 10 + 1; |
|
748 iconName.append(QVariant(mAddressList[index]->mProgressCount).toString()); |
673 |
749 |
674 HbIcon icon(iconName); |
750 HbIcon icon(iconName); |
675 mAddressList[index]->mDetailItem->setSecondaryIconItem( icon ); |
751 mAddressList[index]->mDetailItem->setSecondaryIconItem(icon); |
676 mAddressList[index]->mDetailItem->update(); |
752 mAddressList[index]->mDetailItem->update(); |
677 mProgressTimer->start(CNT_MAPTILE_PROGRESS_TIMER); |
753 mProgressTimer->start(CNT_MAPTILE_PROGRESS_TIMER); |
678 index++; |
754 index++; |
679 } |
755 } |
680 else |
756 else |
681 { |
757 { |
682 //Maptile status received. Show the maptile image if available |
758 // Maptile status received. Show the maptile image if available |
683 MapTileService::AddressType sourceAddressType = |
759 MapTileService::AddressType sourceAddressType = |
684 static_cast <MapTileService::AddressType>( mAddressList[index]->mAddressType ); |
760 static_cast <MapTileService::AddressType>(mAddressList[index]->mAddressType); |
685 |
761 |
686 QContactLocalId contactId = mContact->localId(); |
762 QContactLocalId contactId = mContact->localId(); |
687 |
763 |
688 if( mAddressList[index] != NULL ) |
764 if (mAddressList[index] != NULL) |
689 { |
765 { |
690 if( mAddressList[index]->maptileStatus == MapTileService::MapTileFetchingCompleted ) |
766 if (mAddressList[index]->maptileStatus == MapTileService::MapTileFetchingCompleted) |
691 { |
767 { |
692 |
768 // Read the maptile path and update the image |
693 //Read the maptile path and update the image |
769 QString imagePath; |
694 QString imagePath; |
770 mMaptile->getMapTileImage( |
695 mMaptile->getMapTileImage( |
771 contactId, sourceAddressType, imagePath, mView->mainWindow()->orientation()); |
696 contactId, sourceAddressType, imagePath, mView->mainWindow()->orientation() ); |
|
697 |
772 |
698 if( !imagePath.isEmpty() ) |
773 if (!imagePath.isEmpty()) |
699 { |
774 { |
700 //Empty icon. Clear the inprogress icon |
775 //Empty icon. Clear the inprogress icon |
701 HbIcon emptyIcon; |
776 HbIcon emptyIcon; |
702 mAddressList[index]->mDetailItem->setSecondaryIconItem( emptyIcon ); |
777 mAddressList[index]->mDetailItem->setSecondaryIconItem(emptyIcon); |
703 |
778 |
704 HbIcon icon( imagePath ); |
779 HbIcon icon(imagePath); |
705 |
780 |
706 HbLabel* maptileLabel = loadMaptileLabel( sourceAddressType ); |
781 HbLabel* maptileLabel = loadMaptileLabel(sourceAddressType); |
707 setMaptileLabel( maptileLabel, icon ); |
782 setMaptileLabel(maptileLabel, icon); |
708 mMaptileLabelList.insert( sourceAddressType, maptileLabel ); |
783 mMaptileLabelList.insert(sourceAddressType, maptileLabel); |
709 |
784 |
710 //find the index of the item and insert maptile in the next index |
785 //find the index of the item and insert maptile in the next index |
711 for( int itemIndex = 0 ; itemIndex < mContainerLayout->count(); itemIndex++ ) |
786 for (int itemIndex = 0 ; itemIndex < mContainerLayout->count(); itemIndex++) |
712 { |
787 { |
713 if( mContainerLayout->itemAt(itemIndex) == mAddressList[index]->mDetailItem ) |
788 if (mContainerLayout->itemAt(itemIndex) == mAddressList[index]->mDetailItem) |
714 { |
789 { |
715 mContainerLayout->insertItem( itemIndex+1, maptileLabel ); |
790 mContainerLayout->insertItem(itemIndex + 1, maptileLabel); |
716 break; |
791 break; |
717 } |
792 } |
718 } |
793 } |
719 |
794 } |
720 } |
795 else |
721 else |
796 { |
722 { |
797 //Maptile image not available. Show the search stop icon |
723 //Maptile image not available. Show the search stop icon |
798 setMaptileSearchStopIcon(index); |
724 setMaptileSearchStopIcon( index ); |
799 } |
725 } |
800 } |
726 } |
801 else |
727 else |
802 { |
728 { |
803 //Maptile fetching failed. Show the search stop icon |
729 //Maptile fetching failed. Show the search stop icon |
804 setMaptileSearchStopIcon(index); |
730 setMaptileSearchStopIcon( index ); |
805 } |
731 } |
|
732 |
806 |
733 delete mAddressList[index]; |
807 delete mAddressList[index]; |
734 mAddressList.removeAt(index); |
808 mAddressList.removeAt(index); |
735 } |
809 } |
736 else |
810 else |
737 { |
811 { |
738 //increment the index now |
812 //increment the index now |
739 index++; |
813 index++; |
740 } |
814 } |
741 } |
815 } |
742 } |
816 } |
743 } |
817 } |
744 |
818 |
745 /* |
819 /* |
746 * Sets the search stop icon to secondary icon item |
820 * Sets the search stop icon to secondary icon item |
747 */ |
821 */ |
748 void CntContactCardViewPrivate::setMaptileSearchStopIcon( int index ) |
822 void CntContactCardViewPrivate::setMaptileSearchStopIcon(int index) |
749 { |
823 { |
750 if( index < mAddressList.count() ) |
824 if (index < mAddressList.count()) |
751 { |
825 { |
752 QString iconName(CNT_MAPTILE_SEARCH_STOP_ICON); |
826 QString iconName(CNT_MAPTILE_SEARCH_STOP_ICON); |
753 HbIcon icon(iconName); |
827 HbIcon icon(iconName); |
754 mAddressList[index]->mDetailItem->setSecondaryIconItem( icon ); |
828 mAddressList[index]->mDetailItem->setSecondaryIconItem(icon); |
755 mAddressList[index]->mDetailItem->update(); |
829 mAddressList[index]->mDetailItem->update(); |
756 } |
830 } |
757 } |
831 } |
758 |
832 |
759 /* |
833 /*! |
760 * Slot to receive the maptile status information |
834 Slot to receive the maptile status information. |
761 */ |
835 */ |
762 void CntContactCardViewPrivate::mapTileStatusReceived( int contactid, int addressType, int status) |
836 void CntContactCardViewPrivate::mapTileStatusReceived(int contactid, int addressType, int status) |
763 { |
837 { |
764 //Update the maptile status information for all 3( Preferred, Work, Home ) address |
838 // Update the maptile status information for all 3( Preferred, Work, Home ) address |
765 for( int index = 0 ; index < mAddressList.count(); index++ ) |
839 for (int index = 0; index < mAddressList.count(); index++) |
766 { |
840 { |
767 if( mAddressList[index]->mContactId == contactid && |
841 if (mAddressList[index]->mContactId == contactid && |
768 mAddressList[index]->mAddressType == addressType ) |
842 mAddressList[index]->mAddressType == addressType) |
769 { |
843 { |
770 mAddressList[index]->maptileStatus = status; |
844 mAddressList[index]->maptileStatus = status; |
771 } |
845 } |
772 } |
846 } |
773 |
847 |
774 updateSpinningIndicator(); |
848 updateSpinningIndicator(); |
775 } |
849 } |
776 |
850 |
777 /* |
851 /*! |
778 * Updates correct maptile image when screen orientation changes. |
852 Updates correct maptile image when screen orientation changes. |
779 */ |
853 */ |
780 void CntContactCardViewPrivate::updateMaptileImage() |
854 void CntContactCardViewPrivate::updateMaptileImage() |
781 { |
855 { |
782 //If there is no maptile displayed, return immediately |
856 // If there is no maptile displayed, return immediately |
783 if( mMaptileLabelList.count() > 0 ) |
857 if (mMaptileLabelList.count() > 0) |
784 { |
858 { |
785 QContactLocalId contactId = mContact->localId(); |
859 QContactLocalId contactId = mContact->localId(); |
786 |
860 |
787 QList<QContactAddress> addressDetails = mContact->details<QContactAddress>(); |
861 QList<QContactAddress> addressDetails = mContact->details<QContactAddress>(); |
788 |
862 |
789 //address |
863 //address |
790 QString contextHome(QContactAddress::ContextHome.operator QString()); |
864 QString contextHome(QContactAddress::ContextHome.operator QString()); |
791 QString contextWork(QContactAddress::ContextWork.operator QString()); |
865 QString contextWork(QContactAddress::ContextWork.operator QString()); |
792 MapTileService::AddressType sourceAddressType |
866 MapTileService::AddressType sourceAddressType |
793 = MapTileService::AddressPreference; |
867 = MapTileService::AddressPreference; |
794 |
868 |
795 QString imagePath; |
869 QString imagePath; |
796 |
870 |
797 for ( int i = 0; i < addressDetails.count(); i++ ) |
871 for (int i = 0; i < addressDetails.count(); i++) |
798 { |
872 { |
799 if ( !addressDetails[i].contexts().isEmpty() && |
873 if (!addressDetails[i].contexts().isEmpty() && |
800 addressDetails[i].contexts().at(0) == contextHome ) |
874 addressDetails[i].contexts().at(0) == contextHome) |
801 { |
875 { |
802 sourceAddressType = MapTileService::AddressHome; |
876 sourceAddressType = MapTileService::AddressHome; |
803 } |
877 } |
804 else if ( !addressDetails[i].contexts().isEmpty() && |
878 else if (!addressDetails[i].contexts().isEmpty() && |
805 addressDetails[i].contexts().at(0) == contextWork ) |
879 addressDetails[i].contexts().at(0) == contextWork) |
806 { |
880 { |
807 sourceAddressType = MapTileService::AddressWork; |
881 sourceAddressType = MapTileService::AddressWork; |
808 } |
882 } |
809 |
883 |
810 int status = mMaptile->getMapTileImage( |
884 int status = mMaptile->getMapTileImage( |
811 contactId, |
885 contactId, |
812 sourceAddressType, |
886 sourceAddressType, |
813 imagePath, |
887 imagePath, |
814 mView->mainWindow()->orientation() ); |
888 mView->mainWindow()->orientation()); |
815 if( !imagePath.isEmpty() ) |
889 if (!imagePath.isEmpty()) |
816 { |
890 { |
817 HbIcon icon( imagePath ); |
891 HbIcon icon(imagePath); |
818 HbLabel* label = mMaptileLabelList.value( sourceAddressType ); |
892 HbLabel* label = mMaptileLabelList.value(sourceAddressType); |
819 if( label ) |
893 if (label) |
820 { |
894 { |
821 setMaptileLabel( label, icon ); |
895 setMaptileLabel(label, icon); |
822 } |
896 } |
823 } |
897 } |
824 } |
898 } |
825 } |
899 } |
826 } |
900 } |
827 |
901 |
828 |
902 |
829 /* |
903 /*! |
830 * Asscoiate the maptile label widget with maptile image |
904 Asscoiate the maptile label widget with maptile image. |
831 */ |
905 */ |
832 void CntContactCardViewPrivate::setMaptileLabel( HbLabel*& mapLabel, const HbIcon& icon ) |
906 void CntContactCardViewPrivate::setMaptileLabel(HbLabel*& mapLabel, const HbIcon& icon) |
833 { |
907 { |
834 mapLabel->clear(); |
908 mapLabel->clear(); |
835 mapLabel->setIcon( icon ); |
909 mapLabel->setIcon(icon); |
836 |
910 |
837 qreal leftMarginSize; |
911 qreal leftMarginSize; |
838 mapLabel->getContentsMargins( &leftMarginSize, 0 , 0 , 0 ); |
912 mapLabel->getContentsMargins(&leftMarginSize, 0, 0, 0); |
839 mapLabel->setPreferredSize( |
913 mapLabel->setPreferredSize(QSizeF(icon.width() + leftMarginSize, icon.height())); |
840 QSizeF(icon.width() + leftMarginSize, icon.height())); |
914 } |
841 |
915 |
842 } |
916 /*! |
843 |
917 Load the maptile label based on the address type. |
844 /* |
918 */ |
845 * Load the maptile label based on the address type |
919 HbLabel* CntContactCardViewPrivate::loadMaptileLabel(int addressType) |
846 */ |
|
847 HbLabel* CntContactCardViewPrivate::loadMaptileLabel( int addressType ) |
|
848 { |
920 { |
849 HbLabel* maptileLabel = NULL; |
921 HbLabel* maptileLabel = NULL; |
850 |
922 |
851 if( addressType == MapTileService::AddressPreference ) |
923 if (addressType == MapTileService::AddressPreference) |
852 { |
924 { |
853 maptileLabel = static_cast<HbLabel*>(document()->findWidget(QString("maptilePreferenceWidget"))); |
925 maptileLabel = static_cast<HbLabel*>(document()->findWidget(QString("maptilePreferenceWidget"))); |
854 } |
926 } |
855 else if( addressType == MapTileService::AddressHome ) |
927 else if (addressType == MapTileService::AddressHome) |
856 { |
928 { |
857 maptileLabel = static_cast<HbLabel*>(document()->findWidget(QString("maptileHomeWidget"))); |
929 maptileLabel = static_cast<HbLabel*>(document()->findWidget(QString("maptileHomeWidget"))); |
858 } |
930 } |
859 else if( addressType == MapTileService::AddressWork ) |
931 else if (addressType == MapTileService::AddressWork) |
860 { |
932 { |
861 maptileLabel = static_cast<HbLabel*>(document()->findWidget(QString("maptileWorkWidget"))); |
933 maptileLabel = static_cast<HbLabel*>(document()->findWidget(QString("maptileWorkWidget"))); |
862 } |
934 } |
863 |
935 |
864 return maptileLabel; |
936 return maptileLabel; |
865 } |
937 } |
866 |
938 |