Home · All Classes · Main Classes · Deprecated
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends

MNotificationGroup Class Reference

A class that represents a notification group. More...

Inheritance diagram for MNotificationGroup:
Inheritance graph
[legend]
Collaboration diagram for MNotificationGroup:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MNotificationGroup (const QString &eventType, const QString &summary=QString(), const QString &body=QString())
virtual ~MNotificationGroup ()
 MNotificationGroup ()
 MNotificationGroup (const MNotificationGroup &group)

Static Public Member Functions

static QList
< MNotificationGroup * > 
notificationGroups ()

Protected Member Functions

 MNotificationGroup (uint id)

Friends

QDBusArgumentoperator<< (QDBusArgument &, const MNotificationGroup &)
const QDBusArgumentoperator>> (const QDBusArgument &, MNotificationGroup &)

Detailed Description

A class that represents a notification group.

Overview

A class that represents a notification group. Notification groups can be used to bundle similar notifications into one so that the individual notifications join a group of notifications on the notification area.

A notification group is not created or updated until the publish() function is called. A notification group must be published before notifications are placed into it.

A list of notification groups already created can be requested. A QCoreApplication must be created before doing the request.

See also:
MNotification
Notifications System

Definition at line 50 of file corelib/notification/mnotificationgroup.h.


Constructor & Destructor Documentation

MNotificationGroup::MNotificationGroup ( const QString eventType,
const QString summary = QString(),
const QString body = QString() 
) [explicit]

Creates a new representation of a notification group. The notification group will not be published until publish() is called. Only the event type needs to be defined. If no summary or body text is defined the notification group will not have a visual representation.

Parameters:
eventType the event type of the notification group
summary the summary text to be used in the notification. Can be omitted (defaults to no summary text).
body the body text to be used in the notification. Can be omitted (defaults to no body text).

Definition at line 37 of file mnotificationgroup.cpp.

                                                                                                            :
    MNotification(*new MNotificationGroupPrivate)
{
    Q_D(MNotificationGroup);
    d->eventType = eventType;
    d->summary = summary;
    d->body = body;
}

MNotificationGroup::~MNotificationGroup (  )  [virtual]

Destroys the class that represents a notification group.

Definition at line 52 of file mnotificationgroup.cpp.

{
}

MNotificationGroup::MNotificationGroup (  ) 

Definition at line 32 of file mnotificationgroup.cpp.

                                       :
    MNotification(*new MNotificationGroupPrivate)
{
}

MNotificationGroup::MNotificationGroup ( const MNotificationGroup group  )  [explicit]

Creates a copy of an existing representation of a notification group. This constructor should only be used for populating the notification group list from D-Bus structures.

Parameters:
group the notification representation to a create copy of

Definition at line 46 of file mnotificationgroup.cpp.

                                                                      :
    MNotification(*new MNotificationGroupPrivate)
{
    *this = group;
}

MNotificationGroup::MNotificationGroup ( uint  id  )  [explicit, protected]

Creates a representation of an existing notification group. Should be used to get a handle to an existing notification group with a known ID.

Parameters:
id the ID of the existing notification group

Definition at line 56 of file mnotificationgroup.cpp.

                                              : MNotification(id)
{
}


Member Function Documentation

QList< MNotificationGroup * > MNotificationGroup::notificationGroups (  )  [static]

Returns a list of notification groups created by this application but which have not been dismissed by the user yet. Caller of this function gets the ownership of the notification groups, and is responsible for freeing them.

Returns:
list of notifications

Definition at line 97 of file mnotificationgroup.cpp.

{
    QList<MNotificationGroup> list = MNotificationManager::instance()->notificationGroupList();
    QList<MNotificationGroup *> notificationGroups;
    foreach(const MNotificationGroup &group, list) {
        notificationGroups.append(new MNotificationGroup(group));
    }
    return notificationGroups;
}

Here is the call graph for this function:


Friends And Related Function Documentation

QDBusArgument& operator<< ( QDBusArgument argument,
const MNotificationGroup group 
) [friend]

Definition at line 107 of file mnotificationgroup.cpp.

{
    const MNotificationGroupPrivate *d = group.d_func();
    argument.beginStructure();
    argument << d->id;
    argument << d->eventType;
    argument << d->summary;
    argument << d->body;
    argument << d->image;
    argument << d->action;
    argument << d->count;
    argument.endStructure();
    return argument;
}

const QDBusArgument& operator>> ( const QDBusArgument argument,
MNotificationGroup group 
) [friend]

Definition at line 122 of file mnotificationgroup.cpp.

{
    MNotificationGroupPrivate *d = group.d_func();
    argument.beginStructure();
    argument >> d->id;
    argument >> d->eventType;
    argument >> d->summary;
    argument >> d->body;
    argument >> d->image;
    argument >> d->action;
    argument >> d->count;
    argument.endStructure();
    return argument;
}


Copyright © 2010 Nokia Corporation Generated on Thu Nov 4 2010 18:14:26 (PDT)
Doxygen 1.7.1
MeeGo Touch