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 |
* {Description of the file}
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
// Protection against nested includes
|
|
20 |
#ifndef __PRINTERSETTINGVIEW_H__
|
|
21 |
#define __PRINTERSETTINGVIEW_H__
|
|
22 |
|
|
23 |
// System includes
|
|
24 |
#include <aknlists.h>
|
|
25 |
#include <aknsettingitemlist.h>
|
|
26 |
|
|
27 |
// User includes
|
|
28 |
#include "DirectPrintViewBase.h"
|
|
29 |
#include "directprintsettinglistbox.h"
|
|
30 |
#include "directprintselectitem.h"
|
|
31 |
|
|
32 |
// Forward declarations
|
|
33 |
class CDirectPrintBearerMgr;
|
|
34 |
|
|
35 |
// Class declaration
|
|
36 |
/**
|
|
37 |
* Printer setting view class
|
|
38 |
* more_complete_description
|
|
39 |
*/
|
|
40 |
class CDirectPrintPrinterSettingView : public CDirectPrintViewBase
|
|
41 |
{
|
|
42 |
public:
|
|
43 |
enum TListItemIndex
|
|
44 |
{
|
|
45 |
ESettingViewItemPrinterName = 1,
|
|
46 |
ESettingViewItemDriver,
|
|
47 |
ESettingViewItemType,
|
|
48 |
ESettingViewItemBearer,
|
|
49 |
ESettingViewItemExtent
|
|
50 |
};
|
|
51 |
|
|
52 |
public:
|
|
53 |
/** Constructors */
|
|
54 |
static CDirectPrintPrinterSettingView* NewL();
|
|
55 |
static CDirectPrintPrinterSettingView* NewLC();
|
|
56 |
/** Destructor */
|
|
57 |
~CDirectPrintPrinterSettingView();
|
|
58 |
|
|
59 |
public:
|
|
60 |
/**
|
|
61 |
* From CAknView.
|
|
62 |
* Handles user commands.
|
|
63 |
*
|
|
64 |
* @param aCommand The id of commands.
|
|
65 |
*/
|
|
66 |
void HandleCommandL(TInt aCommand);
|
|
67 |
|
|
68 |
public:
|
|
69 |
/**
|
|
70 |
* Handles index.
|
|
71 |
*
|
|
72 |
* @param aIndex The index of selected item.
|
|
73 |
* @param aChanged The flag of change data.
|
|
74 |
*/
|
|
75 |
void HandleEditItemL(TInt aIndex, TBool aChanged);
|
|
76 |
|
|
77 |
protected: // from CAknView
|
|
78 |
void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage);
|
|
79 |
void DoDeactivate();
|
|
80 |
|
|
81 |
private:
|
|
82 |
CDirectPrintPrinterSettingView();
|
|
83 |
void ConstructL();
|
|
84 |
|
|
85 |
void LoadListL();
|
|
86 |
void LoadExtendListL();
|
|
87 |
void ReloadListL();
|
|
88 |
void SetBearerListL(CAknEnumeratedTextPopupSettingItem* item);
|
|
89 |
|
|
90 |
void ReadDataL();
|
|
91 |
void WriteDataL();
|
|
92 |
void NewDataL();
|
|
93 |
|
|
94 |
void LoadDriverInfoL();
|
|
95 |
void LoadTypeInfoL();
|
|
96 |
void LoadBearerInfoL();
|
|
97 |
void LoadItemInfoL(TInt aResouceId, const TDesC& aInfo, TInt& aIndex);
|
|
98 |
void LoadExtendSettingsL();
|
|
99 |
void StoreDriverInfoL();
|
|
100 |
void StoreTypeInfoL();
|
|
101 |
void StoreBearerInfoL();
|
|
102 |
void StoreItemInfoL(TInt aResouceId, TDes& aInfo);
|
|
103 |
void StoreExtendSettingsL();
|
|
104 |
|
|
105 |
CAknSettingItem* GetSettingItemL(const TDesC& aItemTitle);
|
|
106 |
|
|
107 |
CDirectPrintBearerMgr* GetBearerMgr();
|
|
108 |
|
|
109 |
private:
|
|
110 |
/** Pointer to listbox. */
|
|
111 |
CDirectPrintSettingListBox* iListBox;
|
|
112 |
/** Printer id. */
|
|
113 |
TInt iPrinterId;
|
|
114 |
/** Printer name. */
|
|
115 |
TBuf<50> iPrinterName;
|
|
116 |
/** Index of driver setting. */
|
|
117 |
TInt iDriver;
|
|
118 |
/** Driver uid. */
|
|
119 |
TUid iDriverUid;
|
|
120 |
/** Driver name. */
|
|
121 |
TBuf<50> iDriverName;
|
|
122 |
/** Index of bearer setting. */
|
|
123 |
TInt iBearer;
|
|
124 |
/** Bearer name. */
|
|
125 |
TBuf<50> iBearerName;
|
|
126 |
/** Index of access point setting. */
|
|
127 |
TInt iAccessPoint;
|
|
128 |
/** Access point name. */
|
|
129 |
TBuf<50> iAccessPointName;
|
|
130 |
/** Host name. */
|
|
131 |
TBuf<50> iHost;
|
|
132 |
/** Ip address. */
|
|
133 |
TInetAddr iHostIp;
|
|
134 |
/** Port number. */
|
|
135 |
TInt iPort;
|
|
136 |
/** User name. */
|
|
137 |
TBuf<50> iUserName;
|
|
138 |
/** Que name. */
|
|
139 |
TBuf<50> iQue;
|
|
140 |
/** Printer type name. */
|
|
141 |
TBuf<50> iTypeName;
|
|
142 |
/** Index of printer type setting. */
|
|
143 |
TInt iType;
|
|
144 |
|
|
145 |
/** Array of driver. */
|
|
146 |
RSelectItemArray iDriverList;
|
|
147 |
/** Array of bearer. */
|
|
148 |
RSelectItemArray iBearerList;
|
|
149 |
/** Array of type. */
|
|
150 |
RSelectItemArray iTypeList;
|
|
151 |
};
|
|
152 |
|
|
153 |
#endif // __PRINTERSETTINGVIEW_H__
|