branch | RCL_3 |
changeset 24 | ea65f74e6de4 |
parent 23 | b023a8d2866a |
23:b023a8d2866a | 24:ea65f74e6de4 |
---|---|
42 #include <glxlog.h> // For Logs |
42 #include <glxlog.h> // For Logs |
43 #include <glxtracer.h> // For Logs |
43 #include <glxtracer.h> // For Logs |
44 #include <glxattributecontext.h> //attribute context |
44 #include <glxattributecontext.h> //attribute context |
45 #include <mglxmedialist.h> //for medialist |
45 #include <mglxmedialist.h> //for medialist |
46 |
46 |
47 #include "glxcontainerinfobubble.h" //intelligent class for data of infobubble |
|
48 #include "glxcloudview.hrh" |
47 #include "glxcloudview.hrh" |
49 #include "mglxcloudviewmskobserver.h" // For Msk Observer |
48 #include "mglxcloudviewmskobserver.h" // For Msk Observer |
50 #include "mglxenterkeyeventobserver.h" // For enterkey observer |
49 #include "mglxenterkeyeventobserver.h" // For enterkey observer |
51 #include "mglxcloudviewlayoutobserver.h" |
50 #include "mglxcloudviewlayoutobserver.h" |
52 #include "glxtagscontextmenucontrol.h" |
51 #include "glxtagscontextmenucontrol.h" |
60 const TInt KFontLarger = 40; |
59 const TInt KFontLarger = 40; |
61 const TInt KFontLargest = 44; |
60 const TInt KFontLargest = 44; |
62 const TInt KRowHeight = 72; |
61 const TInt KRowHeight = 72; |
63 const TInt KLeftMargin = 10; |
62 const TInt KLeftMargin = 10; |
64 const TInt KNumMinRowSpace = 2; |
63 const TInt KNumMinRowSpace = 2; |
65 const TInt KColSpace = 20; |
64 const TInt KColSpace = 30; |
66 const TInt KRightmargin = 10;//Aligning Right margin |
65 const TInt KRightmargin = 10;//Aligning Right margin |
67 const TInt KMinTagSize = 77; |
66 const TInt KMinTagSize = 77; |
68 const TInt KTagScreenHeight = 460; |
67 const TInt KTagScreenHeight = 460; |
69 const TReal KBoundaryMargin = 0.1; //10% = 10/100 = 0.1 |
68 const TReal KBoundaryMargin = 0.1; //10% = 10/100 = 0.1 |
70 const TInt KFastCloudMovement = 100; //Transition time to move cloud view |
69 const TInt KFastCloudMovement = 100; //Transition time to move cloud view |
270 // --------------------------------------------------------------------------- |
269 // --------------------------------------------------------------------------- |
271 // |
270 // |
272 TInt CGlxCloudViewControl::LayoutVisibleRows(TPoint aStartPoint,TInt aRowStartIndex |
271 TInt CGlxCloudViewControl::LayoutVisibleRows(TPoint aStartPoint,TInt aRowStartIndex |
273 , TInt aRowEndIndex) |
272 , TInt aRowEndIndex) |
274 { |
273 { |
275 TRACER("GLX_CLOUD::CGlxCloudViewControl::DrawRow"); |
274 TRACER("CGlxCloudViewControl::LayoutVisibleRows"); |
276 TSize vsize; |
275 TSize vsize; |
277 TPoint tl, br; |
276 TPoint tl, br; |
278 tl = aStartPoint; |
277 tl = aStartPoint; |
278 br.iX = 0; |
|
279 br.iY = tl.iY + KRowHeight; |
279 br.iY = tl.iY + KRowHeight; |
280 const TInt KMaxScreenWidth = iTagScreenWidth - iScrollPaneHandle.iW; |
|
280 //drawing in reverse for arabic hebrew support |
281 //drawing in reverse for arabic hebrew support |
281 if ( GlxGeneralUiUtilities::LayoutIsMirrored ()) |
282 if ( GlxGeneralUiUtilities::LayoutIsMirrored ()) |
282 { |
283 { |
283 br.iX = aStartPoint.iX; |
284 GLX_LOG_INFO("Mirrorred Layout"); |
284 const TInt KMaxScreenWidth = iTagScreenWidth - iScrollPaneHandle.iW; |
285 //In Mirrored layout, 'BottomRight' considers scrollpane width for each row |
286 br.iX = aStartPoint.iX - iScrollPaneHandle.iW; |
|
285 //Set the positions of tags in a row. |
287 //Set the positions of tags in a row. |
286 for (TInt j = aRowStartIndex; j <= aRowEndIndex; j++) |
288 for (TInt j = aRowStartIndex; j <= aRowEndIndex; j++) |
287 { |
289 { |
288 vsize = iLabels[j]->TextExtents (); |
290 vsize = iLabels[j]->TextExtents(); |
289 if ( vsize.iWidth < KMinTagSize ) |
291 if ( vsize.iWidth < KMinTagSize ) |
290 { |
292 { |
291 vsize.iWidth = KMinTagSize; |
293 vsize.iWidth = KMinTagSize; |
292 } |
294 } |
293 //If the size of the tag is more than the screen size then wrap it |
295 //If the size of the tag is more than the screen size then wrap it |
294 if (vsize.iWidth > KMaxScreenWidth) |
296 if (vsize.iWidth > KMaxScreenWidth) |
295 { |
297 { |
296 TAlfRealSize tagSize( KMaxScreenWidth, br.iY ); |
298 TAlfRealSize tagSize( KMaxScreenWidth, br.iY ); |
297 iLabels[j]->SetWrapping( CAlfTextVisual::ELineWrapTruncate ); |
299 iLabels[j]->SetWrapping( CAlfTextVisual::ELineWrapTruncate ); |
298 vsize = iLabels[j]->TextExtents (); |
|
299 tl.iX -= aStartPoint.iX; |
300 tl.iX -= aStartPoint.iX; |
300 tl.iY = aStartPoint.iY; |
301 tl.iY = aStartPoint.iY; |
301 br.iX = tagSize.iWidth; |
302 br.iX = tagSize.iWidth; |
302 } |
303 } |
303 else |
304 else |
304 { |
305 { |
305 tl.iX -= (vsize.iWidth + KColSpace); |
306 tl.iX = br.iX - vsize.iWidth; |
306 } |
307 } |
308 |
|
307 //Set the anchor points for the tags |
309 //Set the anchor points for the tags |
308 iLayout->SetAnchor (EAlfAnchorTopLeft, iLayoutIndex, |
310 iLayout->SetAnchor (EAlfAnchorTopLeft, iLayoutIndex, |
309 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
311 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
310 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
312 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
311 TAlfTimedPoint (tl.iX, tl.iY)); |
313 TAlfTimedPoint (tl.iX, tl.iY)); |
312 iLayout->SetAnchor (EAlfAnchorBottomRight, iLayoutIndex, |
314 iLayout->SetAnchor (EAlfAnchorBottomRight, iLayoutIndex, |
313 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
315 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
314 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
316 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
315 TAlfTimedPoint (br.iX, br.iY)); |
317 TAlfTimedPoint (br.iX, br.iY)); |
318 //Bottom-Right corner for next tag in same row |
|
316 br.iX -= (vsize.iWidth + KColSpace); |
319 br.iX -= (vsize.iWidth + KColSpace); |
317 iLayoutIndex += 1; |
320 iLayoutIndex += 1; |
318 } |
321 } |
319 |
|
320 } |
322 } |
321 else |
323 else |
322 { |
324 { |
323 const TInt KMaxScreenWidth = iTagScreenWidth - iScrollPaneHandle.iW; |
325 GLX_LOG_INFO("NOT Mirrorred Layout"); |
324 for (TInt j = aRowStartIndex; j <= aRowEndIndex; j++) |
326 for (TInt j = aRowStartIndex; j <= aRowEndIndex; j++) |
325 { |
327 { |
326 vsize = iLabels[j]->TextExtents (); |
328 vsize = iLabels[j]->TextExtents(); |
327 if( vsize.iWidth < KMinTagSize ) |
329 if( vsize.iWidth < KMinTagSize ) |
328 { |
330 { |
329 vsize.iWidth = KMinTagSize; |
331 vsize.iWidth = KMinTagSize; |
330 } |
332 } |
331 if (vsize.iWidth > KMaxScreenWidth) |
333 if (vsize.iWidth > KMaxScreenWidth) |
332 { |
334 { |
333 TAlfRealSize tagSize( KMaxScreenWidth, br.iY ); |
335 TAlfRealSize tagSize( KMaxScreenWidth, br.iY ); |
334 TAlfRealPoint startPos( aStartPoint.iX, 0 ); |
|
335 iLabels[j]->SetWrapping( CAlfTextVisual::ELineWrapTruncate ); |
336 iLabels[j]->SetWrapping( CAlfTextVisual::ELineWrapTruncate ); |
336 tl.iX = aStartPoint.iX; |
337 tl.iX = aStartPoint.iX; |
337 tl.iY = aStartPoint.iY; |
338 tl.iY = aStartPoint.iY; |
338 br.iX = tagSize.iWidth; |
339 br.iX = tagSize.iWidth; |
339 } |
340 } |
340 else |
341 else |
341 { |
342 { |
342 br.iX += vsize.iWidth + KColSpace; |
343 br.iX = tl.iX + vsize.iWidth; |
343 } |
344 } |
345 |
|
344 iLayout->SetAnchor (EAlfAnchorTopLeft, iLayoutIndex, |
346 iLayout->SetAnchor (EAlfAnchorTopLeft, iLayoutIndex, |
345 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
347 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
346 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
348 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
347 TAlfTimedPoint (tl.iX, tl.iY)); |
349 TAlfTimedPoint (tl.iX, tl.iY)); |
348 iLayout->SetAnchor (EAlfAnchorBottomRight, iLayoutIndex, |
350 iLayout->SetAnchor (EAlfAnchorBottomRight, iLayoutIndex, |
349 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
351 EAlfAnchorOriginLeft, EAlfAnchorOriginTop, |
350 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
352 EAlfAnchorMetricAbsolute, EAlfAnchorMetricAbsolute, |
351 TAlfTimedPoint (br.iX, br.iY)); |
353 TAlfTimedPoint (br.iX, br.iY)); |
352 tl.iX = br.iX; |
354 //Top-Left Corner for next tag in same row |
355 tl.iX += (vsize.iWidth + KColSpace); |
|
353 iLayoutIndex += 1; |
356 iLayoutIndex += 1; |
354 } |
357 } |
355 } |
358 } |
356 return 0; |
359 return 0; |
357 } |
360 } |
358 |
|
359 |
|
360 |
|
361 |
361 |
362 // --------------------------------------------------------------------------- |
362 // --------------------------------------------------------------------------- |
363 // LayoutVisibleArea() |
363 // LayoutVisibleArea() |
364 // |
364 // |
365 // --------------------------------------------------------------------------- |
365 // --------------------------------------------------------------------------- |
366 void CGlxCloudViewControl::LayoutVisibleArea() |
366 void CGlxCloudViewControl::LayoutVisibleArea() |
367 { |
367 { |
368 TRACER("CGlxCloudViewControl::LayoutVisibleArea"); |
|
368 //screen height for boundary check:how many rows fit in. |
369 //screen height for boundary check:how many rows fit in. |
369 //find out how many rows can fit in. |
370 //find out how many rows can fit in. |
370 //add upper and lower margin spacing 5 pixels |
371 //add upper and lower margin spacing 5 pixels |
371 |
372 |
372 //draw the row on screens |
373 //draw the row on screens |
375 //If the layout is arabic hebrew then start positioning of tags from end |
376 //If the layout is arabic hebrew then start positioning of tags from end |
376 if ( GlxGeneralUiUtilities::LayoutIsMirrored ()) |
377 if ( GlxGeneralUiUtilities::LayoutIsMirrored ()) |
377 { |
378 { |
378 startpoint.iX = iTagScreenWidth - KRightmargin; |
379 startpoint.iX = iTagScreenWidth - KRightmargin; |
379 } |
380 } |
380 |
381 //else start from beginning |
381 //else start from biginning |
|
382 else |
382 else |
383 { |
383 { |
384 startpoint.iX = KLeftMargin; |
384 startpoint.iX = KLeftMargin; |
385 } |
385 } |
386 startpoint.iY = KNumMinRowSpace; |
386 startpoint.iY = KNumMinRowSpace; |
387 |
|
387 //associate the active visuals with anchor layout |
388 //associate the active visuals with anchor layout |
388 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Layout reset"); |
389 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea Layout reset"); |
389 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea layout Count after reset %d ", iLayout->Count ()); |
390 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea layout Count after reset %d ", iLayout->Count ()); |
390 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea iCloudInfo[0].iStartIndex %d ", iCloudInfo[0].iStartIndex); |
391 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::::LayoutVisibleArea iCloudInfo[0].iStartIndex %d ", iCloudInfo[0].iStartIndex); |
391 TInt endindex = iCloudInfo.Count()-1; |
392 TInt endindex = iCloudInfo.Count()-1; |
392 |
393 |
393 for (TInt j = iCloudInfo[0].iStartIndex; j <=iCloudInfo[endindex].iEndIndex; j++) |
394 for (TInt j = iCloudInfo[0].iStartIndex; j <=iCloudInfo[endindex].iEndIndex; j++) |
394 { |
395 { |
395 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::FindEndRowIndex Entering layout append"); |
396 GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::::FindEndRowIndex Entering layout append"); |
396 |
397 |
397 |
|
398 TAlfTimedValue opacity; |
398 TAlfTimedValue opacity; |
399 opacity.SetValueNow(1.0); // immediate change |
399 opacity.SetValueNow(1.0); // immediate change |
400 iLabels[j]->SetOpacity(opacity); |
400 iLabels[j]->SetOpacity(opacity); |
401 } |
401 } |
402 |
402 |
445 { |
445 { |
446 ((IAlfScrollBarModel *)(iScrollBarWidget->model()))->changeData(iScrollEventData.mSpan, |
446 ((IAlfScrollBarModel *)(iScrollBarWidget->model()))->changeData(iScrollEventData.mSpan, |
447 iScrollEventData.mViewLength, |
447 iScrollEventData.mViewLength, |
448 0); |
448 0); |
449 DisplayScrollBar(); |
449 DisplayScrollBar(); |
450 } |
450 } |
451 //constructing the bubblecontainer |
|
452 CreateBubleContainer(); |
|
453 |
451 |
454 iLayout->UpdateChildrenLayout (); //update layout |
452 iLayout->UpdateChildrenLayout (); //update layout |
455 |
453 |
456 HandleLayoutFocusChange (); |
454 HandleLayoutFocusChange (); |
457 |
455 |
458 MoveDownIfRequired(); |
456 MoveDownIfRequired(); |
459 } |
457 } |
460 |
|
461 |
458 |
462 // --------------------------------------------------------------------------- |
459 // --------------------------------------------------------------------------- |
463 // OfferEventL() |
460 // OfferEventL() |
464 // --------------------------------------------------------------------------- |
461 // --------------------------------------------------------------------------- |
465 // |
462 // |
647 } |
644 } |
648 |
645 |
649 iScrollDirection = 1; |
646 iScrollDirection = 1; |
650 } |
647 } |
651 |
648 |
652 |
|
653 // --------------------------------------------------------------------------- |
649 // --------------------------------------------------------------------------- |
654 // HandleKeyDown() |
650 // HandleKeyDown() |
655 // --------------------------------------------------------------------------- |
651 // --------------------------------------------------------------------------- |
656 // |
652 // |
657 void CGlxCloudViewControl::HandleKeyDownL() |
653 void CGlxCloudViewControl::HandleKeyDownL() |
689 //to highlight focused element |
685 //to highlight focused element |
690 SetFocusColor(); |
686 SetFocusColor(); |
691 } |
687 } |
692 } |
688 } |
693 |
689 |
694 |
|
695 // --------------------------------------------------------------------------- |
690 // --------------------------------------------------------------------------- |
696 // FocusUpdate() |
691 // FocusUpdate() |
697 // --------------------------------------------------------------------------- |
692 // --------------------------------------------------------------------------- |
698 // |
693 // |
699 void CGlxCloudViewControl::FocusUpdate() |
694 void CGlxCloudViewControl::FocusUpdate() |
704 iFocusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
699 iFocusRowIndex = RowNumber (iMediaList.FocusIndex ()); |
705 iEndRowIndex = iCloudInfo.Count()-1; |
700 iEndRowIndex = iCloudInfo.Count()-1; |
706 LayoutVisibleArea(); |
701 LayoutVisibleArea(); |
707 } |
702 } |
708 |
703 |
709 |
|
710 // --------------------------------------------------------------------------- |
704 // --------------------------------------------------------------------------- |
711 // ResetLayout() |
705 // ResetLayout() |
712 // --------------------------------------------------------------------------- |
706 // --------------------------------------------------------------------------- |
713 // |
707 // |
714 void CGlxCloudViewControl::UpdateLayout() |
708 void CGlxCloudViewControl::UpdateLayout() |
721 iLabels[i] = NULL; |
715 iLabels[i] = NULL; |
722 } |
716 } |
723 iLabels.Reset(); |
717 iLabels.Reset(); |
724 } |
718 } |
725 |
719 |
726 |
|
727 // --------------------------------------------------------------------------- |
720 // --------------------------------------------------------------------------- |
728 // GetRownum() |
721 // GetRownum() |
729 // --------------------------------------------------------------------------- |
722 // --------------------------------------------------------------------------- |
730 // |
723 // |
731 TInt CGlxCloudViewControl::RowNumber(TInt aItemIndex) const |
724 TInt CGlxCloudViewControl::RowNumber(TInt aItemIndex) const |
732 { |
725 { |
733 |
726 TRACER("GLX_CLOUD::CGlxCloudViewControl::GetRownum"); |
734 TRACER("GLX_CLOUD::CGlxCloudViewControl::GetRownum"); |
727 //Get the rownumber of the given item index. |
735 //Get the rownumber of the given item index. |
728 TInt i; |
736 TInt i; |
729 for (i = 0; i < iCloudInfo.Count(); i++) |
737 for (i = 0; i < iCloudInfo.Count (); i++) |
730 { |
738 { |
731 if ((aItemIndex >= iCloudInfo[i].iStartIndex) && (aItemIndex |
739 if ( (aItemIndex >= iCloudInfo[i].iStartIndex) && (aItemIndex <=iCloudInfo[i].iEndIndex)) |
732 <= iCloudInfo[i].iEndIndex)) |
740 break; |
733 break; |
741 } |
734 } |
742 return i; |
735 return i; |
743 |
736 } |
744 } |
|
745 |
737 |
746 // --------------------------------------------------------------------------- |
738 // --------------------------------------------------------------------------- |
747 // FetchAttributeFromCacheL() |
739 // FetchAttributeFromCacheL() |
748 // --------------------------------------------------------------------------- |
740 // --------------------------------------------------------------------------- |
749 // |
741 // |
772 TGlxMedia item = iMediaList.Item( i ); |
764 TGlxMedia item = iMediaList.Item( i ); |
773 // get the title and set it to the text visual |
765 // get the title and set it to the text visual |
774 iLabels[i]->SetTextL( item.Title() ); |
766 iLabels[i]->SetTextL( item.Title() ); |
775 } |
767 } |
776 } |
768 } |
777 |
|
778 |
769 |
779 //medialist Observers |
770 //medialist Observers |
780 |
771 |
781 // --------------------------------------------------------------------------- |
772 // --------------------------------------------------------------------------- |
782 // HandleItemAddedL(). |
773 // HandleItemAddedL(). |
811 UpdateRowDataL (); //updates the row data and reassigns font sizes and draw the layout on screen. |
802 UpdateRowDataL (); //updates the row data and reassigns font sizes and draw the layout on screen. |
812 } |
803 } |
813 |
804 |
814 InitPhysicsL(); |
805 InitPhysicsL(); |
815 } |
806 } |
816 |
|
817 |
807 |
818 // --------------------------------------------------------------------------- |
808 // --------------------------------------------------------------------------- |
819 // HandleMediaL(). |
809 // HandleMediaL(). |
820 // --------------------------------------------------------------------------- |
810 // --------------------------------------------------------------------------- |
821 // |
811 // |
967 // --------------------------------------------------------------------------- |
957 // --------------------------------------------------------------------------- |
968 //UpdateRowDataL() |
958 //UpdateRowDataL() |
969 // --------------------------------------------------------------------------- |
959 // --------------------------------------------------------------------------- |
970 // |
960 // |
971 void CGlxCloudViewControl::UpdateRowDataL() |
961 void CGlxCloudViewControl::UpdateRowDataL() |
972 |
|
973 { |
962 { |
974 TRACER("GLX_CLOUD::CGlxCloudViewControl::UpdateRowData()"); |
963 TRACER("GLX_CLOUD::CGlxCloudViewControl::UpdateRowData()"); |
975 |
964 |
976 TInt rowStartingTagIndex = 0; |
965 TInt rowStartingTagIndex = 0; |
977 TInt lastRowStartTagIndex = 0; |
966 TInt lastRowStartTagIndex = 0; |
989 |
978 |
990 |
979 |
991 //Setting the Font Styles based on association counts |
980 //Setting the Font Styles based on association counts |
992 //Finding the maximum value of image association |
981 //Finding the maximum value of image association |
993 //Determining the Font(Style) for each visual |
982 //Determining the Font(Style) for each visual |
994 TInt maxCount= MaxUsageCount (); //Maximum Association count |
983 TInt maxCount = MaxUsageCount (); //Maximum Association count |
995 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData mediaCount %d ", maxCount); |
984 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData mediaCount %d ", maxCount); |
996 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData iLabels.Count() %d ",iLabels.Count()); |
985 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData iLabels.Count() %d ",iLabels.Count()); |
997 if ( 0 == maxCount ) |
986 if ( 0 == maxCount ) |
998 { |
987 { |
999 return; //do not proceed if max count is zero |
988 return; //do not proceed if max count is zero |
1028 { |
1017 { |
1029 rowHeight = currentTagSize.iHeight; |
1018 rowHeight = currentTagSize.iHeight; |
1030 } |
1019 } |
1031 |
1020 |
1032 // Current row width will be progressively incremented to fit as many tags as possible |
1021 // Current row width will be progressively incremented to fit as many tags as possible |
1033 rowWidth += currentTagSize.iWidth + 10; |
1022 rowWidth += currentTagSize.iWidth + KColSpace; |
1034 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData currentTagSize.iWidth %d ", currentTagSize.iWidth); |
1023 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData currentTagSize.iWidth %d ", currentTagSize.iWidth); |
1035 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData rowWidth %d ", rowWidth); |
1024 GLX_LOG_INFO1("GLX_CLOUD ::CGlxCloudViewControl::UpdateRowData rowWidth %d ", rowWidth); |
1036 |
1025 |
1037 // If the tag size crosses the Screen Size, Then wrap it. |
1026 // If the tag size crosses the Screen Size, Then wrap it. |
1038 if ( currentTagSize.iWidth > KMaxScreenWidth ) |
1027 if ( currentTagSize.iWidth > KMaxScreenWidth ) |
1052 |
1041 |
1053 // If the current row's width is overflowing the screen width |
1042 // If the current row's width is overflowing the screen width |
1054 // then we must fit the current visual into the next row. |
1043 // then we must fit the current visual into the next row. |
1055 // Do that check now and adjust accordingly. |
1044 // Do that check now and adjust accordingly. |
1056 // Fix for EAHN-7BZD78 is to exclude the gap value between the row's tags from the logic |
1045 // Fix for EAHN-7BZD78 is to exclude the gap value between the row's tags from the logic |
1057 else if ( rowWidth - 10 > KMaxScreenWidth ) |
1046 else if ( rowWidth - KColSpace > KMaxScreenWidth ) |
1058 { |
1047 { |
1059 GLX_LOG_INFO("GLX_CLOUD :: CGlxCloudViewControl::UpdateRowData Row added"); |
1048 GLX_LOG_INFO("GLX_CLOUD :: CGlxCloudViewControl::UpdateRowData Row added"); |
1060 lastRowStartTagIndex = currentTagIndex - 1; |
1049 lastRowStartTagIndex = currentTagIndex - 1; |
1061 AppendToCloudArrayL( cloudInfo,rowStartingTagIndex, lastRowStartTagIndex ); |
1050 AppendToCloudArrayL( cloudInfo,rowStartingTagIndex, lastRowStartTagIndex ); |
1062 lastRowStartTagIndex++; |
1051 lastRowStartTagIndex++; |
1265 void CGlxCloudViewControl::SetFocusColor() |
1254 void CGlxCloudViewControl::SetFocusColor() |
1266 { |
1255 { |
1267 iLabels[iMediaList.FocusIndex()]->SetColor (KAknsIIDQsnHighlightColors ,EAknsCIQsnHighlightColorsCG3); |
1256 iLabels[iMediaList.FocusIndex()]->SetColor (KAknsIIDQsnHighlightColors ,EAknsCIQsnHighlightColorsCG3); |
1268 } |
1257 } |
1269 |
1258 |
1270 |
|
1271 // --------------------------------------------------------------------------- |
1259 // --------------------------------------------------------------------------- |
1272 // SetBubleMidPoint() |
1260 // SetBubleMidPoint() |
1273 // --------------------------------------------------------------------------- |
1261 // --------------------------------------------------------------------------- |
1274 // |
1262 // |
1275 void CGlxCloudViewControl::SetBubleMidPoint(TPoint& aMidPoint) |
1263 void CGlxCloudViewControl::SetBubleMidPoint(TPoint& aMidPoint) |
1276 { |
1264 { |
1277 TRACER("GLX_CLOUD::CGlxCloudViewControl::SetBubleMidPoint"); |
1265 TRACER("GLX_CLOUD::CGlxCloudViewControl::SetBubleMidPoint"); |
1278 //Substract the viewport position so as to set the buble at the right position on the screen |
1266 //Substract the viewport position so as to set the buble at the right position on the screen |
1279 aMidPoint.iX-=iViewPortPosition.iX; |
1267 aMidPoint.iX-=iViewPortPosition.iX; |
1280 aMidPoint.iY-=iViewPortPosition.iY; |
1268 aMidPoint.iY-=iViewPortPosition.iY; |
1281 } |
|
1282 |
|
1283 // --------------------------------------------------------------------------- |
|
1284 // CreateBubleContainer() |
|
1285 // --------------------------------------------------------------------------- |
|
1286 // |
|
1287 void CGlxCloudViewControl::CreateBubleContainer() |
|
1288 { |
|
1289 } |
1269 } |
1290 |
1270 |
1291 // --------------------------------------------------------------------------- |
1271 // --------------------------------------------------------------------------- |
1292 // MoveUpIfRequired() |
1272 // MoveUpIfRequired() |
1293 // --------------------------------------------------------------------------- |
1273 // --------------------------------------------------------------------------- |
1320 } |
1300 } |
1321 iViewPortLayout->SetViewportPos(iViewPortPosition, KSlowCloudMovement); |
1301 iViewPortLayout->SetViewportPos(iViewPortPosition, KSlowCloudMovement); |
1322 iScrollEventData.mViewStartPos = iViewPortPosition.iY; |
1302 iScrollEventData.mViewStartPos = iViewPortPosition.iY; |
1323 Scroll(); |
1303 Scroll(); |
1324 } |
1304 } |
1325 |
|
1326 |
1305 |
1327 // --------------------------------------------------------------------------- |
1306 // --------------------------------------------------------------------------- |
1328 // MoveDownIfRequired() |
1307 // MoveDownIfRequired() |
1329 // --------------------------------------------------------------------------- |
1308 // --------------------------------------------------------------------------- |
1330 // |
1309 // |
1866 { |
1845 { |
1867 TRect rect; |
1846 TRect rect; |
1868 AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect); |
1847 AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect); |
1869 if ((rect.Width() != (iTagScreenWidth + KRightmargin)) || (rect.Height() != iScreenHeight)) |
1848 if ((rect.Width() != (iTagScreenWidth + KRightmargin)) || (rect.Height() != iScreenHeight)) |
1870 { |
1849 { |
1871 //set the new screen dimensions |
1850 //set the new screen dimensions |
1872 iScreenHeight=rect.Height(); |
1851 iScreenHeight = rect.Height(); |
1873 iTagScreenWidth = rect.Width()- KRightmargin; |
1852 iTagScreenWidth = rect.Width() - KRightmargin; |
1874 if(IsLandscape()) |
1853 if (IsLandscape()) |
1875 { |
1854 { |
1876 iTagScreenHeight = rect.Height(); |
1855 iTagScreenHeight = rect.Height(); |
1877 } |
1856 } |
1878 else |
1857 else |
1879 { |
1858 { |
1880 iTagScreenHeight = KTagScreenHeight; |
1859 iTagScreenHeight = KTagScreenHeight; |
1881 } |
1860 } |
1882 |
1861 |
1883 iViewPortLayout->SetSize(TAlfRealSize(iTagScreenWidth,iTagScreenHeight), 0); |
1862 iViewPortLayout->SetSize( |
1884 //delete all layout associations |
1863 TAlfRealSize(iTagScreenWidth, iTagScreenHeight), 0); |
1885 if ( iCloudInfo.Count ()!= 0)//check for the empty cloud view |
1864 //delete all layout associations |
1886 { |
1865 if (iCloudInfo.Count() != 0)//check for the empty cloud view |
1887 UpdateLayout(); |
1866 { |
1888 FetchAttributeFromCacheL(); |
1867 UpdateLayout(); |
1889 //generate row structures and draw rows on screen |
1868 FetchAttributeFromCacheL(); |
1890 UpdateRowDataL (); |
1869 //generate row structures and draw rows on screen |
1891 |
1870 UpdateRowDataL(); |
1892 InitPhysicsL(); |
1871 |
1893 } |
1872 InitPhysicsL(); |
1894 } |
1873 } |
1874 } |
|
1895 } |
1875 } |
1896 |
1876 |
1897 // --------------------------------------------------------------------------- |
1877 // --------------------------------------------------------------------------- |
1898 // InitPhysicsL() |
1878 // InitPhysicsL() |
1899 // --------------------------------------------------------------------------- |
1879 // --------------------------------------------------------------------------- |
1961 else |
1941 else |
1962 { |
1942 { |
1963 return EFalse; |
1943 return EFalse; |
1964 } |
1944 } |
1965 } |
1945 } |
1946 |
|
1966 // --------------------------------------------------------------------------- |
1947 // --------------------------------------------------------------------------- |
1967 // TimerCompleteL() |
1948 // TimerCompleteL() |
1968 // --------------------------------------------------------------------------- |
1949 // --------------------------------------------------------------------------- |
1969 // |
1950 // |
1970 void CGlxCloudViewControl::TimerCompleteL() |
1951 void CGlxCloudViewControl::TimerCompleteL() |
1988 iTagsContextMenuControl->SetViewableRect(rect); |
1969 iTagsContextMenuControl->SetViewableRect(rect); |
1989 iTagsContextMenuControl->ShowItemMenuL(ETrue); |
1970 iTagsContextMenuControl->ShowItemMenuL(ETrue); |
1990 iTagsContextMenuControl->SetDisplay(midpoint); |
1971 iTagsContextMenuControl->SetDisplay(midpoint); |
1991 } |
1972 } |
1992 } |
1973 } |
1974 |
|
1993 // --------------------------------------------------------------------------- |
1975 // --------------------------------------------------------------------------- |
1994 // ShowContextItemMenuL() |
1976 // ShowContextItemMenuL() |
1995 // --------------------------------------------------------------------------- |
1977 // --------------------------------------------------------------------------- |
1996 // |
1978 // |
1997 void CGlxCloudViewControl::ShowContextItemMenuL(TBool aShow) |
1979 void CGlxCloudViewControl::ShowContextItemMenuL(TBool aShow) |