landmarksui/app/src/CLmkCategoryContentsContainer.cpp
branchRCL_3
changeset 4 3c271c9e6618
parent 0 522cd55cc3d7
child 34 8173571d354e
equal deleted inserted replaced
0:522cd55cc3d7 4:3c271c9e6618
   171         }
   171         }
   172 
   172 
   173     CLmkAppSelectorImplBase& selector = SelectorImpl();
   173     CLmkAppSelectorImplBase& selector = SelectorImpl();
   174     TInt markedCount(selector.ListMarkedItemCountL());
   174     TInt markedCount(selector.ListMarkedItemCountL());
   175     TInt visibleCount(selector.ListVisibleItemCount());
   175     TInt visibleCount(selector.ListVisibleItemCount());
   176     DEBUG1( CLmkByLmContainer::OfferKeyEventL markedCount=%d,markedCount );
   176     DEBUG1( CLmkCategoryContentsContainer::OfferKeyEventL markedCount=%d,markedCount );
   177     DEBUG1( CLmkByLmContainer::OfferKeyEventL visibleCount=%d,visibleCount );
   177     DEBUG1( CLmkCategoryContentsContainer::OfferKeyEventL visibleCount=%d,visibleCount );
   178 
   178 
   179     if (aKeyEvent.iCode == EKeyOK && !shiftKeyPressed && aType == EEventKey)
   179     if (aKeyEvent.iCode == EKeyOK && !shiftKeyPressed && aType == EEventKey)
   180         {
   180         {
   181         if (visibleCount > 0 && markedCount < 1)
   181         if (visibleCount > 0 && markedCount < 1)
   182             {
   182             {
   230             }
   230             }
   231         }
   231         }
   232     iIsEditorOpened = EFalse;
   232     iIsEditorOpened = EFalse;
   233     TKeyResponse response = CLmkLbWithFilterContainer::OfferKeyEventL(
   233     TKeyResponse response = CLmkLbWithFilterContainer::OfferKeyEventL(
   234             aKeyEvent, aType);
   234             aKeyEvent, aType);
   235 
   235     
   236     if (static_cast<CTextListBoxModel*> (ListBox().Model())->ItemTextArray()->MdcaCount()
   236     DEBUG( CLmkCategoryContentsContainer::OfferKeyEventL End );
   237             == 0)
       
   238         {
       
   239         (static_cast<CLmkCategoryContentsView *> (&iView))->HandleCommandL(
       
   240                 EAknSoftkeyBack);
       
   241         }
       
   242 
       
   243     return response;
   237     return response;
   244     }
   238     }
   245 
   239 
   246 // ----------------------------------------------------------------------------
   240 // ----------------------------------------------------------------------------
   247 // CLmkCategoryContentsContainer::HandleControlEventL()
   241 // CLmkCategoryContentsContainer::HandleControlEventL()
   252         CCoeControl* aControl, TCoeEvent aEventType)
   246         CCoeControl* aControl, TCoeEvent aEventType)
   253     {
   247     {
   254     if (aEventType == EEventStateChanged && aControl == iFindBox)
   248     if (aEventType == EEventStateChanged && aControl == iFindBox)
   255         {
   249         {
   256         SelectorImpl().ProcessCommandL(ELmkCmdFindBoxSearchAfresh);
   250         SelectorImpl().ProcessCommandL(ELmkCmdFindBoxSearchAfresh);
       
   251         }
       
   252     if (aEventType == EEventStateChanged && aControl == iListBox )
       
   253         {
       
   254         if (static_cast<CTextListBoxModel*> (ListBox().Model())->ItemTextArray()->MdcaCount()
       
   255                 == 0)
       
   256             {
       
   257             (static_cast<CLmkCategoryContentsView *> (&iView))->HandleCommandL(
       
   258                     EAknSoftkeyBack);
       
   259             }
   257         }
   260         }
   258     }
   261     }
   259 
   262 
   260 // ----------------------------------------------------------------------------
   263 // ----------------------------------------------------------------------------
   261 // CLmkCategoryContentsContainer::GetSelectedLandmarksL
   264 // CLmkCategoryContentsContainer::GetSelectedLandmarksL