summaryrefslogtreecommitdiffstats
path: root/doc/src/classes
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-08-14 15:18:01 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-08-14 15:18:01 (GMT)
commite9d32707afeddfdd2906af7bed60c375b1035dd6 (patch)
tree0a64a906e00fda94ac18d7752a06248d816d0d36 /doc/src/classes
parentbd714736bdc43175e202bc3809e6f7a614736f87 (diff)
downloadQt-e9d32707afeddfdd2906af7bed60c375b1035dd6.zip
Qt-e9d32707afeddfdd2906af7bed60c375b1035dd6.tar.gz
Qt-e9d32707afeddfdd2906af7bed60c375b1035dd6.tar.bz2
Doc: Included type information for the Qt::ItemDataRole enum.
Task-number: 257116 Reviewed-by: Trust Me
Diffstat (limited to 'doc/src/classes')
-rw-r--r--doc/src/classes/qnamespace.qdoc39
1 files changed, 22 insertions, 17 deletions
diff --git a/doc/src/classes/qnamespace.qdoc b/doc/src/classes/qnamespace.qdoc
index 2ccc639..6f28504 100644
--- a/doc/src/classes/qnamespace.qdoc
+++ b/doc/src/classes/qnamespace.qdoc
@@ -2464,44 +2464,46 @@
Each item in the model has a set of data elements associated with
it, each with its own role. The roles are used by the view to indicate
- to the model which type of data it needs.
+ to the model which type of data it needs. Custom models should return
+ data in these types.
- The general purpose roles are:
+ The general purpose roles (and the associated types) are:
- \value DisplayRole The key data to be rendered in the form of text.
+ \value DisplayRole The key data to be rendered in the form of text. (QString)
\value DecorationRole The data to be rendered as a decoration in the form
- of an icon.
+ of an icon. (QColor)
\value EditRole The data in a form suitable for editing in an
- editor.
- \value ToolTipRole The data displayed in the item's tooltip.
- \value StatusTipRole The data displayed in the status bar.
+ editor. (QString)
+ \value ToolTipRole The data displayed in the item's tooltip. (QString)
+ \value StatusTipRole The data displayed in the status bar. (QString)
\value WhatsThisRole The data displayed for the item in "What's This?"
- mode.
+ mode. (QString)
\value SizeHintRole The size hint for the item that will be supplied
- to views.
+ to views. (QSize)
- Roles describing appearance and meta data:
+ Roles describing appearance and meta data (with associated types):
\value FontRole The font used for items rendered with the default
- delegate.
+ delegate. (QFont)
\value TextAlignmentRole The alignment of the text for items rendered with the
- default delegate.
+ default delegate. (Qt::AlignmentFlag)
\value BackgroundRole The background brush used for items rendered with
- the default delegate.
+ the default delegate. (QBrush)
\value BackgroundColorRole This role is obsolete. Use BackgroundRole instead.
\value ForegroundRole The foreground brush (text color, typically)
used for items rendered with the default delegate.
+ (QBrush)
\value TextColorRole This role is obsolete. Use ForegroundRole instead.
\value CheckStateRole This role is used to obtain the checked state of
- an item (see \l Qt::CheckState).
+ an item. (Qt::CheckState)
- Accessibility roles:
+ Accessibility roles (with associated types):
\value AccessibleTextRole The text to be used by accessibility
extensions and plugins, such as screen
- readers.
+ readers. (QString)
\value AccessibleDescriptionRole A description of the item for accessibility
- purposes.
+ purposes. (QString)
User roles:
@@ -2512,6 +2514,9 @@
\omitvalue ToolTipPropertyRole
\omitvalue StatusTipPropertyRole
\omitvalue WhatsThisPropertyRole
+
+ For user roles, it is up to the developer to decide which types to use and ensure that
+ components use the correct types when accessing and setting data.
*/
/*!