|
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: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HGQTQUADRENDERER_H |
|
19 #define HGQTQUADRENDERER_H |
|
20 |
|
21 #include "hgtransformedquadrenderer.h" |
|
22 #include <qlist> |
|
23 #include <qimage> |
|
24 |
|
25 class QPoint; |
|
26 class QPainter; |
|
27 class QRectF; |
|
28 class QMatrix4x4; |
|
29 class HgQtImage; |
|
30 class QSize; |
|
31 class HgTransformedQuad; |
|
32 |
|
33 /** |
|
34 * Qt implementation of the HgTransformedQuadRenderer. |
|
35 */ |
|
36 class HgQtQuadRenderer: public HgTransformedQuadRenderer |
|
37 { |
|
38 public: |
|
39 HgQtQuadRenderer(int maxQuads); |
|
40 virtual ~HgQtQuadRenderer(); |
|
41 |
|
42 // From HgQuadRenderer |
|
43 virtual void drawQuads(QPainter* painter, const QRectF& rect, |
|
44 const QMatrix4x4& viewMatrix, const QMatrix4x4& projectionMatrix, |
|
45 Qt::Orientation orientation, |
|
46 const QTransform& sceneTransform); |
|
47 virtual HgImage* createNativeImage(); |
|
48 virtual void setDefaultImage(QImage defaultImage); |
|
49 |
|
50 // new functions |
|
51 HgQtImage* defaultImage(); |
|
52 |
|
53 bool isReflection() const; |
|
54 |
|
55 protected: |
|
56 |
|
57 // From HgTransformedQuadRenderer |
|
58 virtual HgTransformedQuad* createNativeQuad(); |
|
59 |
|
60 void drawFloor(QPainter* painter, const QRectF& rect); |
|
61 |
|
62 private: |
|
63 HgQtImage* mDefaultQtImage; |
|
64 bool mIsReflection; |
|
65 }; |
|
66 |
|
67 #endif |