(Difference between revisions)

How to use Messaging Filter in QML

From Nokia Developer Wiki
Jump to: navigation, search
chintandave_er (Talk | contribs)
chintandave_er (Talk | contribs)
(Chintandave er - better wording and modified abstract)
Line 1: Line 1:
[[Category:Qt Mobility]][[Category:Qt Quick]]
[[Category:Qt Mobility]][[Category:Qt Quick]]
{{Abstract|This article explains how to use Messaging Filter in QML ... }}  
{{Abstract|This article explains how to use Messaging Filter in QML. }}  
{{ArticleMetaData <!-- v1.2 -->
{{ArticleMetaData <!-- v1.2 -->
|sourcecode= [[File:MessageFilter.zip]]<!-- -->
|sourcecode= [[File:MessageFilter.zip]]<!-- -->
Line 49: Line 47:
== Summary ==

Revision as of 20:46, 7 March 2012

This article explains how to use Messaging Filter in QML.

Article Metadata
Code ExampleTested with
SDK: Qt SDK 1.2
Devices(s): Nokia 6-01 , Belle
Platform(s): Symbian^3
Device(s): All*
Platform Security
Capabilities: NetworkServices ReadUserData WriteUserData
Keywords: MessageModel
Created: (07 Mar 2012)
Last edited: chintandave_er (07 Mar 2012)


Qt mobility messaging when used with Qt quick, involves the component of MessageModel. Due to a bug in the implementation, standard folders enums are not exposed to QML:

        enum StandardFolder {
InboxFolder = QMessage::InboxFolder,
DraftsFolder = QMessage::DraftsFolder,
OutboxFolder = QMessage::OutboxFolder,
SentFolder = QMessage::SentFolder,
TrashFolder = QMessage::TrashFolder

To add folder filters, one have to use the values by hand:

                        MessageFilter {
type: MessageFilter.StandardFolder
value: 4 //MessageFilter.SentFolder
comparator: MessageFilter.Equal
111 page views in the last 30 days.