uifw/EikStd/coctlsrc/eikspmod.cpp
branchRCL_3
changeset 56 d48ab3b357f1
parent 55 aecbbf00d063
equal deleted inserted replaced
55:aecbbf00d063 56:d48ab3b357f1
     1 /*
     1 /*
     2 * Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002-2010 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
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   618 	            case EEikStatusPaneUidBattery: 
   618 	            case EEikStatusPaneUidBattery: 
   619 	                {
   619 	                {
   620 	                if (Layout_Meta_Data::IsLandscapeOrientation())
   620 	                if (Layout_Meta_Data::IsLandscapeOrientation())
   621 	                     {
   621 	                     {
   622 	                     TAknLayoutRect layoutRect;
   622 	                     TAknLayoutRect layoutRect;
   623 	                     TAknWindowComponentLayout parentLayout = aknLayoutScalable_Avkon.area_top_pane(8);
   623 	                     layoutRect.LayoutRect(
   624 	                     layoutRect.LayoutRect(screenRect, parentLayout.LayoutLine());
   624 	                         screenRect,
       
   625 	                         aknLayoutScalable_Avkon.area_top_pane( 2 ) );
   625 	                     parentRect = layoutRect.Rect();
   626 	                     parentRect = layoutRect.Rect();
   626 	                     layout = aknLayoutScalable_Avkon.battery_pane(2).LayoutLine();
   627 	                     layout = aknLayoutScalable_Avkon.battery_pane( 14 ).LayoutLine();
   627 	                     }
   628 	                     }
   628 	                 else
   629 	                 else
   629 	                     {
   630 	                     {
   630 	                     parentRect = usualStatusPaneRect;
   631 	                     parentRect = usualStatusPaneRect;
   631 	                     layout = aknLayout.battery_pane(parentRect);
   632 	                     layout = aknLayout.battery_pane(parentRect);
  1362             if ( Layout_Meta_Data::IsLandscapeOrientation() ) // only usable in landscape
  1363             if ( Layout_Meta_Data::IsLandscapeOrientation() ) // only usable in landscape
  1363 	            {
  1364 	            {
  1364                 TAknLayoutRect layout1ParentRect;
  1365                 TAknLayoutRect layout1ParentRect;
  1365                 layout1ParentRect.LayoutRect(
  1366                 layout1ParentRect.LayoutRect(
  1366                     iLayout->iApplicationWindowRect,
  1367                     iLayout->iApplicationWindowRect,
  1367                     iLayout->iAknLayoutScalable_Avkon.area_top_pane( 19 ).LayoutLine() );
  1368                     iLayout->iAknLayoutScalable_Avkon.area_top_pane( 2 ).LayoutLine() );
  1368                 TAknLayoutRect layout1Rect;
  1369                 TAknLayoutRect layout1Rect;
  1369                 layout1Rect.LayoutRect(
  1370                 layout1Rect.LayoutRect(
  1370                     layout1ParentRect.Rect(),
  1371                     layout1ParentRect.Rect(),
  1371                     iLayout->iAknLayoutScalable_Avkon.status_pane( 4 ).LayoutLine() );
  1372                     iLayout->iAknLayoutScalable_Avkon.status_pane( 1 ).LayoutLine() );
  1372                 parentRect = layout1Rect.Rect();
  1373                 parentRect = layout1Rect.Rect();
  1373                 
  1374                 
  1374                 switch ( aPaneId.iUid )
  1375                 switch ( aPaneId.iUid )
  1375                     {
  1376                     {
  1376                     case EEikStatusPaneUidNavi: 
  1377                     case EEikStatusPaneUidNavi: 
  1380                         break;
  1381                         break;
  1381                         }
  1382                         }
  1382                     case EEikStatusPaneUidSignal:
  1383                     case EEikStatusPaneUidSignal:
  1383                         {
  1384                         {
  1384                         layout =
  1385                         layout =
  1385                             aknLayoutScalable_Avkon.signal_pane( 11 ).LayoutLine();
  1386                             aknLayoutScalable_Avkon.signal_pane( 14 ).LayoutLine();
  1386                         break;
  1387                         break;
  1387                         }
  1388                         }
  1388                     case EEikStatusPaneUidTitle:
  1389                     case EEikStatusPaneUidTitle:
  1389                         {
  1390                         {
  1390                         layout =
  1391                         layout =
  1391                             aknLayoutScalable_Avkon.title_pane( 11 ).LayoutLine();                    
  1392                             aknLayoutScalable_Avkon.title_pane( 11 ).LayoutLine();                    
  1392                         break;
  1393                         break;
  1393                         }
  1394                         }
  1394                     case EEikStatusPaneUidIndic:
  1395                     case EEikStatusPaneUidIndic:
  1395                         {
  1396                         {
  1396                         layout =
  1397                         TAknWindowComponentLayout nstaClockIndicPane(
  1397                             aknLayoutScalable_Avkon.uni_indicator_pane( 3 ).LayoutLine();
  1398                             DoCompose(
       
  1399                                 aknLayoutScalable_Avkon.area_bottom_pane( 2 ),
       
  1400                                 DoCompose(
       
  1401                                     aknLayoutScalable_Avkon.control_pane(),
       
  1402                                     aknLayoutScalable_Avkon.nsta_clock_indic_pane() ) ) );
       
  1403                         TAknLayoutRect layoutRect;
       
  1404                         layoutRect.LayoutRect( applicationWindowRect,
       
  1405                                                nstaClockIndicPane );
       
  1406                         parentRect = layoutRect.Rect();
       
  1407                         
       
  1408                         layout = aknLayoutScalable_Avkon.indicator_nsta_pane_cp().LayoutLine();
       
  1409                         layoutRect.LayoutRect( parentRect, layout );
       
  1410                         paneRect = layoutRect.Rect();
       
  1411                         
       
  1412                         // Digital clock pane resides inside the
       
  1413                         // combined pane, so it must be made relative to the
       
  1414                         // combined pane rectangle instead of the screen.
       
  1415                         paneRect.Move( applicationWindowRect.iTl.iX - parentRect.iTl.iX,
       
  1416                                        applicationWindowRect.iTl.iY - parentRect.iTl.iY );
  1398                         break;
  1417                         break;
  1399                         }
  1418                         }
  1400                     case EEikStatusPaneUidBattery:
  1419                     case EEikStatusPaneUidBattery:
  1401                         {
  1420                         {
  1402                         layout =
  1421                         layout =
  1403                             aknLayoutScalable_Avkon.battery_pane( 11 ).LayoutLine();
  1422                             aknLayoutScalable_Avkon.battery_pane( 14 ).LayoutLine();
       
  1423                         break;
       
  1424                         }
       
  1425                     case EEikStatusPaneUidDigitalClock:
       
  1426                         {
       
  1427                         TAknWindowComponentLayout nstaClockIndicPane(
       
  1428                             DoCompose(
       
  1429                                 aknLayoutScalable_Avkon.area_bottom_pane( 2 ),
       
  1430                                 DoCompose(
       
  1431                                     aknLayoutScalable_Avkon.control_pane(),
       
  1432                                     aknLayoutScalable_Avkon.nsta_clock_indic_pane() ) ) );
       
  1433                         TAknLayoutRect layoutRect;
       
  1434                         layoutRect.LayoutRect( applicationWindowRect,
       
  1435                                                nstaClockIndicPane );
       
  1436                         parentRect = layoutRect.Rect();
       
  1437                         
       
  1438                         layout = aknLayoutScalable_Avkon.clock_nsta_pane_cp().LayoutLine();
       
  1439                         layoutRect.LayoutRect( parentRect, layout );
       
  1440                         paneRect = layoutRect.Rect();
       
  1441                         
       
  1442                         // Digital clock pane resides inside the
       
  1443                         // combined pane, so it must be made relative to the
       
  1444                         // combined pane rectangle instead of the screen.
       
  1445                         paneRect.Move( applicationWindowRect.iTl.iX - parentRect.iTl.iX,
       
  1446                                        applicationWindowRect.iTl.iY - parentRect.iTl.iY );
       
  1447                         break;
       
  1448                         }
       
  1449                     case EEikStatusPaneUidCombined:
       
  1450                         {
       
  1451                         TAknWindowComponentLayout nstaClockIndicPane(
       
  1452                             DoCompose(
       
  1453                                 aknLayoutScalable_Avkon.area_bottom_pane( 2 ),
       
  1454                                 DoCompose(
       
  1455                                     aknLayoutScalable_Avkon.control_pane(),
       
  1456                                     aknLayoutScalable_Avkon.nsta_clock_indic_pane() ) ) );
       
  1457                         layout = nstaClockIndicPane.LayoutLine();
       
  1458                         parentRect = applicationWindowRect;
  1404                         break;
  1459                         break;
  1405                         }
  1460                         }
  1406                     }
  1461                     }
  1407 	            }
  1462 	            }
  1408             break;
  1463             break;
  1424                 
  1479                 
  1425                 switch ( aPaneId.iUid )
  1480                 switch ( aPaneId.iUid )
  1426                     {
  1481                     {
  1427                     case EEikStatusPaneUidNavi: 
  1482                     case EEikStatusPaneUidNavi: 
  1428                         {
  1483                         {
  1429                         layout =
  1484                         if ( aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS )
  1430                             aknLayoutScalable_Avkon.navi_pane( 11 ).LayoutLine();
  1485                             {
       
  1486                             layout =
       
  1487                                 aknLayoutScalable_Avkon.navi_pane( 2 ).LayoutLine();
       
  1488                             }
       
  1489                         else
       
  1490                             {
       
  1491                             layout =
       
  1492                                 aknLayoutScalable_Avkon.navi_pane( 11 ).LayoutLine();
       
  1493                             }
  1431                         break;
  1494                         break;
  1432                         }
  1495                         }
  1433                     case EEikStatusPaneUidSignal:
  1496                     case EEikStatusPaneUidSignal:
  1434                         {
  1497                         {
  1435                         layout =
  1498                         if (aLayoutId
  1436                             aknLayoutScalable_Avkon.signal_pane( 13 ).LayoutLine();
  1499                                 == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS)
       
  1500                             {
       
  1501                             layout
       
  1502                                     = aknLayoutScalable_Avkon.signal_pane(2).LayoutLine();
       
  1503                             }
       
  1504                         else
       
  1505                             {
       
  1506                             layout
       
  1507                                     = aknLayoutScalable_Avkon.signal_pane(13).LayoutLine();
       
  1508                             }                       
  1437                         break;
  1509                         break;
  1438                         }
  1510                         }
  1439                     case EEikStatusPaneUidTitle:
  1511                     case EEikStatusPaneUidTitle:
  1440                         {
  1512                         {
  1441                         layout =
  1513                         if ( aLayoutId == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS )
  1442                             aknLayoutScalable_Avkon.title_pane( 13 ).LayoutLine();                    
  1514                             {
       
  1515                             layout =
       
  1516                                 aknLayoutScalable_Avkon.title_pane( 2 ).LayoutLine();
       
  1517                             }
       
  1518                         else
       
  1519                             {
       
  1520                             layout =
       
  1521                                 aknLayoutScalable_Avkon.title_pane( 13 ).LayoutLine();
       
  1522                             }
  1443                         break;
  1523                         break;
  1444                         }
  1524                         }
  1445                     case EEikStatusPaneUidIndic:
  1525                     case EEikStatusPaneUidIndic:
  1446                         {
  1526                         {
  1447                         layout =
  1527                         if (aLayoutId
  1448                             aknLayoutScalable_Avkon.uni_indicator_pane( 5 ).LayoutLine();
  1528                                 == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS)
       
  1529                             {
       
  1530                             layout
       
  1531                                     = aknLayoutScalable_Avkon.uni_indicator_pane( 1 ).LayoutLine();
       
  1532                             }
       
  1533                         else
       
  1534                             {
       
  1535                             layout
       
  1536                                     = aknLayoutScalable_Avkon.uni_indicator_pane( 5 ).LayoutLine();
       
  1537                             }
  1449                         break;
  1538                         break;
  1450                         }
  1539                         }
  1451                     case EEikStatusPaneUidBattery:
  1540                     case EEikStatusPaneUidBattery:
  1452                         {
  1541                         {
  1453                         layout =
  1542                          if (aLayoutId
  1454                             aknLayoutScalable_Avkon.battery_pane( 13 ).LayoutLine();
  1543                                 == R_AVKON_WIDESCREEN_PANE_LAYOUT_IDLE_FLAT_NO_SOFTKEYS)
       
  1544                             {
       
  1545                             layout
       
  1546                                     = aknLayoutScalable_Avkon.battery_pane(2).LayoutLine();
       
  1547                             }
       
  1548                         else
       
  1549                             {
       
  1550                             layout
       
  1551                                     = aknLayoutScalable_Avkon.battery_pane(13).LayoutLine();
       
  1552                             }
  1455                         break;
  1553                         break;
  1456                         }
  1554                         }
  1457                     case EEikStatusPaneUidDigitalClock:
  1555                     case EEikStatusPaneUidDigitalClock:
  1458                         {
  1556                         {
  1459                         if ( TLocale().TimeFormat() == ETime12 )
  1557                         if ( TLocale().TimeFormat() == ETime12 )