Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

(Difference between revisions)

How to use Messaging Filter in QML

From Wiki
Jump to: navigation, search
Devnull (Talk | contribs)
(Devnull -)
 
hamishwillee (Talk | contribs)
m (Hamishwillee -)
 
(12 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]]
''Delete instructional text in italic''
+
{{Abstract|This article explains how to use Messaging Filter in QML. }}  
 
+
{{Abstract|This article explains how to ... }} ''Replace the abstract text with a short paragraph (or sentence) describing what the topic covers.''
+
 
+
''Enter article metadata as described below. Note that this template can be placed anywhere in the article. Do not remove parameters that you do not use''
+
 
{{ArticleMetaData <!-- v1.2 -->
 
{{ArticleMetaData <!-- v1.2 -->
|sourcecode= <!-- -->
+
|sourcecode= [[File:MessageFilter.zip]]<!-- -->
 
|installfile= <!--  -->
 
|installfile= <!--  -->
 
|devices=  Nokia 6-01 , Belle<!-- ''') -->
 
|devices=  Nokia 6-01 , Belle<!-- ''') -->
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= <!-- Format YYYYMMDD -->
+
|creationdate= 20120307
|author= <!-- Display as link [[User:username]] -->
+
|author= [[User:Devnull]]
 
}}
 
}}
  
 
== Introduction ==
 
== Introduction ==
  
Qt mobility messaging when used in Qt quick, involve 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:
+
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 {
+
enum StandardFolder {
            InboxFolder = QMessage::InboxFolder,
+
    InboxFolder = QMessage::InboxFolder,
            DraftsFolder = QMessage::DraftsFolder,
+
    DraftsFolder = QMessage::DraftsFolder,
            OutboxFolder = QMessage::OutboxFolder,
+
    OutboxFolder = QMessage::OutboxFolder,
            SentFolder = QMessage::SentFolder,
+
    SentFolder = QMessage::SentFolder,
            TrashFolder = QMessage::TrashFolder
+
    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 cpp>
+
<code javascript>
                        MessageFilter {
+
MessageFilter {
                            type: MessageFilter.StandardFolder
+
    type: MessageFilter.StandardFolder
                            value: 4 //MessageFilter.SentFolder
+
    value: 4 //MessageFilter.SentFolder
                            comparator: MessageFilter.Equal
+
    comparator: MessageFilter.Equal
                        }
+
}
 
+
 
</code>
 
</code>
 
 
== Summary ==
 

Latest revision as of 22:59, 17 October 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
Compatibility
Platform(s): Symbian^3
Symbian
Device(s): All*
Platform Security
Capabilities: NetworkServices ReadUserData WriteUserData
Article
Keywords: MessageModel
Created: Devnull (07 Mar 2012)
Last edited: hamishwillee (17 Oct 2012)

[edit] 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
}
This page was last modified on 17 October 2012, at 22:59.
81 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×