ui/views/viewbase/src/glxview.cpp
changeset 24 99ad1390cd33
equal deleted inserted replaced
23:74c9f037fd5d 24:99ad1390cd33
       
     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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 //include
       
    19 #include <hbmainwindow.h>
       
    20 #include <hbinstance.h>
       
    21 
       
    22 //User Includes
       
    23 #include "glxview.h"
       
    24 
       
    25 
       
    26 GlxView::GlxView(qint32 id, QGraphicsItem *parent ) : HbView(parent), mId(id)
       
    27 { 
       
    28     
       
    29 }
       
    30 
       
    31 bool GlxView::compare (qint32 id)
       
    32 { 
       
    33     return mId == id;
       
    34 }
       
    35 
       
    36 QSize GlxView::screenSize()
       
    37 {
       
    38     HbMainWindow *window = hbInstance->allMainWindows().first();
       
    39     QSize deviceSize = HbDeviceProfile::current().logicalSize();
       
    40     QSize screenSize = ( window->orientation() == Qt::Vertical ) ? QSize( deviceSize.width(), deviceSize.height() ) 
       
    41                                                                    : QSize( deviceSize.height(), deviceSize.width() )  ;
       
    42     return screenSize;
       
    43 }
       
    44 
       
    45 QRect GlxView::screenGeometry()
       
    46 {
       
    47     HbMainWindow *window = hbInstance->allMainWindows().first();
       
    48     QSize size = screenSize();
       
    49     QRect rect ( window->geometry().x(), window->geometry().y(), size.width(), size.height()  );
       
    50     return rect;
       
    51 }
       
    52 
       
    53 QGraphicsItem * GlxView::getAnimationItem( GlxEffect transtionEffect ) 
       
    54 {
       
    55     Q_UNUSED(transtionEffect)
       
    56     return NULL; 
       
    57 }