Wt  4.0.0
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 int Display = 0
 Role for textual representation.
 
static constexpr int Decoration = 1
 Role for the url of an icon.
 
static constexpr int Edit = 2
 Role for the edited value.
 
static constexpr int StyleClass = 3
 Role for the style class.
 
static constexpr int Checked = 4
 
static constexpr int ToolTip = 5
 Role for a (plain) tooltip.
 
static constexpr int Link = 6
 Role for a link.
 
static constexpr int MimeType = 7
 Role for mime type information.
 
static constexpr int Level = 8
 Level in aggregation, for header data.
 
static constexpr int MarkerPenColor = 16
 Marker pen color (for Chart::WCartesianChart)
 
static constexpr int MarkerBrushColor = 17
 Marker brush color (for Chart::WCartesianChart)
 
static constexpr int MarkerScaleFactor = 20
 Marker size (for Chart::WCartesianChart)
 
static constexpr int BarPenColor = 18
 Bar pen color (for Chart::WCartesianChart)
 
static constexpr int BarBrushColor = 19
 Bar brush color (for Chart::WCartesianChart)
 
static constexpr 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

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

Role that indicates the check state.

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


Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11