Logo Search packages:      
Sourcecode: qt4-x11 version File versions

Q3TableSelection Class Reference

List of all members.


Detailed Description

The Q3TableSelection class provides access to a selected area in a Q3Table.

The selection is a rectangular set of cells in a Q3Table. One of the rectangle's cells is called the anchor cell; this is the cell that was selected first. The init() function sets the anchor and the selection rectangle to exactly this cell; the expandTo() function expands the selection rectangle to include additional cells.

There are various access functions to find out about the area: anchorRow() and anchorCol() return the anchor's position; leftCol(), rightCol(), topRow() and bottomRow() return the rectangle's four edges. All four are part of the selection.

A newly created Q3TableSelection is inactive -- isActive() returns false. You must use init() and expandTo() to activate it.

See also:
Q3Table Q3Table::addSelection() Q3Table::selection() Q3Table::selectCells() Q3Table::selectRow() Q3Table::selectColumn()

Definition at line 55 of file q3table.h.


Public Member Functions

int anchorCol () const
int anchorRow () const
int bottomRow () const
void expandTo (int row, int col)
void init (int row, int col)
bool isActive () const
bool isEmpty () const
int leftCol () const
int numCols () const
int numRows () const
bool operator!= (const Q3TableSelection &s) const
bool operator== (const Q3TableSelection &s) const
 Q3TableSelection (int start_row, int start_col, int end_row, int end_col)
 Q3TableSelection ()
int rightCol () const
int topRow () const

Private Attributes

int aCol
uint active: 1
int aRow
int bRow
uint inited: 1
int lCol
int rCol
int tRow

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index