Namespaces
Variants
Actions

查找特殊项API

Jump to: navigation, search
文章信息

代码示例
文章
翻译:
翻译自: Item Finder API
hoolee
最后由 hamishwillee 在 08 May 2013 编辑
Note.png
Note: :这个API不是公开SDK的一部分,但可以在这里SDK API Plug-in找到

API使用目的

插件主要用来进行自动标记(http, email, 电话号码)

头文件:

#include <aknitemfinder.h>
Note.png
Note: :在S60第五版扩展plug-in中,这个API将变为CItemFinder,可以在epoc32\include\itemfinder.h定位

Use cases

CAKnItemFinder提供了文本编辑框中如电话号码,URL和http地址的高亮,选择,获取功能

示例代码

iAutoFinder = CAknItemFinder::NewL(); 
//Must be called before editor creation in order to have effect
iAutoFinder->SetFindModeL(CAknItemFinder::EPhoneNumber |
CAknItemFinder::EUrlAddress |
CAknItemFinder::EEmailAddress );
 
iAutoFinder->SetEditor((CEikRichTextEditor**)&iDialText); // iDial is any editor.

The following code is used to scroll down for the found items through the editor

TBool iReturn = iAutoFinder->NextItemOrScrollL( CAknItemFinder::ENextDown );

The following code is used to retrieve the selected item.

HBufC* iBuff = iAutoFinder->CurrentItem().iItemDescriptor;

示例程序

File:UseItemFinder.zip

This page was last modified on 8 May 2013, at 03:05.
140 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved