phoneapp/phoneuiview2/src/phoneaction.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:  Actions and associated translated texts.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "phoneaction.h"
       
    19 
       
    20 PhoneAction::PhoneAction () : 
       
    21     m_text (QString ()), m_command (-1), m_icon (HbIcon ()), m_disabled(false),
       
    22     m_role(PhoneAction::None)
       
    23 {
       
    24 }
       
    25 
       
    26 PhoneAction::~PhoneAction ()
       
    27 {
       
    28 }
       
    29 
       
    30 QString PhoneAction::text () const
       
    31 {
       
    32     return m_text;
       
    33 }
       
    34 
       
    35 void PhoneAction::setText (QString text)
       
    36 {
       
    37     m_text = text;
       
    38 }
       
    39 
       
    40 int PhoneAction::command () const
       
    41 {
       
    42     return m_command;
       
    43 }
       
    44 
       
    45 void PhoneAction::setCommand (int command)
       
    46 {
       
    47     m_command = command;
       
    48 }
       
    49 
       
    50 HbIcon PhoneAction::icon () const
       
    51 {
       
    52     return m_icon;
       
    53 }
       
    54 
       
    55 void PhoneAction::setIcon (HbIcon icon)
       
    56 {
       
    57     m_icon = icon;
       
    58 }
       
    59 
       
    60 void PhoneAction::setDisabled(bool disabled)
       
    61 {
       
    62     m_disabled = disabled;
       
    63 }
       
    64 
       
    65 bool PhoneAction::isDisabled() const
       
    66 {
       
    67     return m_disabled;
       
    68 }
       
    69 
       
    70 void PhoneAction::setActionRole(ActionRole role)
       
    71 {
       
    72     m_role = role;
       
    73 }
       
    74 
       
    75 PhoneAction::ActionRole PhoneAction::actionRole() const
       
    76 {
       
    77     return m_role;
       
    78 }
       
    79