photosgallery/viewframework/views/metadatadialog/inc/glximgvwrmetadatacontainer.h
branchRCL_3
changeset 24 ea65f74e6de4
parent 18 78ad99c24f08
equal deleted inserted replaced
23:b023a8d2866a 24:ea65f74e6de4
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description: 
    14 * Description: Image viewer metadata dialog container implementation
    15 *
    15 *
    16 */
    16 */
    17 /*
       
    18  * glximgvwrmetadatacontainer.h
       
    19  *
       
    20  *  Created on: Oct 22, 2009
       
    21  *      Author: sourbasu
       
    22  */
       
    23 
    17 
    24 #ifndef GLXIMGVWRMETADATACONTAINER_H_
    18 #ifndef GLXIMGVWRMETADATACONTAINER_H_
    25 #define GLXIMGVWRMETADATACONTAINER_H_
    19 #define GLXIMGVWRMETADATACONTAINER_H_
    26 
    20 
    27 
    21 
    47  */
    41  */
    48 NONSHARABLE_CLASS( CGlxImgVwrMetadataContainer ) : public CAknSettingItemList,
    42 NONSHARABLE_CLASS( CGlxImgVwrMetadataContainer ) : public CAknSettingItemList,
    49 public MGlxMediaListObserver
    43 public MGlxMediaListObserver
    50 
    44 
    51     {
    45     {
    52 public:  // Constructors and destructor
    46 public:
    53     void ViewDynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);
    47     // Constructors and destructor
    54     /**
    48     /**
    55     * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object.
    49      * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object.
    56     * 
    50      * 
    57     * @param aRect rect for control
    51      * @param aRect rect for control
    58     * @param aMediaList media list
    52      * @param aMediaList media list
    59     * @return Metadata container object
    53      * @return Metadata container object
    60     */
    54      */
    61     static CGlxImgVwrMetadataContainer* NewL( const TRect& aRect,const TDesC& aUri);
    55     static CGlxImgVwrMetadataContainer* NewL(const TRect& aRect,
    62     
    56             const TDesC& aUri);
       
    57 
    63     /**
    58     /**
    64     * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object.
    59      * Symbian standard tow phase construction.Construct object of CGlxImgVwrMetadataContainer object.
    65     * 
    60      * 
    66     * @param aRect rect for control
    61      * @param aRect rect for control
    67     * @param aMediaList media list
    62      * @param aMediaList media list
    68     * @return Metadata container object
    63      * @return Metadata container object
    69     */  
    64      */
    70     static CGlxImgVwrMetadataContainer* NewLC( const TRect& aRect,const TDesC& aUri);
    65     static CGlxImgVwrMetadataContainer* NewLC(const TRect& aRect,
    71     
    66             const TDesC& aUri);
       
    67 
    72     /**
    68     /**
    73     * Destructor
    69      * Destructor
    74     */       
    70      */
    75     ~CGlxImgVwrMetadataContainer();
    71     ~CGlxImgVwrMetadataContainer();
    76 
    72 
    77 public: 
    73 public:
    78         
    74 
    79    // @ref CAknSettingItemList::CreateSettingItemL
    75     // @ref CAknSettingItemList::CreateSettingItemL
    80    CAknSettingItem* CreateSettingItemL(TInt aIdentifier);
    76     CAknSettingItem* CreateSettingItemL(TInt aIdentifier);
    81    
    77 
    82    // @ref CAknSettingItemList::HandleListBoxEventL
    78     // @ref CAknSettingItemList::HandleListBoxEventL
    83    void HandleListBoxEventL(CEikListBox* aListBox,
    79     void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
    84                                  TListBoxEvent aEventType);
    80     void HandleListboxChangesL();
    85    void HandleListboxChangesL();
    81 
    86    
    82     //Change MSK
    87    //Enable disble the options based on the current selected item
       
    88    TBool IsItemModifiable();
       
    89    //Change MSK
       
    90     void ChangeMskL();
    83     void ChangeMskL();
       
    84 
    91     //Enable marquee support
    85     //Enable marquee support
    92     void EnableMarqueingL();
    86     void EnableMarqueingL();
    93     
    87 
    94     
       
    95     
       
    96     
       
    97 public:
    88 public:
    98         //MedialistObserver APIS
    89     //MedialistObserver APIS
    99         void HandleItemAddedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList );
    90     void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex,
   100         void HandleItemRemovedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList*/* aList */);
    91             MGlxMediaList* aList);
   101         void HandleAttributesAvailableL( TInt aItemIndex, 
    92     void
   102         const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList );    
    93             HandleItemRemovedL(TInt aStartIndex, TInt aEndIndex,
   103         void HandleFocusChangedL( NGlxListDefs::TFocusChangeType aType, 
    94                     MGlxMediaList*/* aList */);
   104         TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList );
    95     void HandleAttributesAvailableL(TInt aItemIndex, const RArray<
   105         void HandleItemSelectedL(TInt aIndex, TBool aSelected, MGlxMediaList* aList );
    96             TMPXAttribute>& aAttributes, MGlxMediaList* aList);
   106         void HandleMessageL( const CMPXMessage& aMessage, MGlxMediaList* aList );
    97     void HandleFocusChangedL(NGlxListDefs::TFocusChangeType aType,
   107         void HandleError( TInt aError );
    98             TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList);
   108         void HandleCommandCompleteL( CMPXCommand* aCommandResult, TInt aError, 
    99     void HandleItemSelectedL(TInt aIndex, TBool aSelected,
   109         MGlxMediaList* aList );
   100             MGlxMediaList* aList);
   110         void HandleMediaL( TInt aListIndex, MGlxMediaList* aList );
   101     void HandleMessageL(const CMPXMessage& aMessage, MGlxMediaList* aList);
   111         void HandleItemModifiedL( const RArray<TInt>& aItemIndexes, MGlxMediaList* aList );
   102     void HandleError(TInt aError);
   112         void HandleErrorL();
   103     void HandleCommandCompleteL(CMPXCommand* aCommandResult, TInt aError,
   113         MGlxMediaList& MediaList();
   104             MGlxMediaList* aList);
   114         void HandleCommandCompleteL(TAny* aSessionId, 
   105     void HandleMediaL(TInt aListIndex, MGlxMediaList* aList);
   115                 CMPXCommand* /*aCommandResult*/, TInt aError, MGlxMediaList* aList);
   106     void HandleItemModifiedL(const RArray<TInt>& aItemIndexes,
       
   107             MGlxMediaList* aList);
       
   108     MGlxMediaList& MediaList();
       
   109     void HandleCommandCompleteL(TAny* aSessionId,
       
   110             CMPXCommand* /*aCommandResult*/, TInt aError,
       
   111             MGlxMediaList* aList);
   116 
   112 
   117 private:
   113 private:
   118 
   114 
   119         /**
   115     /**
   120         * C++ constructor.
   116      * C++ constructor.
   121         * 
   117      * 
   122         * @param aMediaList media list
   118      * @param aMediaList media list
   123         */
   119      */
   124         CGlxImgVwrMetadataContainer(const TDesC& aUri);
   120     CGlxImgVwrMetadataContainer(const TDesC& aUri);
   125         
       
   126         /**
       
   127         * Symbian 2nd phase constructor
       
   128         * @param aRect rect for this control
       
   129         */      
       
   130         void ConstructL( const TRect& aRect);
       
   131         void CreateMediaListForSelectedItemL();
       
   132         void SetAttributesL(TMPXAttribute attribute);
       
   133         void EditItemL(TInt aIndex, TBool aCalledFromMenu);
       
   134         void SetNameDescriptionL(TInt aItem);
       
   135         void SetDurationLIicenseItemVisibilityL();
       
   136         TBool IsLicenseItem();
       
   137 
   121 
   138         /**
   122     /**
   139          * Create Image Viewer manager Instance
   123      * Symbian 2nd phase constructor
   140          */
   124      * @param aRect rect for this control
   141         void CreateImageViewerInstanceL();
   125      */
   142         
   126     void ConstructL(const TRect& aRect);
   143         /**
   127     void CreateMediaListForSelectedItemL();
   144          * Delete Image Viewer manager Instance
   128     void SetAttributesL(TMPXAttribute attribute);
   145          */
   129     void EditItemL(TInt aIndex, TBool aCalledFromMenu);
   146         void DeleteImageViewerInstance();
   130     void SetLicenseItemVisibilityL();
   147 
   131 
   148    
   132     /**
   149 private:    //data
   133      * Create Image Viewer manager Instance
   150     
   134      */
   151         //Flag to check if the item is a video.
   135     void CreateImageViewerInstanceL();
   152         TBool iVideo;
   136 
   153         //To check if marquee is enabled.
   137     /**
   154         TBool iMarquee;
   138      * Delete Image Viewer manager Instance
   155         //to set visible license items based on the Item.
   139      */
   156         TBool iSetVisible;
   140     void DeleteImageViewerInstance();
   157         RBuf iTextSetter;
   141 
   158         const TDesC& iUri ;
   142 private:
   159         MGlxMediaList* iItemMediaList;
   143     //data
   160         CGlxAttributeContext* iMainListAttributecontext;
   144     //Flag to check if the item is a video.
   161         TGlxSelectionIterator iSelectionIterator;
   145     TBool iVideo;
   162         // For image viewer, not own
   146     //To check if marquee is enabled.
   163         CGlxImageViewerManager* iImageViewerInstance;
   147     TBool iMarquee;
       
   148     //to set visible license items based on the Item.
       
   149     TBool iSetVisible;
       
   150     RBuf iTextSetter;
       
   151     const TDesC& iUri;
       
   152     MGlxMediaList* iItemMediaList;
       
   153     CGlxAttributeContext* iMainListAttributecontext;
       
   154     TGlxSelectionIterator iSelectionIterator;
       
   155     // For image viewer, not own
       
   156     CGlxImageViewerManager* iImageViewerInstance;
   164     };
   157     };
   165 
   158 
   166 
       
   167 
       
   168 #endif /* GLXIMGVWRMETADATACONTAINER_H_ */
   159 #endif /* GLXIMGVWRMETADATACONTAINER_H_ */