videditor/VideoEditorUiComponents/inc/VeiEditVideoLabelNavi.h
branchRCL_3
changeset 3 e0b5df5c0969
parent 0 951a5db380a0
child 5 4c409de21d23
equal deleted inserted replaced
0:951a5db380a0 3:e0b5df5c0969
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "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 * Ixonos Plc
       
    14 *
       
    15 * Description:  
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __VEIEDITVIDEOLABELNAVI_H__
       
    21 #define __VEIEDITVIDEOLABELNAVI_H__
       
    22 
       
    23 #include <aknview.h>
       
    24 #include <coecntrl.h>
       
    25 #include <aknutils.h>
       
    26 #include <ConeResLoader.h>
       
    27 
       
    28 // Forward declarations
       
    29 class CAknLayoutFont;
       
    30 
       
    31 /**
       
    32 * CVeiEditVideoLabelNavi. Navilabel with envelope and time.
       
    33 *
       
    34 */
       
    35 
       
    36 class CVeiEditVideoLabelNavi : public CCoeControl
       
    37     {
       
    38 public:
       
    39 	/**
       
    40 	* LabelNavi state.
       
    41 	*/
       
    42 	enum TLabelNaviState
       
    43 		{
       
    44         EStateInitializing = 1,
       
    45 		EStateEditView,
       
    46 		EStateTrimForMmsView
       
    47 		};
       
    48 public: 
       
    49 	/**
       
    50     * Destructor.
       
    51     */
       
    52 	IMPORT_C virtual ~CVeiEditVideoLabelNavi();
       
    53 
       
    54 	/** 
       
    55 	* Static factory method.
       
    56 	*
       
    57 	* @return  the created CVeiEditVideoLabelNavi object
       
    58 	*/
       
    59 	IMPORT_C static CVeiEditVideoLabelNavi* NewL();
       
    60 
       
    61 	/** 
       
    62 	* Static factory method. Leaves the created object in the cleanup
       
    63 	* stack.
       
    64 	*
       
    65 	* @return  the created CVeiEditVideoLabelNavi object
       
    66 	*/
       
    67 	IMPORT_C static CVeiEditVideoLabelNavi* NewLC();
       
    68 
       
    69 	/**
       
    70 	* Set MMS envelope without red line or with it.
       
    71 	*/
       
    72 	IMPORT_C void SetMmsAvailableL( TBool aIsAvailable );
       
    73 
       
    74 	/**
       
    75 	* 
       
    76 	*/
       
    77 	IMPORT_C void SetMemoryAvailableL( TBool aIsAvailable );
       
    78 
       
    79 	/**
       
    80 	* Set memory in use Phone/MMC.
       
    81 	*/
       
    82 	IMPORT_C void SetMemoryInUseL( TBool aPhoneMemory );
       
    83 
       
    84     /**
       
    85     *
       
    86     */
       
    87 	IMPORT_C TInt GetMaxMmsSize() const;
       
    88 
       
    89 public:
       
    90 	/**
       
    91 	* Set movie duration.
       
    92     * @param aDuration in microseconds
       
    93 	*/
       
    94 	void SetDurationLabelL( const TInt64& aDuration );
       
    95 
       
    96 	/**
       
    97 	* Set movie size.
       
    98 	* @param aSize in kB.
       
    99 	*/
       
   100 	void SetSizeLabelL( const TUint& aSize );
       
   101 
       
   102 	/**
       
   103 	* Set whether editview or trimformms-view 
       
   104 	* @param aState
       
   105 	*/
       
   106 	void SetState( CVeiEditVideoLabelNavi::TLabelNaviState aState );
       
   107 
       
   108 	/**
       
   109 	* Set whether editview or trimformms-view 
       
   110 	* @param aState
       
   111 	*/
       
   112 	TBool IsMMSAvailable() const;
       
   113 
       
   114 
       
   115 protected:
       
   116 	/**
       
   117 	 * From CCoeControl. Handle the size change events.
       
   118 	 */
       
   119 	void SizeChanged();
       
   120 
       
   121 	/**
       
   122 	 * From CCoeControl.  Draw a control.  
       
   123 	 * @param aRect The region of the control to be redrawn.   
       
   124  	 */
       
   125 	void Draw(const TRect& aRect) const;
       
   126 
       
   127 	/**
       
   128 	 * From CCoeControl. Handles a change to the control's resources.  
       
   129 	 * @param aType A message UID value.
       
   130  	 */
       
   131 	void HandleResourceChange(TInt aType); 
       
   132 
       
   133 private:
       
   134     /**
       
   135 	* Default constructor.
       
   136     */
       
   137     void ConstructL();
       
   138 
       
   139 	/**
       
   140 	* Constructor.
       
   141 	*/
       
   142 	CVeiEditVideoLabelNavi();
       
   143 
       
   144 	/**
       
   145 	* Completes construction after session to the messaging serve has been opened.
       
   146 	*/
       
   147 	void CompleteConstructL();
       
   148 
       
   149 	/**
       
   150 	* Load the icon bitmaps.
       
   151 	*/
       
   152 	void LoadBitmapsL();
       
   153 
       
   154 	/**
       
   155 	* Delete the icon bitmaps.
       
   156 	*/
       
   157 	void DeleteBitmaps();
       
   158 
       
   159 private: 
       
   160 	/** Movie duration. */
       
   161 	TInt64			iStoryboardDuration;
       
   162 
       
   163 	/** Movie size. */
       
   164 	TInt			iStoryboardSize;
       
   165 
       
   166 	/** Layouts for text. */
       
   167 	TAknLayoutText	iTextLayout[3];
       
   168 
       
   169     /** Layouts for icons. */
       
   170 	TAknLayoutRect  iBitmapLayout[3];
       
   171 	
       
   172 	/** MMS available bitmap. */
       
   173 	CFbsBitmap*		iMmsBitmap;
       
   174     /** MMS available bitmap mask. */
       
   175     CFbsBitmap*	    iMmsBitmapMask;
       
   176 	/** MMS not available bitmap. */
       
   177 	CFbsBitmap*		iNoMmsBitmap;
       
   178     /** MMS not available bitmap mask. */
       
   179     CFbsBitmap*     iNoMmsBitmapMask;
       
   180 
       
   181 	/** MMS available flag. */
       
   182 	TBool			iMmsAvailable;
       
   183 	/** MMS Max size. */
       
   184 	TInt			iMmsMaxSize;
       
   185 	
       
   186 	/** Current state. */
       
   187 	TLabelNaviState iState;
       
   188 
       
   189 	/** Hard disk available bitmap.  */
       
   190 	CFbsBitmap*	iPhoneMemoryBitmap;
       
   191     /** Hard disk available bitmap mask.  */
       
   192 	CFbsBitmap*	iPhoneMemoryBitmapMask;
       
   193 
       
   194 	/** Hard disk not available bitmap. */
       
   195 	CFbsBitmap*	iNoPhoneMemoryBitmap;
       
   196     /** Hard disk not available bitmap mask. */
       
   197 	CFbsBitmap*	iNoPhoneMemoryBitmapMask;
       
   198 
       
   199 	/** Hard disk available flag. */
       
   200 	TBool		iPhoneMemoryAvailable;
       
   201 
       
   202 	/** Hard disk available bitmap.  */
       
   203 	CFbsBitmap*	iMMCBitmap;
       
   204     /** Hard disk available bitmap mask.  */
       
   205 	CFbsBitmap*	iMMCBitmapMask;
       
   206 
       
   207 	/** Hard disk not available bitmap. */
       
   208 	CFbsBitmap*	iNoMMCBitmap;
       
   209     /** Hard disk not available bitmap mask. */
       
   210 	CFbsBitmap*	iNoMMCBitmapMask;
       
   211 
       
   212 
       
   213 	/** Hard disk available flag. */
       
   214 	TBool		iMMCAvailable;
       
   215 
       
   216 	/** Whether phone memory or memory card in use. */
       
   217 	TBool		iPhoneMemory;
       
   218 
       
   219 	/** Whether is enough memory  */
       
   220 	TBool		iMemoryAvailable;
       
   221 	
       
   222 	/** Time bitmap. */
       
   223 	CFbsBitmap* iTimeBitmap;
       
   224 
       
   225 	/** Time bitmap mask. */
       
   226 	CFbsBitmap* iTimeBitmapMask;
       
   227 
       
   228 	RConeResourceLoader 	iResLoader;
       
   229 	
       
   230 	CAknLayoutFont* 		iCustomFont;
       
   231     };
       
   232 
       
   233 #endif
       
   234