systemsettings/gssensorplugin/src/gssenturnctrlcontainer.cpp
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Sensor turn control view container
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "gssenturnctrlcontainer.h" 
       
    21 #include "gssensorplugin.hrh"
       
    22 #include "gssensorplugin_debug.h"
       
    23 
       
    24 #include <aknlists.h>
       
    25 #include <gssensorpluginrsc.rsg>
       
    26 
       
    27 
       
    28 // ========================= MEMBER FUNCTIONS ================================
       
    29 
       
    30 // ---------------------------------------------------------------------------
       
    31 // CGSSenTurnCtrlContainer::CGSSenTurnCtrlContainer
       
    32 // Default constructor
       
    33 // ---------------------------------------------------------------------------
       
    34 //
       
    35 CGSSenTurnCtrlContainer::CGSSenTurnCtrlContainer( 
       
    36     CGSSensorPluginModel* aModel, 
       
    37     MGSSensorMskObserver& aMskObserver ) : 
       
    38     CGSSenBaseContainer( aMskObserver )
       
    39     {
       
    40     TRACE_( "[GSSensorPlugin] CGSSenTurnCtrlContainer::CGSSenTurnCtrlContainer()" );
       
    41     iModel = aModel;
       
    42     TRACE_( "[GSSensorPlugin] CGSSenTurnCtrlContainer::CGSSenTurnCtrlContainer() - return" );
       
    43     }
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // CGSSenTurnCtrlContainer::ConstructL
       
    47 // Symbian OS two phased constructor
       
    48 // ---------------------------------------------------------------------------
       
    49 //
       
    50 void CGSSenTurnCtrlContainer::ConstructL( const TRect& aRect )
       
    51     {
       
    52     TRACE_( "[GSSensorPlugin] CGSSenTurnCtrlContainer::ConstructL()" );
       
    53     // Has to create listbox before calling BaseConstructL because base class
       
    54     // uses iListBox
       
    55     iListBox = new( ELeave ) CAknSingleGraphicStyleListBox();
       
    56     BaseConstructL( aRect, R_GS_TURNCTRL_VIEW_TITLE, R_GS_TURNING_CONTROL_LBX );
       
    57     TRACE_( "[GSSensorPlugin] CGSSenTurnCtrlContainer::ConstructL() - return" );
       
    58     }
       
    59 
       
    60 // ---------------------------------------------------------------------------
       
    61 // CGSSenTurnCtrlContainer::~CGSSenTurnCtrlContainer()
       
    62 // Destructor
       
    63 // ---------------------------------------------------------------------------
       
    64 //
       
    65 CGSSenTurnCtrlContainer::~CGSSenTurnCtrlContainer()
       
    66     {
       
    67     TRACE_( "[GSSensorPlugin] CGSSenTurnCtrlContainer::~CGSSenTurnCtrlContainer()" );
       
    68     }
       
    69 
       
    70 // ---------------------------------------------------------------------------
       
    71 // CGSSenTurnCtrlContainer::ConstructListBoxL()
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74 void CGSSenTurnCtrlContainer::ConstructListBoxL( TInt aResLbxId )
       
    75     {
       
    76     TRACE_( "[GSSensorPlugin] CGSSenTurnCtrlContainer::ConstructListBoxL()" );
       
    77     CGSSenBaseContainer::ConstructListBoxL( aResLbxId, R_GS_TURNING_CONTROL_MS );
       
    78     TRACE_( "[GSSensorPlugin] CGSSenTurnCtrlContainer::ConstructListBoxL() - return" );
       
    79     }
       
    80 
       
    81 // ---------------------------------------------------------------------------
       
    82 // CGSSenTurnCtrlContainer::InteractionId
       
    83 // ---------------------------------------------------------------------------
       
    84 //
       
    85 TInt CGSSenTurnCtrlContainer::InteractionId()
       
    86     {
       
    87     TRACE_1( "[GSSensorPlugin] CGSSenTurnCtrlContainer::InteractionId() - %i", EGSSenTurning );
       
    88     return EGSSenTurning;
       
    89     }
       
    90 
       
    91 // ---------------------------------------------------------------------------
       
    92 // CGSSenTurnCtrlContainer::UpdateCheckboxIconsL
       
    93 // ---------------------------------------------------------------------------
       
    94 //
       
    95 void CGSSenTurnCtrlContainer::UpdateCheckboxIconsL()
       
    96     {
       
    97     TRACE_( "[GSSensorPlugin] CGSSenTurnCtrlContainer::UpdateCheckboxIconsL()" );
       
    98     // Silence Call
       
    99     UpdateCheckboxIconL( KGSTurnCtrlSC );
       
   100     // Silence Alarm
       
   101     UpdateCheckboxIconL( KGSTurnCtrlSA );
       
   102     // Display orientation
       
   103     UpdateCheckboxIconL( KGSDisplayOrientation );
       
   104     TRACE_( "[GSSensorPlugin] CGSSenTurnCtrlContainer::UpdateCheckboxIconsL() - return" );
       
   105     }