com.trolltech.qt.core
Class Qt.ItemDataRole

java.lang.Object
  extended by com.trolltech.qt.core.Qt.ItemDataRole
Enclosing interface:
Qt

public static class Qt.ItemDataRole
extends java.lang.Object

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.

The general purpose roles are:

ConstantValueDescription
DisplayRole0The key data to be rendered (usually text).
DecorationRole1The data to be rendered as a decoration (usually an icon).
EditRole2The data in a form suitable for editing in an editor.
ToolTipRole3The data displayed in the item's tooltip.
StatusTipRole4The data displayed in the status bar.
WhatsThisRole5The data displayed for the item in "What's This?" mode.
SizeHintRole13The size hint for the item that will be supplied to views.

Roles describing appearance and meta data:

ConstantValueDescription
FontRole6The font used for items rendered with the default delegate.
TextAlignmentRole7The alignment of the text for items rendered with the default delegate.
BackgroundRole8The background brush used for items rendered with the default delegate.
BackgroundColorRole8This role is obsolete. Use BackgroundRole instead.
ForegroundRole9The foreground brush (text color, typically) used for items rendered with the default delegate.
TextColorRole9This role is obsolete. Use ForegroundRole instead.
CheckStateRole10This role is used to obtain the checked state of an item (see Qt::CheckState).

Accessibility roles:

ConstantValueDescription
AccessibleTextRole11The text to be used by accessibility extensions and plugins, such as screen readers.
AccessibleDescriptionRole12A description of the item for accessibility purposes.

User roles:

ConstantValueDescription
UserRole32The first role that can be used for application-specific purposes.


Field Summary
static int AccessibleDescriptionRole
          A description of the item for accessibility purposes.
static int AccessibleTextRole
          The text to be used by accessibility extensions and plugins, such as screen readers.
static int BackgroundRole
          The background brush used for items rendered with the default delegate.
static int CheckStateRole
          This role is used to obtain the checked state of an item (see Qt::CheckState).
static int DecorationRole
          The data to be rendered as a decoration (usually an icon).
static int DisplayRole
          The key data to be rendered (usually text).
static int EditRole
          The data in a form suitable for editing in an editor.
static int FontRole
          The font used for items rendered with the default delegate.
static int ForegroundRole
          The foreground brush (text color, typically) used for items rendered with the default delegate.
static int SizeHintRole
          The size hint for the item that will be supplied to views.
static int StatusTipRole
          The data displayed in the status bar.
static int TextAlignmentRole
          The alignment of the text for items rendered with the default delegate.
static int ToolTipRole
          The data displayed in the item's tooltip.
static int UserRole
          The first role that can be used for application-specific purposes.
static int WhatsThisRole
          The data displayed for the item in "What's This?" mode.
 
Constructor Summary
Qt.ItemDataRole()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DisplayRole

public static final int DisplayRole

The key data to be rendered (usually text).

See Also:
Constant Field Values

DecorationRole

public static final int DecorationRole

The data to be rendered as a decoration (usually an icon).

See Also:
Constant Field Values

EditRole

public static final int EditRole

The data in a form suitable for editing in an editor.

See Also:
Constant Field Values

ToolTipRole

public static final int ToolTipRole

The data displayed in the item's tooltip.

See Also:
Constant Field Values

StatusTipRole

public static final int StatusTipRole

The data displayed in the status bar.

See Also:
Constant Field Values

WhatsThisRole

public static final int WhatsThisRole

The data displayed for the item in "What's This?" mode.

See Also:
Constant Field Values

FontRole

public static final int FontRole

The font used for items rendered with the default delegate.

See Also:
Constant Field Values

TextAlignmentRole

public static final int TextAlignmentRole

The alignment of the text for items rendered with the default delegate.

See Also:
Constant Field Values

BackgroundRole

public static final int BackgroundRole

The background brush used for items rendered with the default delegate.

See Also:
Constant Field Values

ForegroundRole

public static final int ForegroundRole

The foreground brush (text color, typically) used for items rendered with the default delegate.

See Also:
Constant Field Values

CheckStateRole

public static final int CheckStateRole

This role is used to obtain the checked state of an item (see Qt::CheckState).

See Also:
Constant Field Values

AccessibleTextRole

public static final int AccessibleTextRole

The text to be used by accessibility extensions and plugins, such as screen readers.

See Also:
Constant Field Values

AccessibleDescriptionRole

public static final int AccessibleDescriptionRole

A description of the item for accessibility purposes.

See Also:
Constant Field Values

SizeHintRole

public static final int SizeHintRole

The size hint for the item that will be supplied to views.

See Also:
Constant Field Values

UserRole

public static final int UserRole

The first role that can be used for application-specific purposes.

See Also:
Constant Field Values
Constructor Detail

Qt.ItemDataRole

public Qt.ItemDataRole()