![]() |
Home · All Classes · All Functions · Overviews |
The QMaemo5ListPickSelector widget displays a list of items. More...
#include <QMaemo5ListPickSelector>
Inherits QMaemo5AbstractPickSelector.
This class was introduced in Qt 4.6.
QMaemo5ListPickSelector ( QObject * parent = 0 ) | |
~QMaemo5ListPickSelector () | |
int | currentIndex () const |
QAbstractItemModel * | model () const |
int | modelColumn () const |
void | setModel ( QAbstractItemModel * model ) |
void | setModelColumn ( int column ) |
void | setView ( QAbstractItemView * itemView ) |
QAbstractItemView * | view () const |
virtual QString | currentValueText () const |
virtual QWidget * | widget ( QWidget * parent ) |
void | setCurrentIndex ( int index ) |
The QMaemo5ListPickSelector widget displays a list of items.
The QMaemo5ListPickSelector is a selector that displays the contents of a QAbstractItemModel and allows the user to select one item from it.
This object should be used together with the QMaemo5ValueButton.
See also QAbstractItemModel and QMaemo5ValueButton.
This property holds the index of the current item in the list picker.
The current index can change when setting a new model with a lower row count than the previous one.
By default, for an empty list picker or a list picker in which no current item is set, this property has a value of -1.
Access functions:
int | currentIndex () const |
void | setCurrentIndex ( int index ) |
This property holds the model used in the list picker.
By default, Maemo lists have centered text so it makes sense to call setTextAlignment(Qt::AlignCenter) on all items in the model in order to comply with the Maemo 5 style guides.
Either list or table models can be used. Table models may require the modelColumn property to be set to a non-default value, depending on their contents.
The use of tree models with a pick selector is untested. In addition, changing the model while the list dialog is displayed may lead to undefined behavior.
Note: The list pick selector will not take ownership of the model.
Access functions:
QAbstractItemModel * | model () const |
void | setModel ( QAbstractItemModel * model ) |
This property holds the column in the model that is used for the picker results.
This property determines the column in a table model used for determining the picker result.
By default, this property has a value of 0.
Access functions:
int | modelColumn () const |
void | setModelColumn ( int column ) |
Constructs a new list pick selector with the given parent object.
Destroys the pick selector and the view (if set). It will not destroy the model.
Reimplemented from QMaemo5AbstractPickSelector::currentValueText().
Sets the view to be used in the list pick selector pop-up to the given itemView. The list picker takes ownership of the view.
Note: If you want to use the convenience views (like QListWidget, QTableWidget or QTreeWidget), make sure you call setModel() on the list picker with the convenience widget's model before calling this function.
See also view().
Returns the list view used for the list pick selector pop-up.
See also setView().
Reimplemented from QMaemo5AbstractPickSelector::widget().
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.6.2 |