uidesigner/com.nokia.sdt.series60.componentlibrary/components/transient/GlobalNote.component
author cawthron
Tue, 24 Mar 2009 22:20:21 -0500
changeset 2 d760517a8095
permissions -rw-r--r--
new
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
cawthron
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
cawthron
parents:
diff changeset
     2
<!-- Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). -->
cawthron
parents:
diff changeset
     3
<!-- All rights reserved. -->
cawthron
parents:
diff changeset
     4
<!-- This component and the accompanying materials are made available -->
cawthron
parents:
diff changeset
     5
<!-- under the terms of the License "Eclipse Public License v1.0" -->
cawthron
parents:
diff changeset
     6
<!-- which accompanies this distribution, and is available -->
cawthron
parents:
diff changeset
     7
<!-- at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
cawthron
parents:
diff changeset
     8
cawthron
parents:
diff changeset
     9
<componentDefinition xmlns="http://www.nokia.com/sdt/emf/component" 
cawthron
parents:
diff changeset
    10
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
cawthron
parents:
diff changeset
    11
	<enumPropertyDeclaration qualifiedName="com.nokia.sdt.series60.GlobalNote.type">
cawthron
parents:
diff changeset
    12
		<enumElement value="EAknGlobalConfirmationNote"/>
cawthron
parents:
diff changeset
    13
		<enumElement value="EAknGlobalInformationNote"/>
cawthron
parents:
diff changeset
    14
		<enumElement value="EAknGlobalWarningNote"/>
cawthron
parents:
diff changeset
    15
		<enumElement value="EAknGlobalErrorNote"/>
cawthron
parents:
diff changeset
    16
	</enumPropertyDeclaration>
cawthron
parents:
diff changeset
    17
cawthron
parents:
diff changeset
    18
	<enumPropertyDeclaration qualifiedName="com.nokia.sdt.series60.GlobalNote.tone">
cawthron
parents:
diff changeset
    19
		<enumElement value="" displayValue="none"/>
cawthron
parents:
diff changeset
    20
		<enumElement value="EAknNoteDialogConfirmationTone"/>
cawthron
parents:
diff changeset
    21
		<enumElement value="EAknNoteDialogWarningTone"/>
cawthron
parents:
diff changeset
    22
		<enumElement value="EAknNoteDialogErrorTone"/>
cawthron
parents:
diff changeset
    23
	</enumPropertyDeclaration>
cawthron
parents:
diff changeset
    24
cawthron
parents:
diff changeset
    25
	<component baseComponent="com.nokia.sdt.series60.NonLayoutBase" 
cawthron
parents:
diff changeset
    26
		friendlyName="%friendlyName" 
cawthron
parents:
diff changeset
    27
		qualifiedName="com.nokia.sdt.series60.GlobalNote" 
cawthron
parents:
diff changeset
    28
		category="NotesDialogs"
cawthron
parents:
diff changeset
    29
		instanceNameRoot="globalNote"
cawthron
parents:
diff changeset
    30
		version="1.0">
cawthron
parents:
diff changeset
    31
		<documentation>
cawthron
parents:
diff changeset
    32
			<information>%information</information>
cawthron
parents:
diff changeset
    33
		</documentation>
cawthron
parents:
diff changeset
    34
		<symbian sdkName="com.nokia.series60" minSDKVersion="2.0" 
cawthron
parents:
diff changeset
    35
			className="CAknGlobalNote" classHelpTopic="" />
cawthron
parents:
diff changeset
    36
		<designerImages smallIconFile="GlobalNote_sm.png" 
cawthron
parents:
diff changeset
    37
			largeIconFile="GlobalNote.png"/>
cawthron
parents:
diff changeset
    38
		<attributes>
cawthron
parents:
diff changeset
    39
			<attribute key="is-non-layout-object">true</attribute>
cawthron
parents:
diff changeset
    40
			<attribute key="is-non-resizable-or-moveable-layout-object">true</attribute>
cawthron
parents:
diff changeset
    41
			<attribute key="is-transient-object">true</attribute>
cawthron
parents:
diff changeset
    42
		</attributes>
cawthron
parents:
diff changeset
    43
		<properties>
cawthron
parents:
diff changeset
    44
			<compoundProperty category="Hidden" name="location" type="com.nokia.sdt.series60.locationProperty"
cawthron
parents:
diff changeset
    45
				editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory"/>
cawthron
parents:
diff changeset
    46
			<compoundProperty category="Hidden" name="size" type="com.nokia.sdt.series60.sizeProperty"
cawthron
parents:
diff changeset
    47
				editorClass="com.nokia.sdt.symbian.ui.editors.ReadOnlySummaryEditorFactory"/>
cawthron
parents:
diff changeset
    48
			<enumProperty category="Appearance" name="type" type="com.nokia.sdt.series60.GlobalNote.type" 
cawthron
parents:
diff changeset
    49
				default="EAknGlobalErrorNote"
cawthron
parents:
diff changeset
    50
				descriptionKey="typeDescription" />
cawthron
parents:
diff changeset
    51
			<property category="Appearance" name="textProcessing" type="boolean" default="true" 
cawthron
parents:
diff changeset
    52
				descriptionKey="textProcessingDescription" />
cawthron
parents:
diff changeset
    53
			<property category="Data" name="text" type="localizedString" 
cawthron
parents:
diff changeset
    54
				default="Error!" 
cawthron
parents:
diff changeset
    55
				descriptionKey="textDescription"
cawthron
parents:
diff changeset
    56
				editorClass="com.nokia.sdt.symbian.ui.editors.ScalableTextEditorFactory" />
cawthron
parents:
diff changeset
    57
			<property category="Data" name="priority" type="integer"  
cawthron
parents:
diff changeset
    58
				descriptionKey="priorityDescription" />
cawthron
parents:
diff changeset
    59
			<enumProperty category="Data" name="tone" 
cawthron
parents:
diff changeset
    60
				type="com.nokia.sdt.series60.GlobalNote.tone"
cawthron
parents:
diff changeset
    61
				descriptionKey="toneDescription" />
cawthron
parents:
diff changeset
    62
		</properties>
cawthron
parents:
diff changeset
    63
		<implementations>
cawthron
parents:
diff changeset
    64
			<implementation>
cawthron
parents:
diff changeset
    65
				<interface id="com.nokia.sdt.datamodel.adapter.IVisualAppearance"/>
cawthron
parents:
diff changeset
    66
				<interface id="com.nokia.sdt.datamodel.adapter.IDirectLabelEdit"/>
cawthron
parents:
diff changeset
    67
				<script file="GlobalNote_visual.js" prototype="GlobalNoteVisual"/>
cawthron
parents:
diff changeset
    68
			</implementation>
cawthron
parents:
diff changeset
    69
			<implementation>
cawthron
parents:
diff changeset
    70
				<interface id="com.nokia.sdt.datamodel.adapter.ILayout"/>
cawthron
parents:
diff changeset
    71
				<interface id="com.nokia.sdt.datamodel.adapter.IComponentInstancePropertyListener"/> 
cawthron
parents:
diff changeset
    72
				<script file="GlobalNote_layout.js" prototype="GlobalNoteLayout"/>
cawthron
parents:
diff changeset
    73
			</implementation>
cawthron
parents:
diff changeset
    74
		</implementations>
cawthron
parents:
diff changeset
    75
		<sourceMapping>
cawthron
parents:
diff changeset
    76
			<mapResource struct="TBUF" headers="eikon.rh">
cawthron
parents:
diff changeset
    77
				<mapSimpleMember property="text" member="buf"/>
cawthron
parents:
diff changeset
    78
			</mapResource>
cawthron
parents:
diff changeset
    79
		</sourceMapping>
cawthron
parents:
diff changeset
    80
		<sourceGen>
cawthron
parents:
diff changeset
    81
			<template phase="MainSystemIncludes"><![CDATA[
cawthron
parents:
diff changeset
    82
#include <avkon.rsg>
cawthron
parents:
diff changeset
    83
]]>			</template>
cawthron
parents:
diff changeset
    84
			<template phase="MainSystemIncludes"><![CDATA[
cawthron
parents:
diff changeset
    85
#include <aknglobalnote.h>
cawthron
parents:
diff changeset
    86
]]>			</template>
cawthron
parents:
diff changeset
    87
			<template phase="MainSystemIncludes"><![CDATA[
cawthron
parents:
diff changeset
    88
#include <stringloader.h>
cawthron
parents:
diff changeset
    89
]]>			</template>
cawthron
parents:
diff changeset
    90
			<template phase="ClassMethods">
cawthron
parents:
diff changeset
    91
static void Run${instanceName$title}L( const TDesC* aOverrideText = NULL );
cawthron
parents:
diff changeset
    92
			</template>
cawthron
parents:
diff changeset
    93
			<defineLocation id="MethodLocation" baseLocation="MAIN_FILE" 
cawthron
parents:
diff changeset
    94
				owned="true"
cawthron
parents:
diff changeset
    95
				location="function(${className}::Run${instanceName$title}L(const TDesC*))">
cawthron
parents:
diff changeset
    96
				<template>
cawthron
parents:
diff changeset
    97
/**
cawthron
parents:
diff changeset
    98
 * Show the popup note for ${instanceName}
cawthron
parents:
diff changeset
    99
 * @param aOverrideText optional override text
cawthron
parents:
diff changeset
   100
 */
cawthron
parents:
diff changeset
   101
void ${className}::Run${instanceName$title}L( const TDesC* aOverrideText )
cawthron
parents:
diff changeset
   102
	{
cawthron
parents:
diff changeset
   103
	}
cawthron
parents:
diff changeset
   104
				</template>
cawthron
parents:
diff changeset
   105
			</defineLocation>
cawthron
parents:
diff changeset
   106
			<template location="MethodLocation"><![CDATA[
cawthron
parents:
diff changeset
   107
CAknGlobalNote* globalNote = CAknGlobalNote::NewLC();
cawthron
parents:
diff changeset
   108
if ( aOverrideText == NULL )
cawthron
parents:
diff changeset
   109
	{
cawthron
parents:
diff changeset
   110
	HBufC* noteText = StringLoader::LoadLC( ${resourceName$upper} );
cawthron
parents:
diff changeset
   111
	<% if (properties.textProcessing != true) { %>globalNote->SetTextProcessing( ${properties.textProcessing} );
cawthron
parents:
diff changeset
   112
	<%} %><% if (properties.priority != 0) { %>globalNote->SetPriority( ${properties.priority} );
cawthron
parents:
diff changeset
   113
	<% } %><% if (properties.tone != "") { %>globalNote->SetTone( ${properties.tone} );
cawthron
parents:
diff changeset
   114
	<% } %>globalNote->ShowNoteL( ${properties.type}, *noteText );
cawthron
parents:
diff changeset
   115
	CleanupStack::PopAndDestroy( noteText );
cawthron
parents:
diff changeset
   116
	}
cawthron
parents:
diff changeset
   117
else
cawthron
parents:
diff changeset
   118
	{
cawthron
parents:
diff changeset
   119
	globalNote->ShowNoteL( ${properties.type}, *aOverrideText );
cawthron
parents:
diff changeset
   120
	}
cawthron
parents:
diff changeset
   121
CleanupStack::PopAndDestroy( globalNote );
cawthron
parents:
diff changeset
   122
]]>			</template>
cawthron
parents:
diff changeset
   123
cawthron
parents:
diff changeset
   124
			
cawthron
parents:
diff changeset
   125
		</sourceGen>
cawthron
parents:
diff changeset
   126
	</component>
cawthron
parents:
diff changeset
   127
	
cawthron
parents:
diff changeset
   128
</componentDefinition>