Wt  4.11.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
Wt::ItemDataRole Class Referencefinal

Enumeration that indicates a role for a data item. More...

#include <WModelIndex.h>

Public Member Functions

constexpr ItemDataRole (int role) noexcept
 Create a new role with a certain int value.
 
constexpr int value () const noexcept
 Returns the underlying int of this role.
 

Static Public Attributes

static constexpr const int Display = 0
 Role for textual representation.
 
static constexpr const int Decoration = 1
 Role for the url of an icon.
 
static constexpr const int Edit = 2
 Role for the edited value.
 
static constexpr const int StyleClass = 3
 Role for the style class.
 
static constexpr const int Checked = 4
 
static constexpr const int ToolTip = 5
 Role for a (plain) tooltip.
 
static constexpr const int Link = 6
 Role for a link.
 
static constexpr const int MimeType = 7
 Role for mime type information.
 
static constexpr const int Level = 8
 Level in aggregation, for header data.
 
static constexpr const int MarkerPenColor = 16
 Marker pen color (for Chart::WCartesianChart)
 
static constexpr const int MarkerBrushColor = 17
 Marker brush color (for Chart::WCartesianChart)
 
static constexpr const int MarkerScaleFactor = 20
 Marker size (for Chart::WCartesianChart)
 
static constexpr const int MarkerType = 21
 Marker type (for Chart::WCartesianChart)
 
static constexpr const int BarPenColor = 18
 Bar pen color (for Chart::WCartesianChart)
 
static constexpr const int BarBrushColor = 19
 Bar brush color (for Chart::WCartesianChart)
 
static constexpr const int User = 32
 First role reserved for user purposes.
 

Detailed Description

Enumeration that indicates a role for a data item.

A single data item can have data associated with it corresponding to different roles. Each role may be used by the corresponding view class in a different way.

See also
WModelIndex::data()

Member Data Documentation

◆ Checked

const int Wt::ItemDataRole::Checked = 4
staticconstexpr

Role that indicates the check state.

Data for this role should be a bool. When the Wt::ItemFlag::Tristate flag is set for the item, data for this role should be of type Wt::CheckState.