19
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd.
|
|
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 |
* Kanrikogaku Kenkyusho, Ltd. - Initial contribution
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include <aknviewappui.h>
|
|
19 |
#include <akntoolbar.h>
|
|
20 |
#include <barsread.h>
|
|
21 |
#include <DirectPrintApp.rsg>
|
|
22 |
|
|
23 |
#include "clog.h"
|
|
24 |
#include "directprintapp.hrh"
|
|
25 |
#include "directprintmodel.h"
|
|
26 |
#include "directprintpropertyview.h"
|
|
27 |
#include "DirectPrintUiPluginMgr.h"
|
|
28 |
#include "DirectPrintUiPlugin.h"
|
|
29 |
|
|
30 |
CDirectPrintPropertyView::CDirectPrintPropertyView()
|
|
31 |
{
|
|
32 |
iListBox = NULL;
|
|
33 |
}
|
|
34 |
|
|
35 |
CDirectPrintPropertyView::~CDirectPrintPropertyView()
|
|
36 |
{
|
|
37 |
AppUi()->RemoveFromViewStack(*this, iListBox);
|
|
38 |
delete iListBox;
|
|
39 |
}
|
|
40 |
|
|
41 |
CDirectPrintPropertyView* CDirectPrintPropertyView::NewL()
|
|
42 |
{
|
|
43 |
CDirectPrintPropertyView* self = CDirectPrintPropertyView::NewLC();
|
|
44 |
CleanupStack::Pop(self);
|
|
45 |
return self;
|
|
46 |
}
|
|
47 |
|
|
48 |
CDirectPrintPropertyView* CDirectPrintPropertyView::NewLC()
|
|
49 |
{
|
|
50 |
CDirectPrintPropertyView* self = new(ELeave) CDirectPrintPropertyView();
|
|
51 |
CleanupStack::PushL(self);
|
|
52 |
self->ConstructL();
|
|
53 |
return self;
|
|
54 |
}
|
|
55 |
|
|
56 |
void CDirectPrintPropertyView::ConstructL()
|
|
57 |
{
|
|
58 |
LOG("CDirectPrintPropertyView::ConstructL BEGIN");
|
|
59 |
BaseConstructL(R_DIRECTPRINT_PROPERTYSETTING_VIEW);
|
|
60 |
|
|
61 |
iViewId = TUid::Uid(EDirectPrintPropertyViewId);
|
|
62 |
LOG("CDirectPrintPropertyView::ConstructL END");
|
|
63 |
}
|
|
64 |
|
|
65 |
void CDirectPrintPropertyView::HandleCommandL(TInt aCommand)
|
|
66 |
{
|
|
67 |
switch (aCommand)
|
|
68 |
{
|
|
69 |
case EAknSoftkeyBack:
|
|
70 |
{
|
|
71 |
AppUi()->HandleCommandL(EDirectPrintCmdIdPropertySettingViewBack);
|
|
72 |
}
|
|
73 |
break;
|
|
74 |
default:
|
|
75 |
{
|
|
76 |
AppUi()->HandleCommandL(aCommand);
|
|
77 |
}
|
|
78 |
break;
|
|
79 |
}
|
|
80 |
}
|
|
81 |
|
|
82 |
void CDirectPrintPropertyView::OfferToolbarEventL(TInt aCommand)
|
|
83 |
{
|
|
84 |
switch (aCommand)
|
|
85 |
{
|
|
86 |
case EDirectPrintCmdIdPropertySettingViewPreview:
|
|
87 |
{
|
|
88 |
AppUi()->HandleCommandL(aCommand);
|
|
89 |
}
|
|
90 |
break;
|
|
91 |
default:
|
|
92 |
break;
|
|
93 |
}
|
|
94 |
}
|
|
95 |
|
|
96 |
void CDirectPrintPropertyView::ChangeTabL(TInt aTabIndex)
|
|
97 |
{
|
|
98 |
iTabIndex = aTabIndex;
|
|
99 |
iListBox->SettingItemArray()->ResetAndDestroy();
|
|
100 |
LoadListL();
|
|
101 |
iListBox->LoadSettingsL();
|
|
102 |
iListBox->DrawNow();
|
|
103 |
}
|
|
104 |
|
|
105 |
void CDirectPrintPropertyView::DoActivateL(const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/)
|
|
106 |
{
|
|
107 |
LOG("CDirectPrintPropertyView::DoActivateL BEGIN");
|
|
108 |
CAknToolbar* toolbar = AppUi()->CurrentFixedToolbar();
|
|
109 |
toolbar->SetToolbarObserver(this);
|
|
110 |
|
|
111 |
ReadDataL();
|
|
112 |
|
|
113 |
// Create list box
|
|
114 |
if (!iListBox)
|
|
115 |
{
|
|
116 |
iListBox = CDirectPrintSettingListBox::NewL(ClientRect());
|
|
117 |
iListBox->SetMopParent(this);
|
|
118 |
iListBox->ConstructFromResourceL(R_DIRECTPRINT_PROPERTYSETTING_SETTING_ITEM_LIST);
|
|
119 |
iListBox->ActivateL();
|
|
120 |
}
|
|
121 |
ChangeTabL(EDirectPrintPaperSettingTab);
|
|
122 |
iListBox->LoadSettingsL();
|
|
123 |
AppUi()->AddToStackL(*this, iListBox);
|
|
124 |
iListBox->MakeVisible(ETrue);
|
|
125 |
iListBox->DrawNow();
|
|
126 |
|
|
127 |
// set the title pane
|
|
128 |
SetActiveTitleL(R_DIRECTPRINT_PROPERTYSETTING_TITLE);
|
|
129 |
LOG("CDirectPrintPropertyView::DoActivateL END");
|
|
130 |
}
|
|
131 |
|
|
132 |
void CDirectPrintPropertyView::DoDeactivate()
|
|
133 |
{
|
|
134 |
LOG("CDirectPrintPropertyView::DoDeactivate BEGIN");
|
|
135 |
TInt err = 0;
|
|
136 |
|
|
137 |
if (iListBox)
|
|
138 |
{
|
|
139 |
TRAP(err, iListBox->StoreSettingsL());
|
|
140 |
TRAP(err, WriteDataL());
|
|
141 |
|
|
142 |
iListBox->MakeVisible(EFalse);
|
|
143 |
AppUi()->RemoveFromViewStack(*this, iListBox);
|
|
144 |
}
|
|
145 |
LOG("CDirectPrintPropertyView::DoDeactivate END");
|
|
146 |
}
|
|
147 |
|
|
148 |
void CDirectPrintPropertyView::LoadListL()
|
|
149 |
{
|
|
150 |
LOG("CDirectPrintPropertyView::LoadListL BEGIN");
|
|
151 |
|
|
152 |
switch (iTabIndex)
|
|
153 |
{
|
|
154 |
case EDirectPrintPaperSettingTab:
|
|
155 |
{
|
|
156 |
LoadPaperTabL();
|
|
157 |
}
|
|
158 |
break;
|
|
159 |
case EDirectPrintPageSettingTab:
|
|
160 |
{
|
|
161 |
LoadPageTabL();
|
|
162 |
}
|
|
163 |
break;
|
|
164 |
case EDirectPrintMarginSettingTab:
|
|
165 |
{
|
|
166 |
LoadMarginTabL();
|
|
167 |
}
|
|
168 |
break;
|
|
169 |
case EDirectPrintHeaderSettingTab:
|
|
170 |
{
|
|
171 |
LoadHeaderTabL();
|
|
172 |
}
|
|
173 |
break;
|
|
174 |
case EDirectPrintFooterSettingTab:
|
|
175 |
{
|
|
176 |
LoadFooterTabL();
|
|
177 |
}
|
|
178 |
break;
|
|
179 |
default:
|
|
180 |
break;
|
|
181 |
}
|
|
182 |
|
|
183 |
// Set extend setting item
|
|
184 |
CDirectPrintUiPlugin* plugin = GetPluginMgr().CurrentPluginL();
|
|
185 |
if (plugin)
|
|
186 |
{
|
|
187 |
plugin->LoadExtendItemsL(*(iListBox->SettingItemArray()), iTabIndex);
|
|
188 |
}
|
|
189 |
|
|
190 |
iListBox->HandleChangeInItemArrayOrVisibilityL();
|
|
191 |
LOG("CDirectPrintPropertyView::LoadListL END");
|
|
192 |
}
|
|
193 |
|
|
194 |
void CDirectPrintPropertyView::ReadDataL()
|
|
195 |
{
|
|
196 |
LOG("CDirectPrintPropertyView::ReadDataL BEGIN");
|
|
197 |
|
|
198 |
CDirectPrintModel& model = GetModel();
|
|
199 |
CPrinterProperty* property = model.GetCurrentPrinterPropertyL(TUid::Uid(0));
|
|
200 |
|
|
201 |
if (property)
|
|
202 |
{
|
|
203 |
TInt count = property->iPropertyItems.Count();
|
|
204 |
for (TInt i=0; i<count; i++)
|
|
205 |
{
|
|
206 |
switch (property->iPropertyItems[i].iItemId)
|
|
207 |
{
|
|
208 |
case EDirectPrintPaperPaperSize:
|
|
209 |
{
|
|
210 |
iPaperSize = property->iPropertyItems[i].iItemValue;
|
|
211 |
}
|
|
212 |
break;
|
|
213 |
case EDirectPrintPaperOrientation:
|
|
214 |
{
|
|
215 |
iOrientation = property->iPropertyItems[i].iItemValue;
|
|
216 |
}
|
|
217 |
break;
|
|
218 |
case EDirectPrintPaperHight:
|
|
219 |
{
|
|
220 |
iHight = property->iPropertyItems[i].iItemValue;
|
|
221 |
}
|
|
222 |
break;
|
|
223 |
case EDirectPrintPaperWidth:
|
|
224 |
{
|
|
225 |
iWidth = property->iPropertyItems[i].iItemValue;
|
|
226 |
}
|
|
227 |
break;
|
|
228 |
case EDirectPrintPagePrintPage:
|
|
229 |
{
|
|
230 |
iPrintPage = property->iPropertyItems[i].iItemValue;
|
|
231 |
}
|
|
232 |
break;
|
|
233 |
case EDirectPrintPagePrintRange:
|
|
234 |
{
|
|
235 |
iPrintRange.Copy(property->iPropertyItems[i].iItemTextValue);
|
|
236 |
}
|
|
237 |
break;
|
|
238 |
case EDirectPrintPageCopy:
|
|
239 |
{
|
|
240 |
iCopy = property->iPropertyItems[i].iItemValue;
|
|
241 |
}
|
|
242 |
break;
|
|
243 |
case EDirectPrintMarginLeftMargin:
|
|
244 |
{
|
|
245 |
iLeftMargin = property->iPropertyItems[i].iItemValue;
|
|
246 |
}
|
|
247 |
break;
|
|
248 |
case EDirectPrintMarginRightMargin:
|
|
249 |
{
|
|
250 |
iRightMargin = property->iPropertyItems[i].iItemValue;
|
|
251 |
}
|
|
252 |
break;
|
|
253 |
case EDirectPrintMarginTopMargin:
|
|
254 |
{
|
|
255 |
iTopMargin = property->iPropertyItems[i].iItemValue;
|
|
256 |
}
|
|
257 |
break;
|
|
258 |
case EDirectPrintMarginBottomMargin:
|
|
259 |
{
|
|
260 |
iBottomMargin = property->iPropertyItems[i].iItemValue;
|
|
261 |
}
|
|
262 |
break;
|
|
263 |
case EDirectPrintHeaderHeaderText:
|
|
264 |
{
|
|
265 |
iHeaderText.Copy(property->iPropertyItems[i].iItemTextValue);
|
|
266 |
}
|
|
267 |
break;
|
|
268 |
case EDirectPrintHeaderDistance:
|
|
269 |
{
|
|
270 |
iHeaderDistance = property->iPropertyItems[i].iItemValue;
|
|
271 |
}
|
|
272 |
break;
|
|
273 |
case EDirectPrintHeaderFirstPage:
|
|
274 |
{
|
|
275 |
iHeaderFirstPage = property->iPropertyItems[i].iItemValue;
|
|
276 |
}
|
|
277 |
break;
|
|
278 |
case EDirectPrintFooterFooterText:
|
|
279 |
{
|
|
280 |
iFooterText.Copy(property->iPropertyItems[i].iItemTextValue);
|
|
281 |
}
|
|
282 |
break;
|
|
283 |
case EDirectPrintFooterDistance:
|
|
284 |
{
|
|
285 |
iFooterDistance = property->iPropertyItems[i].iItemValue;
|
|
286 |
}
|
|
287 |
break;
|
|
288 |
case EDirectPrintFooterFirstPage:
|
|
289 |
{
|
|
290 |
iFooterFirstPage = property->iPropertyItems[i].iItemValue;
|
|
291 |
}
|
|
292 |
break;
|
|
293 |
default:
|
|
294 |
{
|
|
295 |
// Set extend setting item
|
|
296 |
CDirectPrintUiPlugin* plugin = GetPluginMgr().CurrentPluginL();
|
|
297 |
if (plugin)
|
|
298 |
{
|
|
299 |
plugin->ReadDataL(property->iPropertyItems[i]);
|
|
300 |
}
|
|
301 |
}
|
|
302 |
break;
|
|
303 |
}
|
|
304 |
}
|
|
305 |
}
|
|
306 |
else
|
|
307 |
{
|
|
308 |
model.SetCurrentProperty(model.PropertyCount());
|
|
309 |
NewDataL();
|
|
310 |
}
|
|
311 |
|
|
312 |
LOG("CDirectPrintPropertyView::ReadDataL END");
|
|
313 |
}
|
|
314 |
|
|
315 |
void CDirectPrintPropertyView::WriteDataL()
|
|
316 |
{
|
|
317 |
LOG("CDirectPrintPropertyView::WriteDataL BEGIN");
|
|
318 |
|
|
319 |
CDirectPrintModel& model = GetModel();
|
|
320 |
CPrinterProperty* property = new (ELeave) CPrinterProperty();
|
|
321 |
CleanupStack::PushL(property);
|
|
322 |
property->iPrinterId = model.GetCurrentPrinterIdL();
|
|
323 |
property->iApplicationId = 0;
|
|
324 |
|
|
325 |
TDirectPrintPropertyData data1;
|
|
326 |
data1.iItemType = EDirectPrintPaperSettingTab;
|
|
327 |
data1.iItemId = EDirectPrintPaperPaperSize;
|
|
328 |
//data1.iItemName.Copy();
|
|
329 |
data1.iItemValue = iPaperSize;
|
|
330 |
property->iPropertyItems.Append(data1);
|
|
331 |
|
|
332 |
TDirectPrintPropertyData data2;
|
|
333 |
data2.iItemType = EDirectPrintPaperSettingTab;
|
|
334 |
data2.iItemId = EDirectPrintPaperOrientation;
|
|
335 |
//data2.iItemName.Copy();
|
|
336 |
data2.iItemValue = iOrientation;
|
|
337 |
property->iPropertyItems.Append(data2);
|
|
338 |
|
|
339 |
TDirectPrintPropertyData data3;
|
|
340 |
data3.iItemType = EDirectPrintPaperSettingTab;
|
|
341 |
data3.iItemId = EDirectPrintPaperHight;
|
|
342 |
//data3.iItemName.Copy();
|
|
343 |
data3.iItemValue = iHight;
|
|
344 |
property->iPropertyItems.Append(data3);
|
|
345 |
|
|
346 |
TDirectPrintPropertyData data4;
|
|
347 |
data4.iItemType = EDirectPrintPaperSettingTab;
|
|
348 |
data4.iItemId = EDirectPrintPaperWidth;
|
|
349 |
//data4.iItemName.Copy();
|
|
350 |
data4.iItemValue = iWidth;
|
|
351 |
property->iPropertyItems.Append(data4);
|
|
352 |
|
|
353 |
TDirectPrintPropertyData data5;
|
|
354 |
data5.iItemType = EDirectPrintPageSettingTab;
|
|
355 |
data5.iItemId = EDirectPrintPagePrintPage;
|
|
356 |
//data5.iItemName.Copy();
|
|
357 |
data5.iItemValue = iPrintPage;
|
|
358 |
property->iPropertyItems.Append(data5);
|
|
359 |
|
|
360 |
TDirectPrintPropertyData data6;
|
|
361 |
data6.iItemType = EDirectPrintPageSettingTab;
|
|
362 |
data6.iItemId = EDirectPrintPagePrintRange;
|
|
363 |
//data6.iItemName.Copy();
|
|
364 |
data6.iItemTextValue.Copy(iPrintRange);
|
|
365 |
property->iPropertyItems.Append(data6);
|
|
366 |
|
|
367 |
TDirectPrintPropertyData data7;
|
|
368 |
data7.iItemType = EDirectPrintPageSettingTab;
|
|
369 |
data7.iItemId = EDirectPrintPageCopy;
|
|
370 |
//data7.iItemName.Copy();
|
|
371 |
data7.iItemValue = iCopy;
|
|
372 |
property->iPropertyItems.Append(data7);
|
|
373 |
|
|
374 |
TDirectPrintPropertyData data8;
|
|
375 |
data8.iItemType = EDirectPrintMarginSettingTab;
|
|
376 |
data8.iItemId = EDirectPrintMarginLeftMargin;
|
|
377 |
//data8.iItemName.Copy();
|
|
378 |
data8.iItemValue = iLeftMargin;
|
|
379 |
property->iPropertyItems.Append(data8);
|
|
380 |
|
|
381 |
TDirectPrintPropertyData data9;
|
|
382 |
data9.iItemType = EDirectPrintMarginSettingTab;
|
|
383 |
data9.iItemId = EDirectPrintMarginRightMargin;
|
|
384 |
//data9.iItemName.Copy();
|
|
385 |
data9.iItemValue = iRightMargin;
|
|
386 |
property->iPropertyItems.Append(data9);
|
|
387 |
|
|
388 |
TDirectPrintPropertyData data10;
|
|
389 |
data10.iItemType = EDirectPrintMarginSettingTab;
|
|
390 |
data10.iItemId = EDirectPrintMarginTopMargin;
|
|
391 |
//data10.iItemName.Copy();
|
|
392 |
data10.iItemValue = iTopMargin;
|
|
393 |
property->iPropertyItems.Append(data10);
|
|
394 |
|
|
395 |
TDirectPrintPropertyData data11;
|
|
396 |
data11.iItemType = EDirectPrintMarginSettingTab;
|
|
397 |
data11.iItemId = EDirectPrintMarginBottomMargin;
|
|
398 |
//data11.iItemName.Copy();
|
|
399 |
data11.iItemValue = iBottomMargin;
|
|
400 |
property->iPropertyItems.Append(data11);
|
|
401 |
|
|
402 |
TDirectPrintPropertyData data12;
|
|
403 |
data12.iItemType = EDirectPrintHeaderSettingTab;
|
|
404 |
data12.iItemId = EDirectPrintHeaderHeaderText;
|
|
405 |
//data12.iItemName.Copy();
|
|
406 |
data12.iItemTextValue.Copy(iHeaderText);
|
|
407 |
property->iPropertyItems.Append(data12);
|
|
408 |
|
|
409 |
TDirectPrintPropertyData data13;
|
|
410 |
data13.iItemType = EDirectPrintHeaderSettingTab;
|
|
411 |
data13.iItemId = EDirectPrintHeaderDistance;
|
|
412 |
//data13.iItemName.Copy();
|
|
413 |
data13.iItemValue = iHeaderDistance;
|
|
414 |
property->iPropertyItems.Append(data13);
|
|
415 |
|
|
416 |
TDirectPrintPropertyData data14;
|
|
417 |
data14.iItemType = EDirectPrintHeaderSettingTab;
|
|
418 |
data14.iItemId = EDirectPrintHeaderFirstPage;
|
|
419 |
//data14.iItemName.Copy();
|
|
420 |
data14.iItemValue = iHeaderFirstPage;
|
|
421 |
property->iPropertyItems.Append(data14);
|
|
422 |
|
|
423 |
TDirectPrintPropertyData data15;
|
|
424 |
data15.iItemType = EDirectPrintFooterSettingTab;
|
|
425 |
data15.iItemId = EDirectPrintFooterFooterText;
|
|
426 |
//data15.iItemName.Copy();
|
|
427 |
data15.iItemTextValue.Copy(iFooterText);
|
|
428 |
property->iPropertyItems.Append(data15);
|
|
429 |
|
|
430 |
TDirectPrintPropertyData data16;
|
|
431 |
data16.iItemType = EDirectPrintFooterSettingTab;
|
|
432 |
data16.iItemId = EDirectPrintFooterDistance;
|
|
433 |
//data16.iItemName.Copy();
|
|
434 |
data16.iItemValue = iFooterDistance;
|
|
435 |
property->iPropertyItems.Append(data16);
|
|
436 |
|
|
437 |
TDirectPrintPropertyData data17;
|
|
438 |
data17.iItemType = EDirectPrintFooterSettingTab;
|
|
439 |
data17.iItemId = EDirectPrintFooterFirstPage;
|
|
440 |
//data17.iItemName.Copy();
|
|
441 |
data17.iItemValue = iFooterFirstPage;
|
|
442 |
property->iPropertyItems.Append(data17);
|
|
443 |
|
|
444 |
// Set extend setting item
|
|
445 |
CDirectPrintUiPlugin* plugin = GetPluginMgr().CurrentPluginL();
|
|
446 |
if (plugin)
|
|
447 |
{
|
|
448 |
plugin->WriteDataL(property->iPropertyItems);
|
|
449 |
}
|
|
450 |
|
|
451 |
CleanupStack::Pop(property);
|
|
452 |
model.SetPrinterPropertyL(property);
|
|
453 |
|
|
454 |
LOG("CDirectPrintPropertyView::WriteDataL END");
|
|
455 |
}
|
|
456 |
|
|
457 |
void CDirectPrintPropertyView::NewDataL()
|
|
458 |
{
|
|
459 |
LOG("CDirectPrintPropertyView::NewDataL BEGIN");
|
|
460 |
|
|
461 |
iPaperSize = 0;
|
|
462 |
iOrientation = 0;
|
|
463 |
iHight = 0;
|
|
464 |
iWidth = 0;
|
|
465 |
iPrintPage = 0;
|
|
466 |
iPrintRange.Copy(_L(""));
|
|
467 |
iCopy = 1;
|
|
468 |
iLeftMargin = 2;
|
|
469 |
iRightMargin = 2;
|
|
470 |
iTopMargin = 2;
|
|
471 |
iBottomMargin = 2;
|
|
472 |
iHeaderText.Copy(_L(""));
|
|
473 |
iHeaderDistance = 0;
|
|
474 |
iHeaderFirstPage = 0;
|
|
475 |
iFooterText.Copy(_L(""));
|
|
476 |
iFooterDistance = 0;
|
|
477 |
iFooterFirstPage = 0;
|
|
478 |
|
|
479 |
// Set extend setting item
|
|
480 |
CDirectPrintUiPlugin* plugin = GetPluginMgr().CurrentPluginL();
|
|
481 |
if (plugin)
|
|
482 |
{
|
|
483 |
plugin->NewDataL();
|
|
484 |
}
|
|
485 |
|
|
486 |
LOG("CDirectPrintPropertyView::NewDataL END");
|
|
487 |
}
|
|
488 |
|
|
489 |
void CDirectPrintPropertyView::LoadPaperTabL()
|
|
490 |
{
|
|
491 |
TBuf<25> itemTitle;
|
|
492 |
|
|
493 |
// Set common setting item
|
|
494 |
CAknEnumeratedTextPopupSettingItem* item1 = new (ELeave) CAknEnumeratedTextPopupSettingItem(1, iPaperSize);
|
|
495 |
CleanupStack::PushL(item1);
|
|
496 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_PAPERSIZE);
|
|
497 |
item1->ConstructL(EFalse, 1, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_POPUP_SETTING_PAGE, -1, 0, R_DIRECTPRINT_PROPERTYSETTING_SIZE_POPUP_SETTING_TEXTS);
|
|
498 |
iListBox->SettingItemArray()->AppendL(item1);
|
|
499 |
CleanupStack::Pop(item1);
|
|
500 |
|
|
501 |
CAknEnumeratedTextPopupSettingItem* item2 = new (ELeave) CAknEnumeratedTextPopupSettingItem(2, iOrientation);
|
|
502 |
CleanupStack::PushL(item2);
|
|
503 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_ORIENTATION);
|
|
504 |
item2->ConstructL(EFalse, 2, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_POPUP_SETTING_PAGE, -1, 0, R_DIRECTPRINT_PROPERTYSETTING_ORIENTATION_POPUP_SETTING_TEXTS);
|
|
505 |
iListBox->SettingItemArray()->AppendL(item2);
|
|
506 |
CleanupStack::Pop(item2);
|
|
507 |
|
|
508 |
CAknEnumeratedTextPopupSettingItem* item3 = new (ELeave) CAknEnumeratedTextPopupSettingItem(3, iMediaType);
|
|
509 |
CleanupStack::PushL(item3);
|
|
510 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_MEDIATYPE);
|
|
511 |
item3->ConstructL(EFalse, 3, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_POPUP_SETTING_PAGE, -1, 0, R_DIRECTPRINT_PROPERTYSETTING_MEDIATYPE_POPUP_SETTING_TEXTS);
|
|
512 |
iListBox->SettingItemArray()->AppendL(item3);
|
|
513 |
CleanupStack::Pop(item3);
|
|
514 |
}
|
|
515 |
|
|
516 |
void CDirectPrintPropertyView::LoadPageTabL()
|
|
517 |
{
|
|
518 |
TBuf<25> itemTitle;
|
|
519 |
|
|
520 |
// Set common setting item
|
|
521 |
CAknEnumeratedTextPopupSettingItem* item1 = new (ELeave) CAknEnumeratedTextPopupSettingItem(1, iPrintPage);
|
|
522 |
CleanupStack::PushL(item1);
|
|
523 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_PRINTPAGE);
|
|
524 |
item1->ConstructL(EFalse, 1, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_POPUP_SETTING_PAGE, -1, 0, R_DIRECTPRINT_PROPERTYSETTING_RANGE_POPUP_SETTING_TEXTS);
|
|
525 |
iListBox->SettingItemArray()->AppendL(item1);
|
|
526 |
CleanupStack::Pop(item1);
|
|
527 |
|
|
528 |
CAknTextSettingItem* item2 = new (ELeave) CAknTextSettingItem(2, iPrintRange);
|
|
529 |
CleanupStack::PushL(item2);
|
|
530 |
item2->SetEmptyItemTextL( _L("None") );
|
|
531 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_PRINTRANGE);
|
|
532 |
item2->ConstructL(EFalse, 2, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_TEXT_SETTING_PAGE, -1);
|
|
533 |
iListBox->SettingItemArray()->AppendL(item2);
|
|
534 |
CleanupStack::Pop(item2);
|
|
535 |
|
|
536 |
CAknIntegerEdwinSettingItem* item3 = new (ELeave) CAknIntegerEdwinSettingItem(3, iCopy);
|
|
537 |
CleanupStack::PushL(item3);
|
|
538 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_COPY);
|
|
539 |
item3->ConstructL(EFalse, 3, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_INTEGER_SETTING_PAGE, -1);
|
|
540 |
iListBox->SettingItemArray()->AppendL(item3);
|
|
541 |
CleanupStack::Pop(item3);
|
|
542 |
}
|
|
543 |
|
|
544 |
void CDirectPrintPropertyView::LoadMarginTabL()
|
|
545 |
{
|
|
546 |
TBuf<25> itemTitle;
|
|
547 |
|
|
548 |
// Set common setting item
|
|
549 |
CAknIntegerEdwinSettingItem* item1 = new (ELeave) CAknIntegerEdwinSettingItem(1, iLeftMargin);
|
|
550 |
CleanupStack::PushL(item1);
|
|
551 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_LEFTMARGIN);
|
|
552 |
item1->ConstructL(EFalse, 1, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_INTEGER_SETTING_PAGE, -1);
|
|
553 |
iListBox->SettingItemArray()->AppendL(item1);
|
|
554 |
CleanupStack::Pop(item1);
|
|
555 |
|
|
556 |
CAknIntegerEdwinSettingItem* item2 = new (ELeave) CAknIntegerEdwinSettingItem(2, iRightMargin);
|
|
557 |
CleanupStack::PushL(item2);
|
|
558 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_RIGHTMARGIN);
|
|
559 |
item2->ConstructL(EFalse, 2, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_INTEGER_SETTING_PAGE, -1);
|
|
560 |
iListBox->SettingItemArray()->AppendL(item2);
|
|
561 |
CleanupStack::Pop(item2);
|
|
562 |
|
|
563 |
CAknIntegerEdwinSettingItem* item3 = new (ELeave) CAknIntegerEdwinSettingItem(3, iTopMargin);
|
|
564 |
CleanupStack::PushL(item3);
|
|
565 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_TOPMARGIN);
|
|
566 |
item3->ConstructL(EFalse, 3, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_INTEGER_SETTING_PAGE, -1);
|
|
567 |
iListBox->SettingItemArray()->AppendL(item3);
|
|
568 |
CleanupStack::Pop(item3);
|
|
569 |
|
|
570 |
CAknIntegerEdwinSettingItem* item4 = new (ELeave) CAknIntegerEdwinSettingItem(4, iBottomMargin);
|
|
571 |
CleanupStack::PushL(item4);
|
|
572 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_BOTTOMMARGIN);
|
|
573 |
item4->ConstructL(EFalse, 4, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_INTEGER_SETTING_PAGE, -1);
|
|
574 |
iListBox->SettingItemArray()->AppendL(item4);
|
|
575 |
CleanupStack::Pop(item4);
|
|
576 |
}
|
|
577 |
|
|
578 |
void CDirectPrintPropertyView::LoadHeaderTabL()
|
|
579 |
{
|
|
580 |
TBuf<25> itemTitle;
|
|
581 |
|
|
582 |
// Set common setting item
|
|
583 |
CAknTextSettingItem* item1 = new (ELeave) CAknTextSettingItem(1, iHeaderText);
|
|
584 |
CleanupStack::PushL(item1);
|
|
585 |
item1->SetEmptyItemTextL( _L("None") );
|
|
586 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_HEADERTEXT);
|
|
587 |
item1->ConstructL(EFalse, 1, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_TEXT_SETTING_PAGE, -1);
|
|
588 |
iListBox->SettingItemArray()->AppendL(item1);
|
|
589 |
CleanupStack::Pop(item1);
|
|
590 |
|
|
591 |
CAknIntegerEdwinSettingItem* item2 = new (ELeave) CAknIntegerEdwinSettingItem(2, iHeaderDistance);
|
|
592 |
CleanupStack::PushL(item2);
|
|
593 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_HEADERDISTANCE);
|
|
594 |
item2->ConstructL(EFalse, 2, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_INTEGER_SETTING_PAGE, -1);
|
|
595 |
iListBox->SettingItemArray()->AppendL(item2);
|
|
596 |
CleanupStack::Pop(item2);
|
|
597 |
|
|
598 |
CAknEnumeratedTextPopupSettingItem* item3 = new (ELeave) CAknEnumeratedTextPopupSettingItem(3, iHeaderFirstPage);
|
|
599 |
CleanupStack::PushL(item3);
|
|
600 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_HEADERFIRSTPAGE);
|
|
601 |
item3->ConstructL(EFalse, 3, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_POPUP_SETTING_PAGE, -1, 0, R_DIRECTPRINT_PROPERTYSETTING_PRINT_POPUP_SETTING_TEXTS);
|
|
602 |
iListBox->SettingItemArray()->AppendL(item3);
|
|
603 |
CleanupStack::Pop(item3);
|
|
604 |
}
|
|
605 |
|
|
606 |
void CDirectPrintPropertyView::LoadFooterTabL()
|
|
607 |
{
|
|
608 |
TBuf<25> itemTitle;
|
|
609 |
|
|
610 |
// Set common setting item
|
|
611 |
CAknTextSettingItem* item1 = new (ELeave) CAknTextSettingItem(1, iFooterText);
|
|
612 |
CleanupStack::PushL(item1);
|
|
613 |
item1->SetEmptyItemTextL( _L("None") );
|
|
614 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_FOOTERTEXT);
|
|
615 |
item1->ConstructL(EFalse, 1, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_TEXT_SETTING_PAGE, -1);
|
|
616 |
iListBox->SettingItemArray()->AppendL(item1);
|
|
617 |
CleanupStack::Pop(item1);
|
|
618 |
|
|
619 |
CAknIntegerEdwinSettingItem* item2 = new (ELeave) CAknIntegerEdwinSettingItem(2, iFooterDistance);
|
|
620 |
CleanupStack::PushL(item2);
|
|
621 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_FOOTERDISTANCE);
|
|
622 |
item2->ConstructL(EFalse, 2, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_INTEGER_SETTING_PAGE, -1);
|
|
623 |
iListBox->SettingItemArray()->AppendL(item2);
|
|
624 |
CleanupStack::Pop(item2);
|
|
625 |
|
|
626 |
CAknEnumeratedTextPopupSettingItem* item3 = new (ELeave) CAknEnumeratedTextPopupSettingItem(3, iFooterFirstPage);
|
|
627 |
CleanupStack::PushL(item3);
|
|
628 |
CEikonEnv::Static()->ReadResource(itemTitle, R_DIRECTPRINT_PROPERTYSETTING_ITEM_FOOTERFIRSTPAGE);
|
|
629 |
item3->ConstructL(EFalse, 3, itemTitle, NULL, R_DIRECTPRINT_PROPERTYSETTING_POPUP_SETTING_PAGE, -1, 0, R_DIRECTPRINT_PROPERTYSETTING_PRINT_POPUP_SETTING_TEXTS);
|
|
630 |
iListBox->SettingItemArray()->AppendL(item3);
|
|
631 |
CleanupStack::Pop(item3);
|
|
632 |
}
|
|
633 |
|