ZeDataTable Class Reference

ZeDataTable 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 ZeTable. More...

List of all members.

Public Member Functions

 ZeDataTable (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

ZeDataTable 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 ZeTable.


Constructor & Destructor Documentation

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

standard QTable c'tor sets QColor values to reasonable defaults


Member Function Documentation

QColor ZeDataTable::getOddRowColor (  )  const

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

void ZeDataTable::setOddRowColor ( QColor  c1  ) 

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

QColor ZeDataTable::getEvenRowColor (  )  const

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

void ZeDataTable::setEvenRowColor ( QColor  c2  ) 

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

QColor ZeDataTable::getHoverColor (  )  const

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

void ZeDataTable::setHoverColor ( QColor  cO  ) 

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

QColor ZeDataTable::getHighlightColor (  )  const

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

void ZeDataTable::setHighlightColor ( QColor  cH  ) 

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

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

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

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

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


Member Data Documentation

QColorGroup* ZeDataTable::cg1 [private]

QColorGroup * ZeDataTable::cg2 [private]

QColorGroup * ZeDataTable::cgOver [private]

int ZeDataTable::isOverRow [private]

QRect* ZeDataTable::redrawRect [private]


Property Documentation

QColor ZeDataTable::oddRowColor [read, write]

QColor ZeDataTable::evenRowColor [read, write]

QColor ZeDataTable::hoverColor [read, write]

QColor ZeDataTable::highlightColor [read, write]


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