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

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

The QTaskListView class provides a list view widget with some convenience functions for use with QTaskModel. More...

    #include <QTaskListView>

Inherits QListView.

Public Functions

Additional Inherited Members


Detailed Description

The QTaskListView class provides a list view widget with some convenience functions for use with QTaskModel.

The convenience functions provided by QTaskListView include functions for interpreting the view's model, delegate and current item as the corresponding QTaskModel, QTaskDelegate and QTask objects. In addition, QTaskListView enforces using a QTaskModel (or a derivative) as the model.

Upon construction, QTaskListView automatically sets itself to use a QTaskDelegate for drawing, sets Batched layout mode (setLayoutMode()), and sets the resize mode to Adjust (setResizeMode()).

The following image shows three QTask objects, rendered using a QTaskDelegate and a QTaskListView:

"QTaskListView and QTaskDelegate"

See also QTask, QTaskDelegate, QTaskModel, and Pim Library.


Member Function Documentation

QTaskListView::QTaskListView ( QWidget * parent )

Constructs a QTaskListView with parent parent.

This also sets the layout mode to Batched for performance, the resize mode to Adjust, and creates a QTaskDelegate to use as the delegate.

QTaskListView::~QTaskListView ()

Destroys the QTaskListView.

QTask QTaskListView::currentTask () const

Return the QTask for the currently selected index, or an empty QTask if there is no selected index.

QList<QUniqueId> QTaskListView::selectedTaskIds () const

Returns the list of ids for QTasks selected from the view.

See also selectedTasks() and QTask::uid().

QList<QTask> QTaskListView::selectedTasks () const

Returns a list of QTasks selected in the view. Fetching the complete QTask object can be expensive, so if a large number of tasks might be selected selectedTaskIds() could be used instead.

See also selectedTaskIds().

void QTaskListView::setModel ( QAbstractItemModel * model )   [virtual]

Sets the model for the view to model.

Will only accept the model if it inherits or is a QTaskModel. If the model does not inherit a QTaskModel, the existing model will be retained.

Reimplemented from QAbstractItemView.

QTaskDelegate * QTaskListView::taskDelegate () const

Returns the QTaskDelegate set for the view. During construction, QTaskListView will automatically create a QTaskDelegate to use as the delegate, but this can be overridden with a different delegate derived from QTaskDelegate if necessary.

QTaskModel * QTaskListView::taskModel () const

Returns the QTaskModel set for the view.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3