|
1 /* |
|
2 * Copyright (c) 2002 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: Setting page class for "Alert for" setting. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDES |
|
21 #include "CProfileAlertForSettingPage.h" |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS =============================== |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // CProfileAlertForSettingPage::CProfileAlertForSettingPage |
|
27 // C++ constructor can NOT contain any code, that might leave. |
|
28 // ----------------------------------------------------------------------------- |
|
29 // |
|
30 CProfileAlertForSettingPage::CProfileAlertForSettingPage( |
|
31 TInt aResourceID, |
|
32 CSelectionItemList* aItemArray ) |
|
33 : CAknCheckBoxSettingPage( aResourceID, aItemArray ) |
|
34 { |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // CProfileAlertForSettingPage::UpdateCba |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 void CProfileAlertForSettingPage::UpdateCba() |
|
42 { |
|
43 // Cache the pointer to button group container |
|
44 CEikButtonGroupContainer* cba = Cba(); |
|
45 // Left softkey should be visible if there are items selected, |
|
46 // i.e. the selection index array has items. |
|
47 TBool visible( ListBoxControl()->View()->SelectionIndexes()->Count() > 0 ); |
|
48 // Resolve left softkey command id |
|
49 TInt leftId( cba->ButtonGroup()->CommandId( 0 ) ); |
|
50 // Check if left softkey visibility has changed |
|
51 if( visible != cba->IsCommandVisible( leftId ) ) |
|
52 { |
|
53 // Left softkey visibility has changed, update it |
|
54 cba->MakeCommandVisible( leftId, visible ); |
|
55 } |
|
56 cba->DrawDeferred(); |
|
57 } |
|
58 |
|
59 // End of File |