3
|
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 DRAWFACEBROWSING_H
|
|
19 |
#define DRAWFACEBROWSING_H
|
|
20 |
|
|
21 |
// INCLUDES
|
|
22 |
#include <e32std.h>
|
|
23 |
#include <e32base.h>
|
|
24 |
#include "ImagicContainerBrowser.h"
|
|
25 |
|
|
26 |
|
|
27 |
// CLASS DECLARATION
|
|
28 |
|
|
29 |
/**
|
|
30 |
* CDrawFaceBrowsing
|
|
31 |
*
|
|
32 |
*/
|
|
33 |
class CDrawFaceBrowsing : public CBase
|
|
34 |
{
|
|
35 |
public:
|
|
36 |
// Constructors and destructor
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Destructor.
|
|
40 |
*/
|
|
41 |
~CDrawFaceBrowsing();
|
|
42 |
|
|
43 |
/**
|
|
44 |
* Two-phased constructor.
|
|
45 |
*/
|
|
46 |
static CDrawFaceBrowsing* NewL(CImagicContainerBrowser* aContainer, TInt& aCurrentIndex);
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Two-phased constructor.
|
|
50 |
*/
|
|
51 |
static CDrawFaceBrowsing* NewLC(CImagicContainerBrowser* aContainer, TInt& aCurrentIndex);
|
|
52 |
|
|
53 |
void InitFaceBrowsing();
|
|
54 |
void DrawFaceBrowsing(const TSize &aSize);
|
|
55 |
void DrawFaceFrame(TInt aFace2bDrawn);
|
|
56 |
TBool IsDrawingNeededFaceBrowsing();
|
|
57 |
FloatCoords ConvertCoordsFromAlgo2OGl(const TInt aFaceIndex);
|
|
58 |
void GetFaceCoordinatesL(TRect& aRect, TFileName& aFilename);
|
|
59 |
void SetCurrentFaceNro(TInt aNro);
|
|
60 |
TInt GetCurrentFaceNro();
|
|
61 |
TInt GetNumberOfFaces();
|
|
62 |
void SetFaceCoords(RArray<TRect>& aCoordinates);
|
|
63 |
void ClearFaceArray();
|
|
64 |
TInt GetFaceCount();
|
|
65 |
void IncFaceNumber();
|
|
66 |
void DecFaceNumber();
|
|
67 |
void KeyPressed();
|
|
68 |
void KeyReleased();
|
|
69 |
void KeyEvent();
|
|
70 |
void GetFBZoomAndLocation(TReal& aDrawZoom, TReal& aInPictureX, TReal& aInPictureY);
|
|
71 |
|
|
72 |
private:
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Constructor for performing 1st stage construction
|
|
76 |
*/
|
|
77 |
CDrawFaceBrowsing(CImagicContainerBrowser* aContainer, TInt& aCurrentIndex);
|
|
78 |
|
|
79 |
/**
|
|
80 |
* EPOC default constructor for performing 2nd stage construction
|
|
81 |
*/
|
|
82 |
void ConstructL(CImagicContainerBrowser* aContainer, TInt& aCurrentIndex);
|
|
83 |
TBool ShowUtilities();
|
|
84 |
|
|
85 |
private:
|
|
86 |
CImagicContainerBrowser* iContainer;
|
|
87 |
//TInt& iCurrentIndex;
|
|
88 |
RArray<TRect> iCoordinates;
|
|
89 |
RArray<FloatCoords> iFloatCoordinates;
|
|
90 |
TInt iCoordIndex;
|
|
91 |
TInt iFaceNro;
|
|
92 |
float iFBMovingSpeed;
|
|
93 |
TInt iFBRectCounter;
|
|
94 |
float iDrawWidth, iDrawHeight;//OneByOne mode image size Widht and Height
|
|
95 |
float iImageWidth, iImageHeight;
|
|
96 |
//float iDrawFBZoom;
|
|
97 |
float iDrawZoom;//Used for image scaling in OneByOne mode
|
|
98 |
float iDrawFBTargetZoom;
|
|
99 |
//Coordinates, when moving in picture zoomed in
|
|
100 |
float iInPictureX, iInPictureY;
|
|
101 |
float iDrawTargetX, iDrawTargetY;//target value of target X and Y
|
|
102 |
float iDrawX, iDrawY;//current value of target X and Y
|
|
103 |
float iFBZoomingSpeed;
|
|
104 |
TReal iMenuAlpha;
|
|
105 |
};
|
|
106 |
|
|
107 |
#endif // DRAWFACEBROWSING_H
|