phoneapp/phoneuiqtviewadapter/tsrc/ut_phoneuicommandcontroller/phoneuiqtbuttonscontroller_stub.cpp
changeset 36 2eacb6118286
parent 30 ebdbd102c78a
child 37 ba76fc04e6c2
equal deleted inserted replaced
30:ebdbd102c78a 36:2eacb6118286
     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 "phoneuiqtbuttonscontroller.h"
       
    18 #include <QtDebug>
       
    19 
       
    20 int m_phoneButtonFlags;
       
    21 
       
    22 PhoneUIQtButtonsController::PhoneUIQtButtonsController() : m_buttonFlags(0)
       
    23 {
       
    24 }
       
    25 
       
    26 PhoneUIQtButtonsController::~PhoneUIQtButtonsController ()
       
    27 {
       
    28 }
       
    29 
       
    30 void PhoneUIQtButtonsController::setButtonFlags (PhoneButtonFlags flag,bool set)
       
    31 {
       
    32     if (set) 
       
    33         {
       
    34         // Set the flag on (=1)
       
    35         m_buttonFlags |= flag; 
       
    36         }
       
    37     else 
       
    38         {
       
    39         // Set the flag off (=0)
       
    40         m_buttonFlags &= (~flag);     
       
    41         }
       
    42     
       
    43     m_phoneButtonFlags = m_buttonFlags;
       
    44 }