|
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 the License "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: MPSettingsUDPPortSettingItem.cpp* |
|
15 */ |
|
16 |
|
17 |
|
18 // Version : %version: 3 % |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include <akntextsettingpage.h> |
|
25 |
|
26 #include "mediasettings.hrh" |
|
27 #include "MPSettingsUDPPortSettingItem.h" |
|
28 #include "mpxlog.h" |
|
29 |
|
30 // ============================ MEMBER FUNCTIONS =============================== |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CMPSettingsUDPPortSettingItem::CMPSettingsUDPPortSettingItem |
|
34 // C++ default constructor can NOT contain any code, that |
|
35 // might leave. |
|
36 // ----------------------------------------------------------------------------- |
|
37 // |
|
38 CMPSettingsUDPPortSettingItem::CMPSettingsUDPPortSettingItem(TInt aIdentifier, TInt& aValue, TInt& aRefValue) : |
|
39 CAknIntegerEdwinSettingItem(aIdentifier, aValue), iRefValue(aRefValue) |
|
40 { |
|
41 MPX_DEBUG2(_L("#MS# CMPSettingsUDPPortSettingItem::CMPSettingsUDPPortSettingItem(%d)"),aIdentifier); |
|
42 } |
|
43 |
|
44 // Destructor |
|
45 CMPSettingsUDPPortSettingItem::~CMPSettingsUDPPortSettingItem() |
|
46 { |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CMPSettingsUDPPortSettingItem::EditItemL |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 void CMPSettingsUDPPortSettingItem::EditItemL(TBool /*aCalledFromMenu*/) |
|
54 { |
|
55 MPX_FUNC("#MS# CMPSettingsUDPPortSettingItem::EditItemL()"); |
|
56 CAknSettingPage* dlg = new( ELeave )CAknIntegerSettingPage( |
|
57 SettingPageResourceId(), |
|
58 InternalValueRef(), |
|
59 SettingPageFlags()); |
|
60 |
|
61 SetSettingPage(dlg); |
|
62 SettingPage()->SetSettingPageObserver(this); |
|
63 SettingPage()->ConstructL(); |
|
64 |
|
65 switch(Identifier()) |
|
66 { |
|
67 case EMPSettMinUDPPortSettingId: |
|
68 static_cast<CAknIntegerSettingPage*>(SettingPage())->IntegerEditorControl()->SetMaximumIntegerValue(iRefValue); |
|
69 break; |
|
70 case EMPSettMaxUDPPortSettingId: |
|
71 static_cast<CAknIntegerSettingPage*>(SettingPage())->IntegerEditorControl()->SetMinimumIntegerValue(iRefValue); |
|
72 break; |
|
73 default: |
|
74 break; |
|
75 } |
|
76 |
|
77 SettingPage()->ExecuteLD(CAknSettingPage::EUpdateWhenChanged); |
|
78 SetSettingPage(NULL); |
|
79 } |
|
80 |
|
81 // End of File |