|
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 #include <QtGui> |
|
19 #include "ChromeSnippet.h" |
|
20 |
|
21 namespace GVA { |
|
22 class LinearFlowSnippet; |
|
23 } |
|
24 |
|
25 namespace GVA { |
|
26 |
|
27 class MostVisitedPagesWidget : public QGraphicsWidget |
|
28 { |
|
29 Q_OBJECT |
|
30 public : |
|
31 //construction and destruction |
|
32 MostVisitedPagesWidget(ChromeSnippet* snippet,QGraphicsWidget* parent); |
|
33 ~MostVisitedPagesWidget(); |
|
34 |
|
35 void open(); |
|
36 |
|
37 void updatePos(QPointF pos, qreal &toolBarHeight); |
|
38 void resize(const QSize &size); |
|
39 void displayModeChanged(QString& newMode); |
|
40 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); |
|
41 void setCenterIndex(QString displayMode); |
|
42 void updateMVGeometry(); |
|
43 void updateMVStore(QWebPage *page); |
|
44 |
|
45 Q_SIGNALS: |
|
46 void closeComplete(); |
|
47 |
|
48 protected: |
|
49 void mousePressEvent(QGraphicsSceneMouseEvent* event); |
|
50 |
|
51 public slots: |
|
52 void close(bool hide=true); |
|
53 void okTriggered(int index); |
|
54 void closeAnimationCompleted(); |
|
55 void onLoadFinished(const bool ok); |
|
56 |
|
57 private : |
|
58 MostVisitedPageStore* m_mostVisitedPageStore; |
|
59 QGraphicsWidget* m_parent; |
|
60 GVA::LinearFlowSnippet *m_flowInterface; |
|
61 int m_selectIndex; |
|
62 ChromeSnippet* m_snippet; |
|
63 bool m_hideOnClose; |
|
64 }; |
|
65 } |