Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QMailFolder Class Reference
[QtMessagingModule, QtPimModule]

The QMailFolder class represents a folder for mail messages in the mail store. More...

    #include <QMailFolder>

This class is under development and is subject to change.

Public Types

Public Functions

Static Public Members


Detailed Description

The QMailFolder class represents a folder for mail messages in the mail store.

QMailFolder represents a folder of mail messages, either defined internally for application use, or to represent a folder object held by an external message service, such as an IMAP account.

A QMailFolder object has an optional parent of the same type, allowing folders to be arranged in tree structures. Messages may be associated with folders, allowing for simple classification and access by their parentFolderId property.

See also QMailMessage and QMailStore::folder().


Member Type Documentation

enum QMailFolder::StandardFolder

This enum type describes the standard standard storage folders. These folders cannot be removed or updated.

ConstantValueDescription
QMailFolder::InboxFolder1Represents the standard inbox folder.
QMailFolder::OutboxFolder2Represents the standard outbox folder.
QMailFolder::DraftsFolder3Represents the standard drafts folder.
QMailFolder::SentFolder4Represents the standard sent folder.
QMailFolder::TrashFolder5Represents the standard trash folder.


Member Function Documentation

QMailFolder::QMailFolder ()

Constructor that creates an empty and invalid QMailFolder. An empty folder is one which has no name, no parent folder and no parent account. An invalid folder does not exist in the database and has an invalid id.

QMailFolder::QMailFolder ( const QString & name, const QMailFolderId & parentFolderId = QMailFolderId(), const QMailAccountId & parentAccountId = QMailAccountId() )

Creates a QMailFolder object with name name and parent folder ID parentFolderId, that is linked to a parent account parentAccountId.

QMailFolder::QMailFolder ( const StandardFolder & sf )

Constructor that loads a standard QMailFolder specified by sf from the message store.

QMailFolder::QMailFolder ( const QMailFolderId & id )

Constructor that creates a QMailFolder by loading the data from the message store as specified by the QMailFolderId id. If the folder does not exist in the message store, then this constructor will create an empty and invalid QMailFolder.

QMailFolder::QMailFolder ( const QMailFolder & other )

Creates a copy of the QMailFolder object other.

QMailFolder::~QMailFolder ()   [virtual]

Destroys the QMailFolder object.

QString QMailFolder::displayName () const

Returns the display name of the folder.

See also setDisplayName().

QMailFolderId QMailFolder::id () const

Returns the ID of the QMailFolder object. A QMailFolder with an invalid ID is one which does not yet exist on the message store.

See also setId().

bool QMailFolder::isRoot () const

Returns true if the folder is a root folder or false otherwise. A root folder is one which has not parent.

QString QMailFolder::name () const

Returns the name of the folder.

See also setName().

QMailAccountId QMailFolder::parentAccountId () const

Returns the id of the account which owns the folder. If the folder is not linked to an account an invalid id is returned.

See also setParentAccountId().

QMailFolderId QMailFolder::parentId () const

Returns the ID of the parent folder. This folder is a root folder if the parent ID is invalid.

See also setParentId().

void QMailFolder::setDisplayName ( const QString & displayName )

Sets the display name of this folder to displayName.

See also displayName().

void QMailFolder::setId ( const QMailFolderId & id )

Sets the ID of this folder to id

See also id().

void QMailFolder::setName ( const QString & name )

Sets the name of this folder to name.

See also name().

void QMailFolder::setParentAccountId ( const QMailAccountId & id )

Sets the id of the account which owns the folder to id.

See also parentAccountId().

void QMailFolder::setParentId ( const QMailFolderId & id )

Sets the parent folder id to id. Warning: it is the responsibility of the application to make sure that no circular folder refernces are created.

See also parentId().

void QMailFolder::setStatus ( quint64 newStatus )

Sets the status value for the folder to newStatus.

See also status() and statusMask().

void QMailFolder::setStatus ( quint64 mask, bool set )

This is an overloaded member function, provided for convenience.

Sets the status flags indicated in mask to set.

See also status() and statusMask().

quint64 QMailFolder::status () const

Returns the status value for the folder.

See also setStatus() and statusMask().

quint64 QMailFolder::statusMask ( const QString & flagName )   [static]

Returns the status bitmask needed to test the result of QMailFolder::status() against the QMailFolder status flag registered with the identifier flagName.

See also status() and QMailStore::folderStatusMask().

QMailFolder & QMailFolder::operator= ( const QMailFolder & other )

Assigns the value of the QMailFolder object other to this.


Member Variable Documentation

const quint64 & QMailFolder::SynchronizationEnabled

The status mask needed for testing the value of the registered status flag named "SynchronizationEnabled" against the result of QMailFolder::status().

This flag indicates that a folder should be included during account synchronization.

const quint64 & QMailFolder::Synchronized

The status mask needed for testing the value of the registered status flag named "Synchronized" against the result of QMailFolder::status().

This flag indicates that a folder has been synchronized during account synchronization.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3