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

QAppointmentDelegate Class Reference
[QtMessagingModule, QtPimModule, QtTelephonyModule, QtUiModule]

The QAppointmentDelegate class provides drawing of QAppointmentModel items (QAppointments). More...

    #include <QAppointmentDelegate>

Inherits QAbstractItemDelegate.

Public Functions

Additional Inherited Members

Detailed Description

The QAppointmentDelegate class provides drawing of QAppointmentModel items (QAppointments).

By using QAppointmentDelegate, applications dealing with QAppointments can achieve a consistent look and feel.

QAppointments are drawn with two sections per item. There are optional icons on the right side of the rendered item, and text on the left. The text and icons are rendered vertically centred within the item if there is enough space. The icons are rendered starting at the top right, in a top-to-bottom, right-to-left fashion.

The following image illustrates a collection of QAppointments being displayed by an application.

"View of QAppointments"

It is assumed that the model is a QAppointmentModel. The roles used to draw the items include:

RoleData TypeDescription
Qt::DisplayRoleQStringPlain unformatted text drawn on the left of the icon, wrapped to any icons.
Qt::DecorationRoleQList<QIcon>Optional. Drawn on the right side of the item, top-to-bottom, right-to-left

The four appointments shown in the picture above have the following data in the model:

Status meetingList with a single icon for recurrence
Lunch at Moe'sList with a single icon for a reminder
School play<empty list>
Oslo conf.List with two icons:
  • a recurrence icon
  • a timezone icon

Selected appointments are rendered with the current palette's Highlight color), while unselected appointments are rendered with the Button color.

See also QAppointment, QAppointmentModel, and Pim Library.

Member Function Documentation

QAppointmentDelegate::QAppointmentDelegate ( QObject * parent = 0 )

Constructs a QAppointmentDelegate with the given parent.

QAppointmentDelegate::~QAppointmentDelegate ()   [virtual]

Destroys a QAppointmentDelegate.

Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3