author | hgs |
Thu, 10 Jun 2010 16:14:05 +0300 | |
changeset 44 | c2d07d913565 |
parent 43 | 99bcbff212ad |
child 47 | f83bd4ae1fe3 |
child 54 | 997a02608b3a |
permissions | -rw-r--r-- |
18
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
44 | 2 |
* Copyright (c) 2009-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: |
|
15 |
* |
|
16 |
*/ |
|
18
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
#ifndef NMVIEWERWEBVIEW_H_ |
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#define NMVIEWERWEBVIEW_H_ |
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
|
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include <QGraphicsWebView> |
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
|
43 | 23 |
#include "nmcommon.h" |
24 |
||
18
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
class NmViewerView; |
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
class NmMessage; |
44 | 27 |
class QGestureEvent; |
18
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
|
43 | 29 |
class NmMailViewerWkContentItem |
30 |
{ |
|
31 |
public: |
|
32 |
NmMailViewerWkContentItem() |
|
33 |
: mData(0), mPartId(0), mIsFetched(false) {} |
|
34 |
NmMailViewerWkContentItem(QVariant data, NmId partId, bool isFetched) |
|
35 |
: mData(data), mPartId(partId), mIsFetched(isFetched) {} |
|
36 |
QVariant mData; |
|
37 |
NmId mPartId; |
|
38 |
bool mIsFetched; |
|
39 |
}; |
|
40 |
||
18
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
class NmMailViewerWK : public QGraphicsWebView |
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
{ |
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
Q_OBJECT |
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
public: |
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
NmMailViewerWK(); |
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
~NmMailViewerWK(); |
43 | 47 |
virtual QVariant loadResource (int type, const QUrl &name, NmId &partId, bool &isFetched); |
18
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
void setParentView(NmViewerView *parentView); |
43 | 49 |
void addContent(QString key, QVariant val, NmId partId, bool isFetched); |
18
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
|
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
private: |
43 | 52 |
QMap<QString,NmMailViewerWkContentItem> mContent; |
44 | 53 |
NmViewerView *mParentView; // Not owned |
54 |
}; |
|
55 |
||
56 |
class NmEventFilterWK : public QObject |
|
57 |
{ |
|
58 |
Q_OBJECT |
|
59 |
public: |
|
60 |
NmEventFilterWK(QObject* parent = 0); |
|
61 |
protected: |
|
62 |
bool eventFilter(QObject* object, QEvent* event); |
|
63 |
bool gestureEvent(QGestureEvent* event); |
|
64 |
private: |
|
65 |
Q_DISABLE_COPY(NmEventFilterWK) |
|
18
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
}; |
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
|
578830873419
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
#endif /* NMVIEWERWEBVIEW_H_*/ |