ginebra2/GGraphicsWebView.cpp
changeset 3 0954f5dd2cd0
parent 0 1450b09d0cfd
child 9 b39122337a00
equal deleted inserted replaced
1:b0dd75e285d2 3:0954f5dd2cd0
     1 /*
     1 /*
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 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
       
     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 *
     4 *
     9 * Initial Contributors:
     5 * This program is free software: you can redistribute it and/or modify
    10 * Nokia Corporation - initial contribution.
     6 * it under the terms of the GNU Lesser General Public License as published by
       
     7 * the Free Software Foundation, version 2.1 of the License.
    11 *
     8 *
    12 * Contributors:
     9 * This program is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12 * GNU Lesser General Public License for more details.
    13 *
    13 *
    14 * Description: 
    14 * You should have received a copy of the GNU Lesser General Public License
       
    15 * along with this program.  If not,
       
    16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
       
    17 *
       
    18 * Description:
    15 *
    19 *
    16 */
    20 */
    17 
       
    18 
    21 
    19 #include "GGraphicsWebView.h"
    22 #include "GGraphicsWebView.h"
    20 namespace GVA {
    23 namespace GVA {
    21 
    24 
    22   GGraphicsWebView::GGraphicsWebView(QGraphicsItem * parent)
    25   GGraphicsWebView::GGraphicsWebView(QGraphicsItem * parent)
    28   }
    31   }
    29 
    32 
    30   void GGraphicsWebView::paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget)
    33   void GGraphicsWebView::paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget)
    31   {
    34   {
    32     //    qDebug() << "d:" << painter->device()->depth() << " w:" << painter->device()->width() << " h:" << painter->device()->height();
    35     //    qDebug() << "d:" << painter->device()->depth() << " w:" << painter->device()->width() << " h:" << painter->device()->height();
    33     if(m_loading && m_loadTime.elapsed() < 7000) {
    36     if (m_loading && m_loadTime.elapsed() < 7000) {
    34       painter->save();
    37       painter->save();
    35       painter->setBrush(Qt::transparent);
    38       painter->setBrush(Qt::transparent);
    36       painter->setPen(Qt::NoPen);
    39       painter->setPen(Qt::NoPen);
    37       painter->drawRect(option->exposedRect.toRect());
    40       painter->drawRect(option->exposedRect.toRect());
    38       painter->restore();
    41       painter->restore();