photosgallery/viewframework/views/metadatadialog/inc/glximgvwrmetadatadialog.h
branchRCL_3
changeset 24 ea65f74e6de4
parent 0 4e91876724a2
equal deleted inserted replaced
23:b023a8d2866a 24:ea65f74e6de4
    23 
    23 
    24 
    24 
    25 // SYSTEM INCLUDES
    25 // SYSTEM INCLUDES
    26 #include <AknDialog.h>
    26 #include <AknDialog.h>
    27 
    27 
    28 #include <alf/alfscreenbuffer.h>
       
    29 #include <glximgvwrmetadatacontainer.h>
    28 #include <glximgvwrmetadatacontainer.h>
    30 // FORWARD DECLARATIONS
    29 
    31 class CGlxMetadataCommandHandler;
       
    32 class CGlxCommandHandlerAddToContainer;
       
    33 class CGlxUiUtility;
       
    34 
    30 
    35 // CLASS DECLARATION
    31 // CLASS DECLARATION
    36 /**
    32 /**
    37  *  CGlxImgVwrMetadataDialog
    33  *  CGlxImgVwrMetadataDialog
    38  * 
    34  * 
    39  *  Metadata dialog implementation
    35  *  Image Viewer Metadata dialog implementation
    40  */
    36  */
    41 class CGlxImgVwrMetadataDialog : public CAknDialog
    37 class CGlxImgVwrMetadataDialog : public CAknDialog
    42 
       
    43     {
    38     {
    44 public: // Constructors and destructor
    39 public:
       
    40     // Constructors and destructor
    45 
    41 
    46     /**
    42     /**
    47      * Two-phased constructor.
    43      * Two-phased constructor.
    48      *
    44      *
    49      * @param aURI uri or file name of item
    45      * @param aURI uri or file name of item
    50      */
    46      */
    51     IMPORT_C static CGlxImgVwrMetadataDialog* NewL( const TDesC& aUri );
    47     IMPORT_C static CGlxImgVwrMetadataDialog* NewL(const TDesC& aUri);
    52 
    48 
    53     /**
    49     /**
    54      * Destructor.
    50      * Destructor.
    55      */
    51      */
    56     virtual ~CGlxImgVwrMetadataDialog();
    52     virtual ~CGlxImgVwrMetadataDialog();
    57 
    53 
    58 private :
    54 private:
       
    55     /**
       
    56      * Constructor.
       
    57      * @param aURI uri or file name of item
       
    58      */  
    59     CGlxImgVwrMetadataDialog(const TDesC& aUri);
    59     CGlxImgVwrMetadataDialog(const TDesC& aUri);
    60 
    60 
    61 
    61 public:
    62 public: // Functions from base classes
    62     // Functions from base classes
    63 
    63 
    64     /**
    64     /**
    65      * Initializes the dialog and calls CAknDialog's 
    65      * Initializes the dialog and calls CAknDialog's 
    66      *   ExecuteLD()
    66      *   ExecuteLD()
    67      * This method need to be called to execute the dialog.
    67      * This method need to be called to execute the dialog.
    69      *
    69      *
    70      * @return TInt  ID value of the button that closed the dialog.
    70      * @return TInt  ID value of the button that closed the dialog.
    71      */
    71      */
    72     IMPORT_C TInt ExecuteLD();
    72     IMPORT_C TInt ExecuteLD();
    73 
    73 
    74     
    74 protected:
    75 protected:  // Functions from base classes
       
    76 
       
    77     /**
    75     /**
    78      * From MEikCommandObserver Prosesses menucommands
    76      * From MEikCommandObserver Prosesses menucommands
    79      *
    77      *
    80      * @param aCommandId     Commant value defined in resources.
    78      * @param aCommandId     Commant value defined in resources.
    81      */
    79      */
    82     void ProcessCommandL( TInt aCommandId );
    80     void ProcessCommandL(TInt aCommandId);
    83 
    81 
    84     /**
    82 private:
    85      * From MEikMenuObserver Initializes items on the menu
       
    86      *
       
    87      * @param aMenuId    Current menu's resource Id
       
    88      * @param aMenuPane  Pointer to menupane
       
    89      */
       
    90     void DynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane);
       
    91     //hanldes orientation changes.
       
    92     void HandleResourceChange( TInt aType );
       
    93     void SizeChanged();
       
    94 
       
    95 private:        
       
    96     /**
       
    97      * Initializes the dialog's controls before the dialog is sized and 
       
    98      * layed out. Empty by default.
       
    99      */
       
   100     void PreLayoutDynInitL();
       
   101 
       
   102     /**
       
   103      * Initializes the dialog's controls after the dialog has been sized 
       
   104      * but before it has been activated.
       
   105      */
       
   106     void PostLayoutDynInitL();
       
   107     /**
    83     /**
   108      * Symbian 2nd phase constructor.
    84      * Symbian 2nd phase constructor.
   109      * 
       
   110      * @param aURI
       
   111      */
    85      */
   112     void ConstructL();
    86     void ConstructL();
   113 
    87 
   114     /**
    88     /**
   115      * Constructs the Alf Environment and display
    89      * Initalise the resource
   116      */
    90      */
   117     void ConstructAlfEnvL();
    91     void InitResourceL();
   118 
       
   119     /**
       
   120      * Initalise the resource
       
   121      *
       
   122      */
       
   123     void InitResourceL();   
       
   124 
       
   125     /** 
       
   126      * To deal with any specific commands
       
   127      *
       
   128      * @param aCommand The command to respond to
       
   129      * @return ETrue if the command has been handled.
       
   130      *
       
   131      */
       
   132     TBool HandleViewCommandL(TInt aCommand);
       
   133 
       
   134 
       
   135 
    92 
   136 private:
    93 private:
   137 
       
   138     void Draw( const TRect& /*aRect*/ ) const;    
       
   139     void HandlePointerEventL(const TPointerEvent& aPointerEvent);       
       
   140     /**
    94     /**
   141      * SetTitleL
    95      * SetTitleL
   142      * Sets title for view
    96      * Sets title for view
   143      * @param aTitleText title of view to be set
    97      * @param aTitleText title of view to be set
   144      */
    98      */
   145     void SetTitleL(const TDesC& aTitleText);    
    99     void SetTitleL(const TDesC& aTitleText);
   146     /**
   100     /**
   147      * SetPreviousTitleL
   101      * SetPreviousTitleL
   148      * Sets title of previous view
   102      * Sets title of previous view
   149      */
   103      */
   150     void SetPreviousTitleL();
   104     void SetPreviousTitleL();
   151 
   105 
       
   106     /** 
       
   107     * Sets the dialog toolbar visibility
       
   108     * @param aVisible - ETrue for visible; EFalse otherwise.
       
   109     */
   152     void SetDetailsDlgToolbarVisibility(TBool aVisible);
   110     void SetDetailsDlgToolbarVisibility(TBool aVisible);
   153 
   111 
   154 public: // from MEikDialogPageObserver
   112 public:
       
   113     // from MEikDialogPageObserver
   155     /**
   114     /**
   156      * @ref MEikDialogPageObserver::CreateCustomControlL
   115      * @ref MEikDialogPageObserver::CreateCustomControlL
   157      */
   116      */
   158     SEikControlInfo CreateCustomControlL(TInt aControlType);
   117     SEikControlInfo CreateCustomControlL(TInt aControlType);
   159 
   118 
   160 public:
   119 public:
   161     /*
   120     /** 
   162      *  
   121     * Handles the toolbar visiblity to be in sync with the calling app
   163      */
   122     * @param aVisible - ETrue for visible; EFalse otherwise.
       
   123     */    
   164     void HandleToolbarResetting(TBool aVisible);
   124     void HandleToolbarResetting(TBool aVisible);
   165 
   125 
   166 private: //data
   126 private:
   167 
   127     //data
   168     TInt iResourceOffset;
   128     TInt iResourceOffset;
   169     TBool iStatusPaneAvailable;
   129     TBool iStatusPaneAvailable;
   170     CGlxUiUtility* iUiUtility;      
   130     HBufC* iPreviousTitle;
   171     HBufC* iPreviousTitle;    
   131     const TDesC& iUri;
   172     const TDesC& iUri; 
       
   173     CGlxImgVwrMetadataContainer* iContainer;
   132     CGlxImgVwrMetadataContainer* iContainer;
   174     };
   133     };
   175 
   134 
   176 
   135 
   177 #endif /* GLXIMGVWRMETADATADIALOG_H_ */
   136 #endif /* GLXIMGVWRMETADATADIALOG_H_ */