phoneapp/phoneuiview2/tsrc/ut_phoneuiqtview/hbtoolbar_stub.cpp
changeset 78 baacf668fe89
parent 76 cfea66083b62
equal deleted inserted replaced
76:cfea66083b62 78:baacf668fe89
     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: 
       
    15 *
       
    16 */
       
    17 #include "hbtoolbar.h"
       
    18 #include <hbaction.h>
       
    19 
       
    20 bool m_clearCalled;
       
    21 bool m_hideCalled;
       
    22 bool m_showCalled;
       
    23 bool m_clearActionsCalled;
       
    24 bool m_setOrientationCalled;
       
    25 bool m_toolBarUpdateCalled;
       
    26 HbAction *m_action;
       
    27 QList<QAction*> m_actions;
       
    28 
       
    29 HbToolBar::HbToolBar (QObject *parent)
       
    30 {
       
    31     Q_UNUSED (parent);
       
    32     reset ();
       
    33 }
       
    34 
       
    35 void HbToolBar::reset ()
       
    36 {
       
    37     m_clearCalled = false;
       
    38     m_hideCalled = false;
       
    39     m_showCalled = false;
       
    40     m_clearActionsCalled = false;
       
    41     m_toolBarUpdateCalled = false;
       
    42     m_action = 0;
       
    43 }
       
    44 
       
    45 void HbToolBar::clear ()
       
    46 {
       
    47     m_clearCalled = true;	
       
    48 }
       
    49 
       
    50 void HbToolBar::hide ()
       
    51 {
       
    52     m_hideCalled = true;	
       
    53 }
       
    54 
       
    55 void HbToolBar::show ()
       
    56 {
       
    57     m_showCalled = true;
       
    58 }
       
    59 
       
    60 void HbToolBar::addAction (HbAction *action)
       
    61 {
       
    62     m_action = action;
       
    63     m_actions.append(action);
       
    64 }
       
    65 
       
    66 void HbToolBar::clearActions ()
       
    67 {
       
    68     m_clearActionsCalled = true;
       
    69 }
       
    70 
       
    71 void HbToolBar::setOrientation(Qt::Orientation orientation)
       
    72 {
       
    73     m_setOrientationCalled = true;
       
    74 }
       
    75 
       
    76 void HbToolBar::removeAction(HbAction *action)
       
    77 {
       
    78     m_actions.removeOne(action);
       
    79 }
       
    80 
       
    81 QList<QAction*> HbToolBar::actions() const
       
    82 {
       
    83     return m_actions;	
       
    84 }
       
    85 
       
    86 void HbToolBar::update()
       
    87 {
       
    88     m_toolBarUpdateCalled = true;
       
    89 }
       
    90