#include <RioMMQListViewItem.h>
Public Member Functions | |
RioMMQListViewItem (QListView *parent, RioMMQListViewItem *after, QColor color, bool bold=false) | |
RioMMQListViewItem (RioMMQListViewItem *parent, RioMMQListViewItem *after, QColor color, bool bold=false) | |
bool | getBold () |
QColor | getColor () |
void | setBold (bool bold) |
void | setColor (QColor color) |
virtual void | paintCell (QPainter *p, const QColorGroup &cg, int column, int width, int alignment) |
Private Attributes | |
bool | boldfont |
QColor | fontcolor |
Definition at line 27 of file RioMMQListViewItem.h.
RioMMQListViewItem::RioMMQListViewItem | ( | QListView * | parent, | |
RioMMQListViewItem * | after, | |||
QColor | color, | |||
bool | bold = false | |||
) |
Definition at line 21 of file RioMMQListViewItem.cpp.
RioMMQListViewItem::RioMMQListViewItem | ( | RioMMQListViewItem * | parent, | |
RioMMQListViewItem * | after, | |||
QColor | color, | |||
bool | bold = false | |||
) |
Definition at line 31 of file RioMMQListViewItem.cpp.
bool RioMMQListViewItem::getBold | ( | ) |
Definition at line 40 of file RioMMQListViewItem.cpp.
00041 { 00042 return boldfont; 00043 }
QColor RioMMQListViewItem::getColor | ( | ) |
Definition at line 45 of file RioMMQListViewItem.cpp.
00046 { 00047 return fontcolor; 00048 }
void RioMMQListViewItem::paintCell | ( | QPainter * | p, | |
const QColorGroup & | cg, | |||
int | column, | |||
int | width, | |||
int | alignment | |||
) | [virtual] |
Definition at line 60 of file RioMMQListViewItem.cpp.
00062 { 00063 // Gera duas copias da fonte atual do objeto (newfont e oldfont). 00064 QFont newfont( p->font() ); 00065 QFont oldfont( p->font() ); 00066 // Gera uma copia do objeto com o grupo de cores. 00067 QColorGroup colorgroup( cg ); 00068 // Altera o estilo em negrito da fonte newfont. 00069 newfont.setBold( boldfont ); 00070 // Altera a fonte do dispositivo de pintura para a fonte newfont. 00071 p->setFont( newfont ); 00072 // Altera a cor da fonte, no grupo de cores do objeto, para a cor 00073 // fontcolor. 00074 colorgroup.setColor( QColorGroup::Text, fontcolor ); 00075 // Chama o procedimento de pintura da classe pai QListViewItem. 00076 QListViewItem::paintCell( p, colorgroup, column, width, alignment ); 00077 // Restaura a fonte original do dispositivo de pintura (isso e necessario 00078 // para desenhar corretamente os outros itens da QListView da qual este 00079 // objeto pertence). 00080 p->setFont( oldfont ); 00081 }
void RioMMQListViewItem::setBold | ( | bool | bold | ) |
Definition at line 50 of file RioMMQListViewItem.cpp.
00051 { 00052 boldfont = bold; 00053 }
void RioMMQListViewItem::setColor | ( | QColor | color | ) |
Definition at line 55 of file RioMMQListViewItem.cpp.
00056 { 00057 fontcolor = color; 00058 }
bool RioMMQListViewItem::boldfont [private] |
Definition at line 30 of file RioMMQListViewItem.h.
QColor RioMMQListViewItem::fontcolor [private] |
Definition at line 33 of file RioMMQListViewItem.h.