emailuis/nmailui/inc/nmviewerwebview.h
changeset 44 c2d07d913565
parent 43 99bcbff212ad
child 47 f83bd4ae1fe3
child 54 997a02608b3a
equal deleted inserted replaced
43:99bcbff212ad 44:c2d07d913565
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3  * All rights reserved.
     4 * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8  *
     9 * Initial Contributors:
     9  * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10  * Nokia Corporation - initial contribution.
    11 *
    11  *
    12 * Contributors:
    12  * Contributors:
    13 *
    13  *
    14 * Description:
    14  * Description:
    15 *
    15  *
    16 */
    16  */
    17 
    17 
    18 #ifndef NMVIEWERWEBVIEW_H_
    18 #ifndef NMVIEWERWEBVIEW_H_
    19 #define NMVIEWERWEBVIEW_H_
    19 #define NMVIEWERWEBVIEW_H_
    20 
    20 
    21 #include <QGraphicsWebView>
    21 #include <QGraphicsWebView>
    22 
    22 
    23 #include "nmcommon.h"
    23 #include "nmcommon.h"
    24 
    24 
    25 class NmViewerView;
    25 class NmViewerView;
    26 class NmMessage;
    26 class NmMessage;
    27 
    27 class QGestureEvent;
    28 class QMouseEvent;
       
    29 
    28 
    30 class NmMailViewerWkContentItem
    29 class NmMailViewerWkContentItem
    31 {
    30 {
    32 public:
    31 public:
    33     NmMailViewerWkContentItem() 
    32     NmMailViewerWkContentItem() 
    46 	NmMailViewerWK();
    45 	NmMailViewerWK();
    47 	~NmMailViewerWK();
    46 	~NmMailViewerWK();
    48     virtual QVariant loadResource (int type, const QUrl &name, NmId &partId, bool &isFetched);
    47     virtual QVariant loadResource (int type, const QUrl &name, NmId &partId, bool &isFetched);
    49     void setParentView(NmViewerView *parentView);
    48     void setParentView(NmViewerView *parentView);
    50     void addContent(QString key, QVariant val, NmId partId, bool isFetched);
    49     void addContent(QString key, QVariant val, NmId partId, bool isFetched);
    51     void sendMousePressEvent(QGraphicsSceneMouseEvent *event);
       
    52     void sendMouseReleaseEvent(QGraphicsSceneMouseEvent *event);
       
    53 
    50 
    54 private:
    51 private:
    55     QMap<QString,NmMailViewerWkContentItem> mContent;
    52     QMap<QString,NmMailViewerWkContentItem> mContent;
    56     NmViewerView *mParentView;      // Not owned
    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)
    57 };
    66 };
    58 
    67 
    59 #endif /* NMVIEWERWEBVIEW_H_*/
    68 #endif /* NMVIEWERWEBVIEW_H_*/