|  | Home |

# QMailMessageSet Class Reference

The QMailMessageSet class represents a subset of the messages in the mail store. More...

        #include <QMailMessageSet>

This class is under development and is subject to change.

Inherits QObject and QMailMessageSetContainer.

Inherited by QMailAccountMessageSet, QMailFilterMessageSet, and QMailFolderMessageSet.

- List of all members, including inherited members

## Public Functions

| QMailMessageSet ( QMailMessageSetContainer * container )
QVariant | data ( int role, int column = 0 )
virtual QMailMessageKey | descendantsMessageKey () const
virtual QString | displayName () const = 0
virtual QMailMessageKey | messageKey () const = 0
QModelIndex | modelIndex ( int column = 0 )

- 29 public functions inherited from QObject
- 10 public functions inherited from QMailMessageSetContainer

## Protected Functions

virtual void | init ()

- 7 protected functions inherited from QObject
- 1 protected function inherited from QMailMessageSetContainer

### Additional Inherited Members

- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 1 signal inherited from QObject
- 1 public type inherited from QObject
- 4 static public members inherited from QObject
- 2 protected variables inherited from QObject

## Detailed Description

The QMailMessageSet class represents a subset of the messages in the mail store.

QMailMessageSet provides a representation for a named subset of messages, specified by a QMailMessageKey selection criterion.

QMailMessageSets are designed to be arranged in hierarchies, and each message set is a container for child message sets, implementing the QMailMessageSetContainer interface. Message sets are owned by QMailMessageSetModel instances, and the index of a message set within the model can be retrieved using modelIndex().

The messageKey() function of each QMailMessageSet object can be used to provide the message selection filter for a QMailMessageListModel. The descendantsMessageKey() function can be used to provide a message selection filter matching all messages beneath this message set in the hierarchy.

QMailMessageSet objects should not directly respond to events reported by the QMailStore; instead, they should react to notifications of mail store events emitted by the QMailMessageSetModel to which they are attached. Because the events they receive from the model may be filtered, QMailMessageSet instances must implement the resyncState() function, resynchronizing their state with the current state of the mail store.

See also QMailMessageSetModel.

## Member Function Documentation

### QMailMessageSet::QMailMessageSet ( QMailMessageSetContainer * container )

Constructs a new QMailMessageSet within the container object container.

### QVariant QMailMessageSet::data ( int role, int column = 0 )

Returns the data element associated with the specified role and column, from the model that owns this message set.

### QMailMessageKey QMailMessageSet::descendantsMessageKey () const `[virtual]`

Returns the QMailMessageKey that defines the messages found beneath this message set in the hierarchy, not including the messages of this message set itself.

### QString QMailMessageSet::displayName () const `[pure virtual]`

Returns the name of this message set, suitable for display purposes.

### void QMailMessageSet::init () `[virtual protected]`

Initialises the message set after it has been appended to the parent container object.

### QMailMessageKey QMailMessageSet::messageKey () const `[pure virtual]`

Returns the QMailMessageKey that defines the messages represented by this message set.

### QModelIndex QMailMessageSet::modelIndex ( int column = 0 )

Returns the index of this message set within the model that owns it, having the specified column.