videocollection/tsrc/stubs/inc/hbview.h
branchRCL_3
changeset 56 839377eedc2b
equal deleted inserted replaced
54:315810614048 56:839377eedc2b
       
     1 /*
       
     2 * Copyright (c) 2008-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:  stub hbview
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef HBVIEW_H
       
    20 #define HBVIEW_H
       
    21 
       
    22 #include <QGraphicsWidget>
       
    23 #include "qstring.h"
       
    24 #include "hbinstance.h"
       
    25 #include "hbtoolbar.h"
       
    26 #include "hbeffect.h"
       
    27 
       
    28 class HbView : public QGraphicsWidget
       
    29 {
       
    30     Q_OBJECT
       
    31 
       
    32 public:
       
    33 
       
    34     HbView(QGraphicsItem *parent = 0) : QGraphicsWidget(parent), mToolBar(0), mNavigationAction(0)
       
    35     {
       
    36         Q_UNUSED(parent);
       
    37     }
       
    38     
       
    39     virtual ~HbView(){}
       
    40     
       
    41     HbMainWindow* mainWindow() const
       
    42     {
       
    43         return hbInstance->allMainWindows().value(0);
       
    44     }
       
    45     
       
    46     void setTitle(const QString &title)
       
    47     {
       
    48         mTitle = title;
       
    49     }
       
    50     
       
    51     HbToolBar *toolBar() const
       
    52     {
       
    53         if(!mToolBar) {
       
    54             mToolBar = new HbToolBar(qobject_cast<QGraphicsItem*>(this));
       
    55         }
       
    56         return mToolBar;
       
    57     }
       
    58     
       
    59     void setItemVisible(Hb::SceneItem item, bool visible)
       
    60     {
       
    61         Q_UNUSED(item);
       
    62         mSetItemVisibleLast = visible;
       
    63     }
       
    64     
       
    65     void setNavigationAction(HbAction *action)
       
    66     {
       
    67         mNavigationAction = action;
       
    68     }
       
    69     
       
    70     
       
    71     HbAction *mNavigationAction;
       
    72     
       
    73     mutable HbToolBar* mToolBar;
       
    74     
       
    75     QString mTitle;
       
    76     
       
    77 public:
       
    78     
       
    79     static bool mSetItemVisibleLast;
       
    80 };
       
    81 
       
    82 #endif // HBVIEW_H