SuperTable Class Reference
Inherits and extends QTable to offer more features.
More...
#include <supertable.h>
List of all members.
|
Public Slots |
| virtual void | setNumRows (int rows) |
| virtual void | removeRow (int row) |
| virtual void | removeRows (const QMemArray< int > &rows) |
Public Member Functions |
| | SuperTable (QWidget *parent=NULL, const char *name=NULL) |
| | SuperTable (int numRows, int numCols, QWidget *parent=NULL, const char *name=NULL) |
| void | keyPressEvent (QKeyEvent *event) |
| void | setRowBackground (uint row, bool filled, QColor c=Qt::white) |
| void | setRowDisabledLook (uint row, bool disabledLook) |
| virtual void | paintCell (QPainter *p, int row, int col, const QRect &cr, bool selected, const QColorGroup &cg) |
Private Attributes |
| QMap< int, QColor > | rowBkgrndColourMap |
| QMap< int, bool > | rowDisabledLookMap |
Detailed Description
Inherits and extends QTable to offer more features.
Extensions to QTable includes such things as the ability to set the background colour of (individual) table rows and also the ability to set whether or not (individual) rows should LOOK disabled. (Note the emphasis above on LOOK, as the row won't actually be disabled, you will still be able to click on it to select it!)
This class also disables the Enter and Return keys from moving the current row selection to the next one. Hence, when the user presses either of these keys, any focused input widgets that exist in the row will be simply confirmed and validated, that is all. This makes it work the way you would expect it to.
Constructor & Destructor Documentation
| SuperTable::SuperTable |
( |
QWidget * |
parent = NULL, |
|
|
const char * |
name = NULL |
|
) |
|
|
|
|
Constructor. This simply wrapps QTable's constructor that has the same prototype. |
| SuperTable::SuperTable |
( |
int |
numRows, |
|
|
int |
numCols, |
|
|
QWidget * |
parent = NULL, |
|
|
const char * |
name = NULL |
|
) |
|
|
|
|
Constructor. This simply wrapps QTable's constructor that has the same prototype. |
Member Function Documentation
| void SuperTable::keyPressEvent |
( |
QKeyEvent * |
event |
) |
|
|
|
|
Disable the Enter and Return keys, as to prevent moving the current row selection to the next one when either of them are pressed.
Note: We still call for focus to be transfered to the table. |
| void SuperTable::paintCell |
( |
QPainter * |
p, |
|
|
int |
row, |
|
|
int |
col, |
|
|
const QRect & |
cr, |
|
|
bool |
selected, |
|
|
const QColorGroup & |
cg |
|
) |
[virtual] |
|
|
|
(Re)Paint the table's cells with the correct background colours. |
| void SuperTable::removeRow |
( |
int |
row |
) |
[virtual, slot] |
|
|
|
Destroy alternative row background colour, as it (the row) is to be removed. |
| void SuperTable::removeRows |
( |
const QMemArray< int > & |
rows |
) |
[virtual, slot] |
|
|
|
Same as the above, but can remove multiple rows at once. |
| void SuperTable::setNumRows |
( |
int |
rows |
) |
[virtual, slot] |
|
|
|
If a coloured row has been removed, then destroy alternative row background colour. |
| void SuperTable::setRowBackground |
( |
uint |
row, |
|
|
bool |
filled, |
|
|
QColor |
c = Qt::white |
|
) |
|
|
|
|
Change the background colour for a given row.
If value row is out of bournds, then this method returns without doing anything. |
| void SuperTable::setRowDisabledLook |
( |
uint |
row, |
|
|
bool |
disabledLook |
|
) |
|
|
|
|
This method allows you to set whether or not (individual) rows should LOOK disabled. (Note the emphasis on LOOK, as the row won't actually be disabled and hence you will still be able to click on it to select it!) |
Member Data Documentation
The documentation for this class was generated from the following files:
Generated on Fri Feb 27 12:01:41 2004 for Glitch by
1.3.2