os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/inc/MVSAppView.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/inc/MVSAppView.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,178 @@
     1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Part of the MVS Application for TechView
    1.18 +//
    1.19 +
    1.20 +
    1.21 +#ifndef MVSAPPVIEW_H
    1.22 +#define MVSAPPVIEW_H
    1.23 +
    1.24 +#include <gulutil.h>
    1.25 +#include <techview/eikprogi.h>
    1.26 +#include <barsread.h>
    1.27 +#include <mvs/videoplayagent.h>
    1.28 +
    1.29 +#include "MVSApp.h"
    1.30 +#include "MVSAppUI.h"
    1.31 +
    1.32 +#include "mvsvideocontrol.h"
    1.33 +
    1.34 +//
    1.35 +//
    1.36 +
    1.37 +class CMVSFileControl : public CCoeControl
    1.38 +    {
    1.39 +public:
    1.40 +    static CMVSFileControl* NewL(const CCoeControl& aContainer, 
    1.41 +                                  const TRect& aRect, 
    1.42 +                                  const TDesC& aText);
    1.43 +	~CMVSFileControl();
    1.44 +   
    1.45 +    void SetTextL(const TDesC& aText); //Sets the text
    1.46 +    void Draw(const TRect&) const;
    1.47 +    void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect, 
    1.48 +                          const CFont* aFont) const;
    1.49 +    TRect& Window();
    1.50 +
    1.51 +private:
    1.52 +    void ConstructL(const CCoeControl& aContainer, const TRect& aRect, 
    1.53 +                    const TDesC& aText);
    1.54 +    CMVSFileControl();
    1.55 +
    1.56 +private:
    1.57 +	HBufC* iText; //The text to draw    
    1.58 +    TRect iWindow; //The drawing window
    1.59 +    };
    1.60 +
    1.61 +//
    1.62 +//
    1.63 +
    1.64 +class CMVSStateControl : public CCoeControl
    1.65 +	{
    1.66 +public:
    1.67 +    // Construction / Destruction //
    1.68 +	static CMVSStateControl* NewL(const CCoeControl& aContainer, 
    1.69 +                                  const TRect& aRect, 
    1.70 +                                  const TDesC& aText);
    1.71 +	~CMVSStateControl();
    1.72 +	void SetTextL(const TDesC& aText); //Sets the text
    1.73 +    void Draw(const TRect&) const;
    1.74 +    void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect, 
    1.75 +                          const CFont* aFont) const;
    1.76 +    TRect& Window();
    1.77 +
    1.78 +private:
    1.79 +    void ConstructL(const CCoeControl& aContainer, const TRect& aRect, 
    1.80 +                    const TDesC& aText);
    1.81 +    CMVSStateControl();
    1.82 +     
    1.83 +private:
    1.84 +	HBufC* iText; //The text to draw
    1.85 +    TRect iWindow; //The drawing window
    1.86 +    };
    1.87 +
    1.88 +//
    1.89 +//
    1.90 +
    1.91 +class CMVSTimeControl : public CCoeControl
    1.92 +    {
    1.93 +public:
    1.94 +    static CMVSTimeControl* NewL(const CCoeControl& aContainer, 
    1.95 +                                  const TRect& aRect, 
    1.96 +                                   const TDesC& aText);
    1.97 +	~CMVSTimeControl();
    1.98 +	void SetTextL(const TDesC& aText); //Sets the text
    1.99 +	void SetText2L(const TDesC& aText); //Sets the text
   1.100 +	void ResetText2L();
   1.101 +    void Draw(const TRect&) const;
   1.102 +    void DrawOtherWindows(CGraphicsContext& aGc, const TRect& aDeviceRect, 
   1.103 +                          const CFont* aFont) const;
   1.104 +    TRect& Window();
   1.105 +
   1.106 +private:
   1.107 +    // Private Construction //
   1.108 +	void ConstructL(const CCoeControl& aContainer, const TRect& aRect, 
   1.109 +                    const TDesC& aText);
   1.110 +    CMVSTimeControl();
   1.111 +     
   1.112 +private:
   1.113 +	HBufC* iText; //The text to draw
   1.114 +	HBufC* iText2;
   1.115 +    TRect iWindow; //The drawing window
   1.116 +    };
   1.117 +
   1.118 +
   1.119 +//
   1.120 +//
   1.121 +
   1.122 +class CMVSInfoControl : public CCoeControl
   1.123 +    {
   1.124 +public:
   1.125 +    // Construction / Destruction //
   1.126 +	static CMVSInfoControl* NewL(const CCoeControl& aContainer, 
   1.127 +                                  const TRect& aRect, 
   1.128 +                                  const TDesC& aText);
   1.129 +	~CMVSInfoControl();
   1.130 +	void SetTextL(const TDesC& aText); //Sets the text
   1.131 +	void Draw(const TRect&) const;
   1.132 +	TRect& Window();
   1.133 +
   1.134 +private:
   1.135 +    // Private Construction //
   1.136 +	void ConstructL(const CCoeControl& aContainer, const TRect& aRect, 
   1.137 +                    const TDesC& aText);
   1.138 +    CMVSInfoControl();
   1.139 +    void DrawMainWindow(CGraphicsContext& aGc, const TRect& aDeviceRect, 
   1.140 +                        const CFont* aFont) const;
   1.141 +private:
   1.142 +	HBufC* iText; //The text to draw
   1.143 +    TRect iWindow; //The drawing window
   1.144 +    };
   1.145 +
   1.146 +
   1.147 +//
   1.148 +//
   1.149 +class CMVSAppView : public CCoeControl
   1.150 +	{
   1.151 +public:
   1.152 +	static CMVSAppView* NewL(const TRect& aRect, CMVSVideoPlayAgent& aVideoPlayAgent);
   1.153 +	~CMVSAppView();
   1.154 +	
   1.155 +
   1.156 +	void SetClipLength(TInt& aClipLen);
   1.157 +	void UpdatePlayProgress(TTimeIntervalMicroSeconds& aPos);
   1.158 +	void ResetProgressBar();
   1.159 +
   1.160 +private: // from CCoeControl
   1.161 +    void ConstructL(const TRect& aRect, CMVSVideoPlayAgent& aVideoPlayAgent);
   1.162 +    CMVSAppView();
   1.163 +	TInt CountComponentControls() const;
   1.164 +	CCoeControl* ComponentControl(TInt aIndex) const;
   1.165 +	void HandlePointerEventL(const TPointerEvent &aPointerEvent);
   1.166 +
   1.167 +public:
   1.168 +	CMVSVideoControl* iMainWindowControl;
   1.169 +    CMVSFileControl* iStatusWindowFNameControl;
   1.170 +    CMVSStateControl* iStatusWindowStateControl;
   1.171 +    CMVSTimeControl* iStatusWindowTimeControl;
   1.172 +    CMVSInfoControl* iInfoWindowControl;
   1.173 +    CEikProgressInfo* iProgress;
   1.174 +private:
   1.175 +	TInt iClipLength;    
   1.176 +	};
   1.177 +
   1.178 +//
   1.179 +//#endif statements
   1.180 +//
   1.181 +#endif MVSAPPVIEW_H