Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QTaskListView class provides a list view widget with some convenience functions for use with QTaskModel. More...
#include <QTaskListView>
Inherits QListView.
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:
See also QTask, QTaskDelegate, QTaskModel, and Pim Library.
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.
Destroys the QTaskListView.
Return the QTask for the currently selected index, or an empty QTask if there is no selected index.
Returns the list of ids for QTasks selected from the view.
See also selectedTasks() and QTask::uid().
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().
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.
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.
Returns the QTaskModel set for the view.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |