Reference documentation
Public Member Functions | List of all members
ItemStyle Class Reference

Thistle::ItemStyle class is used by Thistle::ItemDelegate to set the look and feel of item. More...

Public Member Functions

 ItemStyle ()
 Constructs a style used to custom the items.
 
QBrush brush () const
 Returns the QBrush used to draw the item's backgournd.
 
bool displayText () const
 Returns true if the item's text is displayed. More...
 
QFont font () const
 Returns the QFont used to draw the text.
 
QPen pen () const
 Returns the QPen used to draw the item's borders.
 
void setBrush (const QBrush &brush)
 Defines the QBrush used to draw the item's background.
 
void setDisplayText (bool displayText=true)
 If displayText is equal to true, the item displays the text. More...
 
void setFont (const QFont &font)
 Defines the font used to draw the item's text.
 
void setPen (const QPen &pen)
 Defines the QPen used to draw the item's border.
 
void setShape (Thistle::Shape shape)
 Defines the item's shape.
 
void setTextColor (const QColor &color)
 Defines the text color to color.
 
Thistle::Shape shape () const
 Returns the Thistle::Shape.
 
QColor textColor () const
 Returns the QColor used to draw the text.
 

Detailed Description

Thistle::ItemStyle class is used by Thistle::ItemDelegate to set the look and feel of item.

An item style consists of :

Member Function Documentation

bool displayText ( ) const

Returns true if the item's text is displayed.

Otherwise returns false.

void setDisplayText ( bool  displayText = true)

If displayText is equal to true, the item displays the text.

Otherwise, the text is hidden. It is useful for small items.