How to use Messaging Filter in QML
(Devnull -) |
hamishwillee
(Talk | contribs) m (Hamishwillee -) |
||
| (10 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
| − | [[Category:Qt Mobility]][[Category:Qt Quick]] | + | [[Category:Qt Mobility]][[Category:Qt Quick]][[Category:Symbian]][[Category:MeeGo Harmattan]][[Category:Messaging]][[Category:Qt]] |
| − | + | {{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 24: | Line 20: | ||
|update-by= <!-- After significant update: [[User:username]]--> | |update-by= <!-- After significant update: [[User:username]]--> | ||
|update-timestamp= <!-- After significant update: YYYYMMDD --> | |update-timestamp= <!-- After significant update: YYYYMMDD --> | ||
| − | |creationdate= | + | |creationdate= 20120307 |
| − | |author= | + | |author= [[User:Devnull]] |
}} | }} | ||
== Introduction == | == Introduction == | ||
| − | Qt mobility messaging when used | + | Qt mobility messaging when used with Qt Quick, involves the component of MessageModel. Due to a [https://bugreports.qt-project.org/browse/QTMOBILITY-2037 bug] in the implementation, standard folders enums are not exposed to QML: |
| − | <code cpp> | + | <code cpp-qt> |
| − | + | enum StandardFolder { | |
| − | + | InboxFolder = QMessage::InboxFolder, | |
| − | + | DraftsFolder = QMessage::DraftsFolder, | |
| − | + | OutboxFolder = QMessage::OutboxFolder, | |
| − | + | SentFolder = QMessage::SentFolder, | |
| − | + | TrashFolder = QMessage::TrashFolder | |
} | } | ||
</code> | </code> | ||
To add folder filters, one have to use the values by hand: | To add folder filters, one have to use the values by hand: | ||
| − | <code | + | <code javascript> |
| − | + | MessageFilter { | |
| − | + | type: MessageFilter.StandardFolder | |
| − | + | value: 4 //MessageFilter.SentFolder | |
| − | + | comparator: MessageFilter.Equal | |
| − | + | } | |
| − | + | ||
</code> | </code> | ||
| − | |||
| − | |||
| − | |||
Latest revision as of 01:59, 18 October 2012
This article explains how to use Messaging Filter in QML.
Article Metadata
Code Example
Source file: File:MessageFilter.zip
Tested with
SDK: Qt SDK 1.2
Devices(s): Nokia 6-01 , Belle
Compatibility
Platform(s): Symbian^3
Device(s): All*
Platform Security
Capabilities: NetworkServices ReadUserData WriteUserData
Article
Keywords: MessageModel
Created: Devnull
(07 Mar 2012)
Last edited: hamishwillee
(18 Oct 2012)
Introduction
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
}

