2
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!-- Copyright (c) 2006 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 |
<componentDefinition xmlns="http://www.nokia.com/sdt/emf/component"
|
|
10 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
11 |
|
|
12 |
<enumPropertyDeclaration qualifiedName="com.nokia.sdt.series60.MultiLineDataQuery.type1">
|
|
13 |
<enumElement value="EMultiDataFirstEdwin"/>
|
|
14 |
<enumElement value="EMultiDataFirstSecEd"/>
|
|
15 |
<enumElement value="EMultiDataFirstTimeEd"/>
|
|
16 |
<enumElement value="EMultiDataFirstDateEd"/>
|
|
17 |
<!-- <enumElement value="EMultiDataFirstDurEd"/>
|
|
18 |
Duration can't be used as the first type due to restrictions in C++ class -->
|
|
19 |
<enumElement value="EMultiDataFirstPhoneEd"/>
|
|
20 |
<enumElement value="EMultiDataFirstNumEd"/>
|
|
21 |
<enumElement value="EMultiDataFirstPinEd"/>
|
|
22 |
<enumElement value="EMultiDataFirstIpEd"/>
|
|
23 |
</enumPropertyDeclaration>
|
|
24 |
|
|
25 |
<enumPropertyDeclaration qualifiedName="com.nokia.sdt.series60.MultiLineDataQuery.type2">
|
|
26 |
<enumElement value="EMultiDataSecondEdwin"/>
|
|
27 |
<enumElement value="EMultiDataSecondSecEd"/>
|
|
28 |
<enumElement value="EMultiDataSecondTimeEd"/>
|
|
29 |
<enumElement value="EMultiDataSecondDateEd"/>
|
|
30 |
<enumElement value="EMultiDataSecondDurEd"/>
|
|
31 |
<enumElement value="EMultiDataSecondPhoneEd"/>
|
|
32 |
<enumElement value="EMultiDataSecondNumEd"/>
|
|
33 |
<enumElement value="EMultiDataSecondPinEd"/>
|
|
34 |
<enumElement value="EMultiDataSecondIpEd"/>
|
|
35 |
</enumPropertyDeclaration>
|
|
36 |
|
|
37 |
<component baseComponent="com.nokia.sdt.series60.NonLayoutBase"
|
|
38 |
friendlyName="%friendlyName"
|
|
39 |
qualifiedName="com.nokia.sdt.series60.MultiLineDataQuery"
|
|
40 |
category="NotesDialogs"
|
|
41 |
instanceNameRoot="multiQuery"
|
|
42 |
version="1.0">
|
|
43 |
<documentation>
|
|
44 |
<information>%information</information>
|
|
45 |
</documentation>
|
|
46 |
<symbian sdkName="com.nokia.series60" minSDKVersion="2.0"
|
|
47 |
className="CAknMultiLineDataQueryDialog" classHelpTopic=""
|
|
48 |
resourceType="AVKON_DATA_QUERY" resourceHelpTopic="" />
|
|
49 |
<designerImages smallIconFile="MultiLineDataQuery_sm.png"
|
|
50 |
largeIconFile="MultiLineDataQuery.png"/>
|
|
51 |
<attributes>
|
|
52 |
<attribute key="is-transient-object">true</attribute>
|
|
53 |
<attribute key="is-non-resizable-or-moveable-layout-object">true</attribute>
|
|
54 |
<attribute key="is-layout-container">true</attribute>
|
|
55 |
<attribute key="layout-type">ordered</attribute>
|
|
56 |
</attributes>
|
|
57 |
<properties>
|
|
58 |
<compoundProperty category="Hidden" name="location" type="com.nokia.sdt.series60.locationProperty"
|
|
59 |
editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory"/>
|
|
60 |
<compoundProperty category="Hidden" name="size" type="com.nokia.sdt.series60.sizeProperty"
|
|
61 |
editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory"/>
|
|
62 |
<property category="Data" name="text" type="localizedString" default="Enter data:"
|
|
63 |
descriptionKey="textDescription"
|
|
64 |
editorClass="com.nokia.sdt.symbian.ui.editors.ScalableTextEditorFactory" />
|
|
65 |
<property category="Data" name="text2" type="localizedString" default="Enter data:"
|
|
66 |
descriptionKey="text2Description"
|
|
67 |
editorClass="com.nokia.sdt.symbian.ui.editors.ScalableTextEditorFactory" />
|
|
68 |
<enumProperty category="Behavior" name="type" type="com.nokia.sdt.series60.MultiLineDataQuery.type1"
|
|
69 |
default="EMultiDataFirstEdwin"
|
|
70 |
editorClass="com.nokia.sdt.series60.component.MultiLineQueryTypeEditorFactory"
|
|
71 |
descriptionKey="typeDescription" />
|
|
72 |
<enumProperty category="Behavior" name="type2" type="com.nokia.sdt.series60.MultiLineDataQuery.type2"
|
|
73 |
default="EMultiDataSecondEdwin"
|
|
74 |
editorClass="com.nokia.sdt.series60.component.MultiLineQueryTypeEditorFactory"
|
|
75 |
descriptionKey="type2Description" />
|
|
76 |
<enumProperty category="Data" name="tone" type="com.nokia.sdt.series60.Query.tone"
|
|
77 |
descriptionKey="toneDescription" />
|
|
78 |
</properties>
|
|
79 |
<implementations>
|
|
80 |
<implementation>
|
|
81 |
<interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/>
|
|
82 |
<interface id="com.nokia.sdt.datamodel.adapter.IDirectLabelEdit"/>
|
|
83 |
<interface id="com.nokia.sdt.datamodel.adapter.ILayout"/>
|
|
84 |
<code class="com.nokia.sdt.series60.component.DataQueryVisualAndLayoutImplFactory"/>
|
|
85 |
</implementation>
|
|
86 |
<implementation>
|
|
87 |
<interface id="com.nokia.sdt.datamodel.adapter.IQueryContainment"/>
|
|
88 |
<interface id="com.nokia.sdt.datamodel.adapter.IComponentInstancePropertyListener"/>
|
|
89 |
<script file="MultiLineDataQuery.js" prototype="MultiLineDataQueryContainment"/>
|
|
90 |
</implementation>
|
|
91 |
<implementation>
|
|
92 |
<interface id="com.nokia.sdt.datamodel.adapter.IInitializer"/>
|
|
93 |
<interface id="com.nokia.sdt.datamodel.adapter.ISetValueCommandExtender"/>
|
|
94 |
<code class="com.nokia.sdt.series60.component.MultiLineDataQueryCodeImplFactory"/>
|
|
95 |
</implementation>
|
|
96 |
</implementations>
|
|
97 |
|
|
98 |
<sourceMapping>
|
|
99 |
<mapResource struct="DIALOG" headers="avkon.rh avkon.rsg eikon.rh">
|
|
100 |
<mapBitmaskMember property="." member="flags" includedProperties="" >
|
|
101 |
<!-- initial blank entry forces bits on -->
|
|
102 |
<mapBitmaskValue properties="" value="EAknGeneralQueryFlags" />
|
|
103 |
</mapBitmaskMember>
|
|
104 |
<mapFixedMember member="buttons" value="R_AVKON_SOFTKEYS_OK_CANCEL" />
|
|
105 |
<mapArrayMember property="." member="items">
|
|
106 |
<mapResourceElement struct="DLG_LINE" headers="avkon.rh" instanceIdentifyingMember="id">
|
|
107 |
<select property="#(arrayIndex)">
|
|
108 |
<choice value="0">
|
|
109 |
<select property="[parent].type">
|
|
110 |
<choice value="EMultiDataFirstIpEd">
|
|
111 |
<mapFixedMember member="type" value="EAknExtCtMultilineQuery" />
|
|
112 |
</choice>
|
|
113 |
<choice>
|
|
114 |
<mapFixedMember member="type" value="EAknCtMultilineQuery" />
|
|
115 |
</choice>
|
|
116 |
</select>
|
|
117 |
</choice>
|
|
118 |
<choice value="1">
|
|
119 |
<select property="[parent].type2">
|
|
120 |
<choice value="EMultiDataSecondIpEd">
|
|
121 |
<mapFixedMember member="type" value="EAknExtCtMultilineQuery" />
|
|
122 |
</choice>
|
|
123 |
<choice>
|
|
124 |
<mapFixedMember member="type" value="EAknCtMultilineQuery" />
|
|
125 |
</choice>
|
|
126 |
</select>
|
|
127 |
</choice>
|
|
128 |
</select>
|
|
129 |
<mapEnumMember property="." member="id" uniqueValue="*"
|
|
130 |
nameAlgorithm="com.nokia.sdt.component.symbian.NAME_ALG_DIALOG_LINE_ID" />
|
|
131 |
<mapResourceMember property="." member="control" id="queryControl"
|
|
132 |
struct="AVKON_DATA_QUERY" headers="avkon.rh">
|
|
133 |
<select property="#(arrayIndex)">
|
|
134 |
<choice value="0">
|
|
135 |
<mapEnumMember property="[parent].type" member="layout"/>
|
|
136 |
<mapSimpleMember property="[parent].text" member="label"/>
|
|
137 |
</choice>
|
|
138 |
<choice value="1">
|
|
139 |
<mapEnumMember property="[parent].type2" member="layout"/>
|
|
140 |
<mapSimpleMember property="[parent].text2" member="label"/>
|
|
141 |
</choice>
|
|
142 |
</select>
|
|
143 |
<mapResourceMember property="." member="control" id="control" />
|
|
144 |
</mapResourceMember>
|
|
145 |
</mapResourceElement>
|
|
146 |
</mapArrayMember>
|
|
147 |
</mapResource>
|
|
148 |
</sourceMapping>
|
|
149 |
|
|
150 |
<sourceGen>
|
|
151 |
|
|
152 |
<inline scope="prototype">
|
|
153 |
include("popupDialogLibrary.js");
|
|
154 |
${jsObject}.prototype.getStrings = function(instance) {
|
|
155 |
if (instance.componentId == "com.nokia.sdt.series60.MultiIpDataQuery")
|
|
156 |
this.dialogClassName = "CAknMultiLineIpQueryDialog";
|
|
157 |
else
|
|
158 |
this.dialogClassName = "CAknMultiLineDataQueryDialog";
|
|
159 |
this.methodType1 = getChildAttribute(instance, 0, "data-model-cpp-type");
|
|
160 |
this.methodType2 = getChildAttribute(instance, 1, "data-model-cpp-type");
|
|
161 |
}
|
|
162 |
</inline>
|
|
163 |
|
|
164 |
<inline>
|
|
165 |
this.getStrings(instance);
|
|
166 |
</inline>
|
|
167 |
|
|
168 |
<templateGroup id="MULTI_LINE_QUERY">
|
|
169 |
|
|
170 |
<template id="DeclareMethod" phase="ClassMethods"><![CDATA[
|
|
171 |
static TInt Run${instanceName$title}L(
|
|
172 |
${this.methodType1}& aData1,
|
|
173 |
${this.methodType2}& aData2,
|
|
174 |
TBool aUseDefaults = ETrue,
|
|
175 |
const TDesC* aOverridePrompt1 = NULL,
|
|
176 |
const TDesC* aOverridePrompt2 = NULL );
|
|
177 |
]]> </template>
|
|
178 |
|
|
179 |
<defineLocation id="METHOD_LOCATION" baseLocation="MAIN_FILE"
|
|
180 |
owned="true"
|
|
181 |
location="function(${className}::Run${instanceName$title}L(...))">
|
|
182 |
<template><![CDATA[
|
|
183 |
/**
|
|
184 |
* Show the popup dialog for ${instanceName}
|
|
185 |
* @param aData1 in-out ${this.methodType1} data for first editor
|
|
186 |
* @param aData2 in-out ${this.methodType2} data for second editor
|
|
187 |
* @param aUseDefaults TBool uses designer default editor data if ETrue
|
|
188 |
* @param aOverridePrompt1 optional override first prompt text
|
|
189 |
* @param aOverridePrompt2 optional override second prompt text
|
|
190 |
* @return EAknSoftkeyOk (left soft key id) or 0
|
|
191 |
*/
|
|
192 |
TInt ${className}::Run${instanceName$title}L(
|
|
193 |
${this.methodType1}& aData1,
|
|
194 |
${this.methodType2}& aData2,
|
|
195 |
TBool aUseDefaults,
|
|
196 |
const TDesC* aOverridePrompt1,
|
|
197 |
const TDesC* aOverridePrompt2 )
|
|
198 |
{
|
|
199 |
}
|
|
200 |
]]> </template>
|
|
201 |
</defineLocation>
|
|
202 |
|
|
203 |
<template id="DefineMethod" location="METHOD_LOCATION"><![CDATA[
|
|
204 |
if ( aUseDefaults )
|
|
205 |
{
|
|
206 |
<% if (children.length < 2) {
|
|
207 |
error(formatString(lookupString("invalidChildrenState"), instanceName, children.length));
|
|
208 |
}
|
|
209 |
else {
|
|
210 |
var setDataContribs = Engine.generateChildContributions(instance.children[0], "AknDataQuerySetData1");
|
|
211 |
// resolve the contents to this method
|
|
212 |
Engine.assignLocationsForPhase(setDataContribs, "SetData", "METHOD_LOCATION")
|
|
213 |
contribs.addAll(setDataContribs);
|
|
214 |
setDataContribs = Engine.generateChildContributions(instance.children[1], "AknDataQuerySetData2");
|
|
215 |
// resolve the contents to this method
|
|
216 |
Engine.assignLocationsForPhase(setDataContribs, "SetData", "METHOD_LOCATION")
|
|
217 |
contribs.addAll(setDataContribs);
|
|
218 |
}
|
|
219 |
%> }
|
|
220 |
<% // EFixedPointLayout case added because CAknFixedPointQueryDialog::NewL does not have default argument
|
|
221 |
if (properties.tone != "ENoTone") { %>
|
|
222 |
${this.dialogClassName}* queryDialog = ${this.dialogClassName}::NewL(
|
|
223 |
aData1,
|
|
224 |
aData2,
|
|
225 |
CAknQueryDialog::${properties.tone} );
|
|
226 |
<% } else { %>
|
|
227 |
${this.dialogClassName}* queryDialog = ${this.dialogClassName}::NewL(
|
|
228 |
aData1,
|
|
229 |
aData2 );
|
|
230 |
<% } %>
|
|
231 |
// To override the prompts, both must be non-NULL
|
|
232 |
if ( aOverridePrompt1 != NULL && aOverridePrompt2 != NULL )
|
|
233 |
{
|
|
234 |
CleanupStack::PushL( queryDialog );
|
|
235 |
queryDialog->SetPromptL( *aOverridePrompt1, *aOverridePrompt2 );
|
|
236 |
CleanupStack::Pop(); // queryDialog
|
|
237 |
}
|
|
238 |
|
|
239 |
return queryDialog->ExecuteLD( ${resourceName$upper} );
|
|
240 |
]]> </template>
|
|
241 |
|
|
242 |
<template id="AddIncludes" phase="MainSystemIncludes"><![CDATA[
|
|
243 |
#include <aknquerydialog.h>
|
|
244 |
]]> </template>
|
|
245 |
|
|
246 |
</templateGroup>
|
|
247 |
|
|
248 |
<inline>
|
|
249 |
if (Engine.formMatches(form, [""]))
|
|
250 |
contribs.addAll(Engine.generateChildContributions("AknDataQuery"))
|
|
251 |
</inline>
|
|
252 |
|
|
253 |
</sourceGen>
|
|
254 |
</component>
|
|
255 |
|
|
256 |
</componentDefinition>
|