systemsettings/gssensorplugin/src/gssenorientationcontainer.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 orientation view container
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "gssenorientationcontainer.h" 
       
    21 #include "gssensorplugin.hrh"
       
    22 #include "gssensorplugin_debug.h"
       
    23 
       
    24 #include <aknlists.h>
       
    25 #include <gssensorpluginrsc.rsg>
       
    26 
       
    27 // ========================= MEMBER FUNCTIONS ================================
       
    28 
       
    29 // ---------------------------------------------------------------------------
       
    30 // CGSSenOrientationContainer::CGSSenOrientationContainer
       
    31 // Default constructor
       
    32 // ---------------------------------------------------------------------------
       
    33 //
       
    34 CGSSenOrientationContainer::CGSSenOrientationContainer( CGSSensorPluginModel* aModel )
       
    35     {
       
    36     TRACE_( "[GSSensorPlugin] CGSSenOrientationContainer::CGSSenOrientationContainer()" );
       
    37     iModel = aModel;
       
    38     TRACE_( "[GSSensorPlugin] CGSSenOrientationContainer::CGSSenOrientationContainer() - return" );
       
    39     }
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 // CGSSenOrientationContainer::ConstructL
       
    43 // Symbian OS two phased constructor
       
    44 // ---------------------------------------------------------------------------
       
    45 //
       
    46 void CGSSenOrientationContainer::ConstructL( const TRect& aRect )
       
    47     {
       
    48     TRACE_( "[GSSensorPlugin] CGSSenOrientationContainer::ConstructL()" );
       
    49     // Has to create listbox before calling BaseConstructL because base class
       
    50     // uses iListBox
       
    51     iListBox = new( ELeave ) CAknSingleGraphicStyleListBox();
       
    52     BaseConstructL( aRect, R_GS_ORIENTATION_VIEW_TITLE, R_GS_ORIENTATION_LBX );
       
    53     TRACE_( "[GSSensorPlugin] CGSSenOrientationContainer::ConstructL() - return" );
       
    54     }
       
    55 
       
    56 // ---------------------------------------------------------------------------
       
    57 // CGSSenOrientationContainer::~CGSSenOrientationContainer()
       
    58 // Destructor
       
    59 // ---------------------------------------------------------------------------
       
    60 //
       
    61 CGSSenOrientationContainer::~CGSSenOrientationContainer()
       
    62     {
       
    63     TRACE_( "[GSSensorPlugin] CGSSenOrientationContainer::~CGSSenOrientationContainer()" );
       
    64     }
       
    65 
       
    66 // ---------------------------------------------------------------------------
       
    67 // CGSSenOrientationContainer::ConstructListBoxL()
       
    68 // ---------------------------------------------------------------------------
       
    69 //
       
    70 void CGSSenOrientationContainer::ConstructListBoxL( TInt aResLbxId )
       
    71     {
       
    72     TRACE_( "[GSSensorPlugin] CGSSenOrientationContainer::ConstructListBoxL()" );
       
    73     CGSSenBaseContainer::ConstructListBoxL( aResLbxId, R_GS_ORIENTATION_MS );
       
    74     TRACE_( "[GSSensorPlugin] CGSSenOrientationContainer::ConstructListBoxL() - return" );
       
    75     }
       
    76 
       
    77 // ---------------------------------------------------------------------------
       
    78 // CGSSenOrientationContainer::InteractionId
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 TInt CGSSenOrientationContainer::InteractionId()
       
    82     {
       
    83     TRACE_1( "[GSSensorPlugin] CGSSenOrientationContainer::InteractionId() - %i", EGSSenOrientation );
       
    84     return EGSSenOrientation;
       
    85     }
       
    86 
       
    87 // ---------------------------------------------------------------------------
       
    88 // CGSSenOrientationContainer::UpdateCheckboxIconsL
       
    89 // ---------------------------------------------------------------------------
       
    90 //
       
    91 void CGSSenOrientationContainer::UpdateCheckboxIconsL()
       
    92     {
       
    93     TRACE_( "[GSSensorPlugin] CGSSenOrientationContainer::UpdateCheckboxIconsL()" );
       
    94     // Camera
       
    95     UpdateCheckboxIconL( KGSOrientationCam );
       
    96     // Phone display
       
    97     UpdateCheckboxIconL( KGSOrientationPD );
       
    98     TRACE_( "[GSSensorPlugin] CGSSenOrientationContainer::UpdateCheckboxIconsL() - return" );
       
    99     }