|
1 /* |
|
2 * Copyright (c) 2006, 2007 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: Header file for settingsitems |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CSETTINGSITEMS_H |
|
22 #define CSETTINGSITEMS_H |
|
23 |
|
24 // EXTERNAL INCLUDES |
|
25 #include <bamdesca.h> |
|
26 #include <eiklbo.h> |
|
27 #include "settingstables.h" |
|
28 #include "pictbridge.h" |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CCapabilityManager; |
|
32 class CNotes; |
|
33 |
|
34 // CONSTANTS |
|
35 _LIT( KTab, "\t" ); |
|
36 const TInt KSettingsMaxSize = 256; |
|
37 const TInt KDefaultArrayValue = 3; |
|
38 |
|
39 /** |
|
40 * |
|
41 * List box model that handles the contents of the list box and launches |
|
42 * the pop-up dialogs that are used . |
|
43 * |
|
44 */ |
|
45 class CSettingsItems : |
|
46 public CBase, |
|
47 public MEikListBoxObserver, |
|
48 public MDesCArray |
|
49 { |
|
50 |
|
51 public: |
|
52 |
|
53 /** |
|
54 * Two-phase constructor |
|
55 * |
|
56 * @param aManager the pointer to the CapabilityManager |
|
57 * @param aNotes the pointer to the CNotes |
|
58 * @return Initialized instance of CSettingsItems |
|
59 */ |
|
60 static CSettingsItems* NewL( CCapabilityManager* aManager, CNotes* aNotes); |
|
61 |
|
62 /** |
|
63 * Two-phase constructor |
|
64 * |
|
65 * @param aManager the pointer to the CapabilityManager |
|
66 * @param aNotes the pointer to the CNotes |
|
67 * @return Initialized instance of CSettingsItems |
|
68 */ |
|
69 static CSettingsItems* NewLC( CCapabilityManager* aManager, CNotes* aNotes); |
|
70 |
|
71 |
|
72 /** |
|
73 * Destructor |
|
74 */ |
|
75 virtual ~CSettingsItems(); |
|
76 |
|
77 private: // Constructors and destructors |
|
78 |
|
79 /** |
|
80 * Constructor |
|
81 * @param aManager the pointer to the CapabilityManager |
|
82 * @param aNotes the pointer to the CNotes |
|
83 */ |
|
84 CSettingsItems( CCapabilityManager* aManager, CNotes* aNotes); |
|
85 |
|
86 /** |
|
87 * 2nd phase constructor |
|
88 */ |
|
89 void ConstructL(); |
|
90 |
|
91 public: // Methods derived from MEikListBoxObserver |
|
92 |
|
93 |
|
94 /** |
|
95 * Framework method to handle listbox event |
|
96 */ |
|
97 void HandleListBoxEventL( CEikListBox* aListBox, |
|
98 TListBoxEvent aEventType ); |
|
99 |
|
100 public: // Methods derived from MDesCArray |
|
101 |
|
102 |
|
103 |
|
104 /** |
|
105 * Return number of items in listbox |
|
106 */ |
|
107 TInt MdcaCount() const; |
|
108 |
|
109 /** |
|
110 * Creates the text string for the list box item and returns it, |
|
111 * set sting to iBubber, can leave |
|
112 */ |
|
113 TPtrC MdcaPointL( TInt aIndex ) const; |
|
114 |
|
115 /** |
|
116 * Creates the text string for the list box item and returns it, |
|
117 * set string to iBuffer |
|
118 */ |
|
119 TPtrC MdcaPoint( TInt aIndex ) const; |
|
120 |
|
121 |
|
122 private: |
|
123 |
|
124 /** |
|
125 * Opens the radio button page to change print settings |
|
126 */ |
|
127 void HandleEvent( TInt aCapability, |
|
128 const TConversionTable* aTable, |
|
129 const TInt aTableSize, const HBufC* aTitle ); |
|
130 /** |
|
131 * Opens the radio button page to change print settings, can leave |
|
132 */ |
|
133 void HandleEventL(TInt aCapability, |
|
134 const TConversionTable* aTable, |
|
135 const TInt aTableSize, const HBufC* aTitle ); |
|
136 |
|
137 /** |
|
138 * Retrieve current print setting string |
|
139 */ |
|
140 void GetCurrentStringL( TInt aCapability, |
|
141 const TConversionTable* aTable, |
|
142 const TInt aTableSize ) const; |
|
143 |
|
144 |
|
145 private: // Data |
|
146 |
|
147 CCapabilityManager* iCapabilityManager; |
|
148 |
|
149 CNotes* iNotes; |
|
150 |
|
151 TInt iCount; |
|
152 |
|
153 HBufC* iBuffer; |
|
154 |
|
155 HBufC* iLayout; |
|
156 |
|
157 HBufC* iPaperSize; |
|
158 |
|
159 HBufC* iQuality; |
|
160 }; |
|
161 |
|
162 #endif |