mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/inc/MVSAppView.h
changeset 0 b8ed18f6c07b
equal deleted inserted replaced
-1:000000000000 0:b8ed18f6c07b
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Part of the MVS Application for TechView
       
    15 //
       
    16 
       
    17 
       
    18 #ifndef MVSAPPVIEW_H
       
    19 #define MVSAPPVIEW_H
       
    20 
       
    21 #include <gulutil.h>
       
    22 #include <techview/eikprogi.h>
       
    23 #include <barsread.h>
       
    24 #include <mvs/videoplayagent.h>
       
    25 
       
    26 #include "MVSApp.h"
       
    27 #include "MVSAppUI.h"
       
    28 
       
    29 #include "mvsvideocontrol.h"
       
    30 
       
    31 //
       
    32 //
       
    33 
       
    34 class CMVSFileControl : public CCoeControl
       
    35     {
       
    36 public:
       
    37     static CMVSFileControl* NewL(const CCoeControl& aContainer, 
       
    38                                   const TRect& aRect, 
       
    39                                   const TDesC& aText);
       
    40 	~CMVSFileControl();
       
    41    
       
    42     void SetTextL(const TDesC& aText); //Sets the text
       
    43     void Draw(const TRect&) const;
       
    44     void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect, 
       
    45                           const CFont* aFont) const;
       
    46     TRect& Window();
       
    47 
       
    48 private:
       
    49     void ConstructL(const CCoeControl& aContainer, const TRect& aRect, 
       
    50                     const TDesC& aText);
       
    51     CMVSFileControl();
       
    52 
       
    53 private:
       
    54 	HBufC* iText; //The text to draw    
       
    55     TRect iWindow; //The drawing window
       
    56     };
       
    57 
       
    58 //
       
    59 //
       
    60 
       
    61 class CMVSStateControl : public CCoeControl
       
    62 	{
       
    63 public:
       
    64     // Construction / Destruction //
       
    65 	static CMVSStateControl* NewL(const CCoeControl& aContainer, 
       
    66                                   const TRect& aRect, 
       
    67                                   const TDesC& aText);
       
    68 	~CMVSStateControl();
       
    69 	void SetTextL(const TDesC& aText); //Sets the text
       
    70     void Draw(const TRect&) const;
       
    71     void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect, 
       
    72                           const CFont* aFont) const;
       
    73     TRect& Window();
       
    74 
       
    75 private:
       
    76     void ConstructL(const CCoeControl& aContainer, const TRect& aRect, 
       
    77                     const TDesC& aText);
       
    78     CMVSStateControl();
       
    79      
       
    80 private:
       
    81 	HBufC* iText; //The text to draw
       
    82     TRect iWindow; //The drawing window
       
    83     };
       
    84 
       
    85 //
       
    86 //
       
    87 
       
    88 class CMVSTimeControl : public CCoeControl
       
    89     {
       
    90 public:
       
    91     static CMVSTimeControl* NewL(const CCoeControl& aContainer, 
       
    92                                   const TRect& aRect, 
       
    93                                    const TDesC& aText);
       
    94 	~CMVSTimeControl();
       
    95 	void SetTextL(const TDesC& aText); //Sets the text
       
    96 	void SetText2L(const TDesC& aText); //Sets the text
       
    97 	void ResetText2L();
       
    98     void Draw(const TRect&) const;
       
    99     void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect, 
       
   100                           const CFont* aFont) const;
       
   101     TRect& Window();
       
   102 
       
   103 private:
       
   104     // Private Construction //
       
   105 	void ConstructL(const CCoeControl& aContainer, const TRect& aRect, 
       
   106                     const TDesC& aText);
       
   107     CMVSTimeControl();
       
   108      
       
   109 private:
       
   110 	HBufC* iText; //The text to draw
       
   111 	HBufC* iText2;
       
   112     TRect iWindow; //The drawing window
       
   113     };
       
   114 
       
   115 
       
   116 //
       
   117 //
       
   118 
       
   119 class CMVSInfoControl : public CCoeControl
       
   120     {
       
   121 public:
       
   122     // Construction / Destruction //
       
   123 	static CMVSInfoControl* NewL(const CCoeControl& aContainer, 
       
   124                                   const TRect& aRect, 
       
   125                                   const TDesC& aText);
       
   126 	~CMVSInfoControl();
       
   127 	void SetTextL(const TDesC& aText); //Sets the text
       
   128 	void Draw(const TRect&) const;
       
   129 	TRect& Window();
       
   130 
       
   131 private:
       
   132     // Private Construction //
       
   133 	void ConstructL(const CCoeControl& aContainer, const TRect& aRect, 
       
   134                     const TDesC& aText);
       
   135     CMVSInfoControl();
       
   136     void DrawMainWindow(CGraphicsContext& aGc, const TRect& aDeviceRect, 
       
   137                         const CFont* aFont) const;
       
   138 private:
       
   139 	HBufC* iText; //The text to draw
       
   140     TRect iWindow; //The drawing window
       
   141     };
       
   142 
       
   143 
       
   144 //
       
   145 //
       
   146 class CMVSAppView : public CCoeControl
       
   147 	{
       
   148 public:
       
   149 	static CMVSAppView* NewL(const TRect& aRect, CMVSVideoPlayAgent& aVideoPlayAgent);
       
   150 	~CMVSAppView();
       
   151 	
       
   152 
       
   153 	void SetClipLength(TInt& aClipLen);
       
   154 	void UpdatePlayProgress(TTimeIntervalMicroSeconds& aPos);
       
   155 	void ResetProgressBar();
       
   156 
       
   157 private: // from CCoeControl
       
   158     void ConstructL(const TRect& aRect, CMVSVideoPlayAgent& aVideoPlayAgent);
       
   159     CMVSAppView();
       
   160 	TInt CountComponentControls() const;
       
   161 	CCoeControl* ComponentControl(TInt aIndex) const;
       
   162 	void HandlePointerEventL(const TPointerEvent &aPointerEvent);
       
   163 
       
   164 public:
       
   165 	CMVSVideoControl* iMainWindowControl;
       
   166     CMVSFileControl* iStatusWindowFNameControl;
       
   167     CMVSStateControl* iStatusWindowStateControl;
       
   168     CMVSTimeControl* iStatusWindowTimeControl;
       
   169     CMVSInfoControl* iInfoWindowControl;
       
   170     CEikProgressInfo* iProgress;
       
   171 private:
       
   172 	TInt iClipLength;    
       
   173 	};
       
   174 
       
   175 //
       
   176 //#endif statements
       
   177 //
       
   178 #endif MVSAPPVIEW_H