usbuis/imageprintui/src/settingscontainer.cpp
author William Roberts <williamr@symbian.org>
Thu, 22 Jul 2010 16:44:03 +0100
branchGCC_SURGE
changeset 63 ef2686f7597e
parent 3 47c263f7e521
parent 38 218231f2b3b3
permissions -rw-r--r--
Catchup to latest Symbian^4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
/*
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
*
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
*
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
* Contributors:
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
*
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
* Description:  Container class for UI
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
*
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
*/
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
//INCLUDES
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
#include <AknsDrawUtils.h> 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
#include <AknsBasicBackgroundControlContext.h>
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
#include <AknsConstants.h>
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
#include <AknUtils.h>
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
#include <eikenv.h>
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
#include <eiklbo.h>
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
#include "imageprintuidocument.h"
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
#include "imageprintuiappui.h"
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
#include "imageprintuiapp.h"
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
#include "capabilitymanager.h"
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
#include "imageprintui.hrh"
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
#include "settingscontainer.h"
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
#include "imageprintuidebug.h"
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
#include "settingsitems.h"
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
#include "settingstables.h"
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
#ifdef __SERIES60_HELP
38
218231f2b3b3 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 35
diff changeset
    39
//#include <csxhelp/usb.hlp.hrh>   // Help id
35
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
#endif
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
// ======== MEMBER FUNCTIONS ========
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
// 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
CSettingsContainer::CSettingsContainer()
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
    {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
    }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
// 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
void CSettingsContainer::ConstructL( const TRect& aRect, CImagePrintUiAppUi* aAppUi)
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
    {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::ConstructL"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
    CreateWindowL();
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
	
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
    // Create main itemlist
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
    iSettingsMainListBox = new (ELeave) CAknSettingStyleListBox;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
    iSettingsMainListBox->SetContainerWindowL( *this );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
    iSettingsMainListBox->ConstructL( this, EAknListBoxMarkableList );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
    iAppUi = aAppUi;  
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
    iSettingsItems = CSettingsItems::NewL( aAppUi->CapabilityManager(), aAppUi->Notes() );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
    // Set up/down arrows at bottom of the screen (scrollbar)
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
    iSettingsMainListBox->CreateScrollBarFrameL( ETrue );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
    iSettingsMainListBox->ScrollBarFrame()->SetScrollBarVisibilityL( 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
        CEikScrollBarFrame::EOn, CEikScrollBarFrame::EAuto );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
    // Set up the observer (events listener)
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
    iSettingsMainListBox->SetListBoxObserver( iSettingsItems );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
    // Set text labels for list items
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
    iSettingsMainListBox->Model()->SetItemTextArray( iSettingsItems );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
    iSettingsMainListBox->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );   // Does not delete items array
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
    SetRect(aRect);
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
    ActivateL();    
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::ConstructL complete"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
    }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
// 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    94
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    95
CSettingsContainer* CSettingsContainer::NewL( 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    96
    const TRect& aRect, CImagePrintUiAppUi* aAppUi )
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    97
    {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    98
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::NewL"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
    99
    CSettingsContainer* self = CSettingsContainer::NewLC( aRect, aAppUi );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   100
    CleanupStack::Pop( self );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   101
    return self;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   102
    }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   103
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   104
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   105
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   106
// 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   107
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   108
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   109
CSettingsContainer* CSettingsContainer::NewLC( 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   110
    const TRect& aRect, CImagePrintUiAppUi* aAppUi)
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   111
    {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   112
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::NewLC"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   113
    
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   114
    CSettingsContainer* self = new( ELeave ) CSettingsContainer;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   115
    CleanupStack::PushL( self );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   116
    self->ConstructL( aRect, aAppUi );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   117
    return self;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   118
    }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   119
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   120
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   121
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   122
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   123
// 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   124
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   125
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   126
CSettingsContainer::~CSettingsContainer()
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   127
    {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   128
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::Destructor"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   129
    delete iSettingsMainListBox; 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   130
    delete iSettingsItems;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   131
    }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   132
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   133
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   134
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   135
// From class CCoeControl
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   136
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   137
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   138
void CSettingsContainer::SizeChanged()
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   139
    {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   140
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::SizeChanged()"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   141
    
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   142
    iSettingsMainListBox->SetRect( Rect() ); 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   143
    iSettingsMainListBox->SetFocus( ETrue );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   144
    
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   145
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::SizeChanged() complete"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   146
	}
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   147
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   148
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   149
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   150
// 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   151
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   152
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   153
 void CSettingsContainer::HandleResourceChange(TInt aType)
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   154
 {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   155
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::HandleResourceChange"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   156
    CCoeControl::HandleResourceChange( aType ); 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   157
    if( aType == KEikDynamicLayoutVariantSwitch )
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   158
        {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   159
        TRect mainPaneRect;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   160
        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect);
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   161
        SetRect(mainPaneRect);
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   162
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   163
        DrawNow(); 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   164
        }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   165
    else if ( aType == KAknsMessageSkinChange )
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   166
        {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   167
        iSettingsMainListBox->HandleResourceChange(aType); 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   168
        }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   169
       
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   170
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::HandleResourceChange complete"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   171
}
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   172
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   173
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   174
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   175
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   176
// Returns the number of controls inside this container
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   177
// ----------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   178
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   179
TInt CSettingsContainer::CountComponentControls() const
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   180
    {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   181
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::CountComponentControls"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   182
    
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   183
    return KImagePrintComponentCount; 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   184
    }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   185
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   186
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   187
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   188
// Returns the control inside this container
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   189
// ----------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   190
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   191
CCoeControl* CSettingsContainer::ComponentControl( TInt aIndex ) const
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   192
    {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   193
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::ComponentControl"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   194
    
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   195
    switch ( aIndex )
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   196
        {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   197
        case 0:
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   198
            {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   199
            return iSettingsMainListBox;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   200
            }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   201
        default:
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   202
            {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   203
            return NULL;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   204
            }            
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   205
        }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   206
    }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   207
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   208
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   209
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   210
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   211
// Redirects keypresses to the listbox
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   212
// ----------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   213
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   214
TKeyResponse CSettingsContainer::OfferKeyEventL(
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   215
    const TKeyEvent& aKeyEvent,TEventCode aType )
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   216
    {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   217
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::OfferKeyEventL()"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   218
    
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   219
    if( ( iSettingsMainListBox ) && ( aKeyEvent.iCode != EKeyLeftArrow )
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   220
         && ( aKeyEvent.iCode != EKeyRightArrow ) )
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   221
        {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   222
        TKeyResponse res = iSettingsMainListBox->OfferKeyEventL( aKeyEvent, aType );
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   223
        // Store current item index for options list usage later
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   224
        return res;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   225
        }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   226
        
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   227
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::OfferKeyEventL complete"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   228
    
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   229
    return EKeyWasNotConsumed;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   230
    
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   231
    }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   232
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   233
// ---------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   234
// This is called by view class when user has selected Change from Options menu 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   235
// ----------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   236
void CSettingsContainer::HandleChange()
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   237
    {
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   238
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::HandleChange"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   239
    TRAPD(err, iSettingsItems->HandleListBoxEventL( iSettingsMainListBox, 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   240
        MEikListBoxObserver::EEventEnterKeyPressed ));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   241
    if(err)
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   242
    	{
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   243
        FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::error at HandleChange")); 	
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   244
    	}
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   245
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::HandleChange complete"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   246
    }
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   247
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   248
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   249
#ifdef __SERIES60_HELP
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   250
// -----------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   251
// From class CCoeControl
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   252
// For getting help context
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   253
// -----------------------------------------------------------------------------
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   254
//
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   255
void CSettingsContainer::GetHelpContext( TCoeHelpContext& aContext ) const
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   256
	{
38
218231f2b3b3 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 35
diff changeset
   257
 /*
35
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   258
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::GetHelpContext"));
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   259
	aContext.iMajor = KUidUSB; 
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   260
	aContext.iContext = KUSB_HLP_PRINT_SETTINGS;
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   261
    FLOG(_L("[IMAGEPRINTUI]\t CSettingsContainer::GetHelpContext complete"));
38
218231f2b3b3 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 35
diff changeset
   262
*/
35
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   263
	}
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   264
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   265
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   266
#endif //__SERIES60_HELP
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   267
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   268
//End of File
9d8b04ca6939 Revert last code drop.
Pat Downey <patd@symbian.org>
parents:
diff changeset
   269