Common/Inc/ImagicUtils.h
changeset 3 93fff7023be8
equal deleted inserted replaced
2:e1e28b0273b0 3:93fff7023be8
       
     1 /*
       
     2 * Copyright (c) 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: Juha Kauppinen, Mika Hokkanen
       
    13 * 
       
    14 * Description: Photo Browser
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef IMAGICUTILS_
       
    19 #define IMAGICUTILS_
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <W32STD.H> 
       
    23 #include <aknwaitdialog.h> 
       
    24 #include "Imagic.hrh"
       
    25 #include <AknInfoPopupNoteController.h>
       
    26 
       
    27 class CAknInfoPopupNoteController;
       
    28 
       
    29 class CImagicUtils: public CBase
       
    30 {
       
    31 public:
       
    32 	/*
       
    33 	* Symbian First phase constructor
       
    34 	* 
       
    35 	* @aParam aFs - FileServer
       
    36 	*/
       
    37 	static CImagicUtils* NewL(RFs &aFs);
       
    38 	
       
    39 	/*
       
    40 	* Destructor.
       
    41 	* 
       
    42 	*/
       
    43  	~CImagicUtils();
       
    44 public:
       
    45     void DisplayYearAndMonth(TInt aIndex, TDateTime dateTime);
       
    46     void ExecutePopUpNote(TDes& aFilename, TInt aTime, TBool aAligment);
       
    47     void ExecutePopUpNote(TInt aResourceId, TDes& aFilename, TInt aTime);
       
    48     void ExecutePopUpNote(TInt aResourceId, TInt aTime);
       
    49     void ExecuteFileScanPopUpNote(TInt aResourceId, TInt aTime);
       
    50     
       
    51 	/*
       
    52 	* Show Text on Display
       
    53 	*
       
    54 	* @aParam aText - Text to Display on screen
       
    55 	* @aParam  gc - Windows GC
       
    56 	* @aParam aRect - Window rectangle.
       
    57 	* @aParam aFont - DisplayFont 
       
    58 	* @aParam  aTransparentBlack - Black Transparent value 
       
    59 	* @aParam  aTransparentWhite - White Transparent value 
       
    60 	*/
       
    61     void ShowText(const TDesC16& aText, CWindowGc& gc, TRect aRect,const CFont*aFont,
       
    62     			 TRgb aTransparentBlack, TRgb aTransparentWhite) const;
       
    63     			 
       
    64     /*
       
    65     * Executing Error Dialog
       
    66     * 
       
    67     * @aParam aError - Error code
       
    68     * @aParam aResourceId - dialog Resource ID
       
    69     */
       
    70    	void ExecuteQueryDialog(TInt aError,TInt aResourceId);
       
    71    	
       
    72    	/*
       
    73     * Executing Query Dialog
       
    74     * 
       
    75     * @aParam aResourceId - dialog Resource ID
       
    76     * @returns - Returns Dialog error ID
       
    77     */
       
    78    	TInt ExecuteQueryDialog(TInt aResourceId);
       
    79    	
       
    80    	
       
    81    /*
       
    82     * Display Wait Dialog
       
    83     * 
       
    84     * @aParam aResourceId - dialog Resource ID
       
    85     * @aParam aSingular - Text to execute 
       
    86     */
       
    87     void DisplayWaitDialog(TInt aResourceId, TBool aSingular);
       
    88    
       
    89     /*
       
    90     * Cancels Wait Dialog
       
    91     * 
       
    92     */
       
    93     void CancelWaitDialog();
       
    94     
       
    95     /*
       
    96     * Display Wait Dialog
       
    97     * 
       
    98     * @aParam aResourceId - dialog Resource ID
       
    99     */
       
   100     void ShowWaitDialog(TInt aResouceId);
       
   101     
       
   102     /*
       
   103     * Cancels Wait Dialog
       
   104     * 
       
   105     */
       
   106     void ProcessFinishedL();
       
   107      
       
   108      
       
   109     /*
       
   110     * Display Infonote 
       
   111     */
       
   112     void DisplayTNInfoNoteStarted();
       
   113     
       
   114     /*
       
   115     * Display End Info note.
       
   116     */
       
   117     void DisplayTNInfoNoteCompleted();
       
   118     
       
   119     /*
       
   120     * Show Info note.
       
   121     *
       
   122     * @aParam aResourceId - Resource Id.
       
   123     */
       
   124     void ShowInfoNote(TInt aResourceId);
       
   125     
       
   126     /*
       
   127     * Display Saving Dailog
       
   128     *
       
   129     * @aParam aResourceId - Resource Id.
       
   130     */  
       
   131     void DisplaySavingDialog(TInt aResourceId);
       
   132      
       
   133     /*
       
   134     * Show Info note.
       
   135     *
       
   136     * @aParam aResourceId - Resource Id.
       
   137     * @aParam FileName - File Name.
       
   138     */
       
   139     void ShowInfoNote(TInt aResourceId, TDes& aFilename);
       
   140     
       
   141      /*
       
   142     * Get New File Name
       
   143     *
       
   144     * @aParam aFileName - Filename
       
   145     */
       
   146     
       
   147     void GetNewFileName( TDes&  aFileName );
       
   148     
       
   149     /*
       
   150     * Get Original file name
       
   151     *
       
   152     * @aParam aFileName - Original file name.
       
   153     */
       
   154     void GetOriginalFileName( TDes&  aFileName );
       
   155 private:
       
   156 	void ConstructL();
       
   157 	CImagicUtils(RFs &aFs);
       
   158 	
       
   159 	void ExecuteInternalWaitNote(TInt aResourceId,TBool aTextPlurality);
       
   160  
       
   161 private:
       
   162 
       
   163 
       
   164 	RFs iFs;
       
   165 	CAknWaitDialog*                iWaitDialog;
       
   166 	CAknInfoPopupNoteController*   iPopUpNote;
       
   167 	CAknInfoPopupNoteController*   iFileScanPopUpNote;
       
   168 	HBufC*                         iTextResource;
       
   169 };
       
   170 #endif /*IMAGICUTILS_*/