ZeTable Class Reference

ZeTable colors rows in alternating colors

There are four different colors to set:
oddRowColor: odd row colors get this background color
evenRowColor: even row colors get this background color
hoverColor: when the mouse pointer is hovering over the table rows are highlighted with that color
highlightColor: selecting a cell paints the background with this color

See also ZeDataTable. More...

List of all members.

Public Member Functions

 ZeTable (QWidget *parent=0, const char *name=0)
QColor getOddRowColor () const
void setOddRowColor (QColor)
QColor getEvenRowColor () const
void setEvenRowColor (QColor)
QColor getHoverColor () const
void setHoverColor (QColor)
QColor getHighlightColor () const
void setHighlightColor (QColor)

Properties

QColor oddRowColor []
QColor evenRowColor []
QColor hoverColor []
QColor highlightColor []

Private Member Functions

void paintCell (QPainter *p, int row, int col, const QRect &cr, bool selected, const QColorGroup &cg)
void paintFocus (QPainter *p, const QRect &cr)
void contentsMouseMoveEvent (QMouseEvent *e)

Private Attributes

QColorGroup * cg1
QColorGroup * cg2
QColorGroup * cgOver
int isOverRow
QRect * redrawRect


Detailed Description

ZeTable colors rows in alternating colors

There are four different colors to set:
oddRowColor: odd row colors get this background color
evenRowColor: even row colors get this background color
hoverColor: when the mouse pointer is hovering over the table rows are highlighted with that color
highlightColor: selecting a cell paints the background with this color

See also ZeDataTable.


Constructor & Destructor Documentation

ZeTable::ZeTable ( QWidget *  parent = 0,
const char *  name = 0 
)

standard QTable c'tor sets QColor values to reasonable defaults


Member Function Documentation

QColor ZeTable::getOddRowColor (  )  const

Get the oddRowColor.
Escpecially needed to export for use as a plugin.

void ZeTable::setOddRowColor ( QColor  c1  ) 

Set the oddRowColor.
Escpecially needed to export for use as a plugin.

QColor ZeTable::getEvenRowColor (  )  const

Get the evenRowColor.
Escpecially needed to export for use as a plugin.

void ZeTable::setEvenRowColor ( QColor  c2  ) 

Set the evenRowColor.
Escpecially needed to export for use as a plugin.

QColor ZeTable::getHoverColor (  )  const

Get the hoverColor.
Escpecially needed to export for use as a plugin.

void ZeTable::setHoverColor ( QColor  cO  ) 

Set the hoverColor.
Escpecially needed to export for use as a plugin.

QColor ZeTable::getHighlightColor (  )  const

Get the highlightColor.
Escpecially needed to export for use as a plugin.

void ZeTable::setHighlightColor ( QColor  cH  ) 

Set the highlightColor.
Escpecially needed to export for use as a plugin.

void ZeTable::paintCell ( QPainter *  p,
int  row,
int  col,
const QRect &  cr,
bool  selected,
const QColorGroup &  cg 
) [private]

void ZeTable::paintFocus ( QPainter *  p,
const QRect &  cr 
) [private]

void ZeTable::contentsMouseMoveEvent ( QMouseEvent *  e  )  [private]

handles highlighting of active row improved thanks to Volker Hilsheimer from Trolltech


Member Data Documentation

QColorGroup* ZeTable::cg1 [private]

QColorGroup * ZeTable::cg2 [private]

QColorGroup * ZeTable::cgOver [private]

int ZeTable::isOverRow [private]

QRect* ZeTable::redrawRect [private]


Property Documentation

QColor ZeTable::oddRowColor [read, write]

QColor ZeTable::evenRowColor [read, write]

QColor ZeTable::hoverColor [read, write]

QColor ZeTable::highlightColor [read, write]


Generated on Wed Nov 8 20:07:48 2006 for ZeTools by  doxygen 1.5.1