equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 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: Another view for test application. |
|
15 * |
|
16 */ |
|
17 #ifndef HGFLIPWIDGET_H_ |
|
18 #define HGFLIPWIDGET_H_ |
|
19 |
|
20 #include <hbwidget.h> |
|
21 #include <hbstackedwidget.h> |
|
22 |
|
23 class HbAction; |
|
24 class HbLabel; |
|
25 class QPropertyAnimation; |
|
26 |
|
27 class HgFlipWidget : public HbWidget |
|
28 { |
|
29 Q_PROPERTY(qreal yRotation READ yRotation WRITE setYRotation) |
|
30 Q_OBJECT |
|
31 public: |
|
32 enum State |
|
33 { |
|
34 StateClosed, |
|
35 StateOpening1, |
|
36 StateOpening2, |
|
37 StateOpened, |
|
38 StateClosing1, |
|
39 StateClosing2 |
|
40 }; |
|
41 |
|
42 HgFlipWidget(const QString &title1, const QString &title2, const QPixmap &pixmap, QGraphicsItem *parent=0); |
|
43 |
|
44 qreal yRotation(); |
|
45 void setYRotation(qreal a); |
|
46 |
|
47 void close(); |
|
48 signals: |
|
49 void closed(); |
|
50 private slots: |
|
51 void animationFinished(); |
|
52 void buttonClicked(bool checked=false); |
|
53 private: |
|
54 void resizeEvent(QGraphicsSceneResizeEvent *event); |
|
55 void togglePage(); |
|
56 private: |
|
57 QPixmap mPixmap; |
|
58 HbStackedWidget *mStack; |
|
59 qreal mYRotation; |
|
60 QPropertyAnimation* mAnimation; |
|
61 State mState; |
|
62 HbLabel* mIconLabel; |
|
63 }; |
|
64 |
|
65 #endif /* HGTESTVIEW_H_ */ |