photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenbusyicon.h
branchRCL_3
changeset 12 ce1c7ad1f18b
child 14 2dac0fdba72b
equal deleted inserted replaced
11:71da52165949 12:ce1c7ad1f18b
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    Header for implementation of background processing indicator
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GLXFULLSCREENBUSYICON_H_
       
    19 #define GLXFULLSCREENBUSYICON_H_
       
    20 
       
    21 #include <alf/alfControl.h>
       
    22 #include <mglxmedialistobserver.h>
       
    23 // Forward decleartion
       
    24 class CAlfEnv;
       
    25 class CAlfAnchorLayout;
       
    26 class CAlfImageVisual;
       
    27 class CGlxUiUtility;
       
    28 class MGlxMediaList;
       
    29 
       
    30 enum TGlxBusyIconControlGroupId
       
    31     {
       
    32     EBGPSOriPortrait = 10,
       
    33     EBGPsOriLandscape = 20
       
    34     };
       
    35 
       
    36 class CGlxFullScreenBusyIcon: public CAlfControl,public MGlxMediaListObserver
       
    37     {
       
    38 public:
       
    39     /*
       
    40      * NewL()
       
    41      */
       
    42     static CGlxFullScreenBusyIcon* NewL(MGlxMediaList& aMediaList,CGlxUiUtility& aUiUtility);
       
    43     /*
       
    44      * destructor
       
    45      */
       
    46     ~CGlxFullScreenBusyIcon();
       
    47     /*
       
    48      *  Shows the Busy Icon to indicate TN generation is going on.
       
    49      *  @param aShow ETrue the icon will be shown and EFlase the icon will be hidden  
       
    50      */    
       
    51     void ShowBusyIconL(TBool aShow);
       
    52 
       
    53 public://frm CAlControl
       
    54     void VisualLayoutUpdated(CAlfVisual& aVisual);        
       
    55 public: // from MGlxMediaListObserver
       
    56     void HandleItemAddedL( TInt /*aStartIndex*/, TInt /*aEndIndex*/, MGlxMediaList* /*aList*/ ){}
       
    57     void HandleItemRemovedL( TInt /*aStartIndex*/, TInt /*aEndIndex*/, MGlxMediaList* /*aList*/){}
       
    58     void HandleAttributesAvailableL( TInt aItemIndex, 
       
    59             const RArray<TMPXAttribute>& /*aAttributes*/, MGlxMediaList* aList );    
       
    60     void HandleFocusChangedL( NGlxListDefs::TFocusChangeType /*aType*/, 
       
    61             TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList );
       
    62     void HandleItemSelectedL(TInt /*aIndex*/, TBool /*aSelected*/, MGlxMediaList* /*aList*/ ){}
       
    63     void HandleMessageL( const CMPXMessage& /*aMessage*/, MGlxMediaList* /*aList*/ ){}
       
    64     void HandleError( TInt /*aError*/ );
       
    65     void HandleCommandCompleteL( CMPXCommand* /*aCommandResult*/, TInt /*aError*/, 
       
    66             MGlxMediaList* /*aList*/ ){}
       
    67     void HandleMediaL( TInt /*aListIndex*/, MGlxMediaList* /*aList*/ ){}
       
    68     void HandleItemModifiedL( const RArray<TInt>& /*aItemIndexes*/, MGlxMediaList* /*aList*/ ){}
       
    69 private:
       
    70     /*
       
    71      * Constructor
       
    72      */
       
    73 	CGlxFullScreenBusyIcon(MGlxMediaList& aMediaList,CGlxUiUtility& aUiUtility);    
       
    74     /*
       
    75      * ConstructL()
       
    76      */
       
    77     void ConstructL();
       
    78     /*
       
    79      *  Updates the position of the icon based on the screen size landscape/portrait 
       
    80      */
       
    81     void UpdatePosition();
       
    82     /*
       
    83      *  Gets the current screen size 
       
    84      */
       
    85     TRect GetScreenSize();
       
    86     /*
       
    87      * Callback for periodic timer
       
    88      */
       
    89     static TInt PeriodicCallbackL( TAny* aPtr );
       
    90     /*
       
    91      * nonstatic func called from periodic timer
       
    92      */
       
    93     void CallPeriodicCallbackL();
       
    94     /*
       
    95      *  Check the thumbnail generation for focus item is done
       
    96      *  @return ETrue if the generation is complete,EFalse if generation is going on.
       
    97      *   
       
    98      */        
       
    99     TBool IsReadyL();
       
   100     
       
   101 private:
       
   102 	MGlxMediaList&         iMediaList;
       
   103 	CGlxUiUtility&         iUiUtility;                      // CGlxUiUtility passed from FS view
       
   104     CAlfEnv*               iEnv;                            // Alf Env    
       
   105     CAlfAnchorLayout*      iMainVisual;                     // Anchor Layout
       
   106     CAlfImageVisual*       iBackgroundBorderImageVisual;    // Background Image Visual
       
   107     TRect                  iScreenSize;                     // Screen size      
       
   108     CPeriodic*             iPeriodic;
       
   109     TInt                   iBusyIconIndex;
       
   110     
       
   111     };
       
   112 
       
   113 
       
   114 #endif /* GLXFULLSCREENBUSYICON_H_ */