QTableSelection(3qt)

NAME
QTableSelection - The QTableSelection provides access to the selected area in a

#include <qtable.h>

  Public Members
QTableSelection ()
void init ( int row, int col )
void expandTo ( int row, int col )
bool operator== ( const QTableSelection & s ) const
int topRow () const
int bottomRow () const
int leftCol () const
int rightCol () const
int anchorRow () const
int anchorCol () const
bool isActive () const

DESCRIPTION
The QTableSelection provides access to the selected area in a QTable.

The selection is a rectangular set of cells. One of the rectangle's cells is called the anchor cell; that cell is the first selected. The init() function sets the anchor and sets the selection rectangle to just that cell; the expandTo() function expands the selection rectangle.

There are various access functions to get the area: anchorRow() and anchorCol() return the achor's position, and leftCol(), rightCol(), topRow() and bottomRow() return the rectangle's four edges. All four are in the selection.

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

See also QTable, QTable::addSelection() and QTable::selection().

MEMBER FUNCTION DOCUMENTATION

QTableSelection::QTableSelection ()
Creates an inactive selection. Use init() and expandTo() to activate it.

int QTableSelection::anchorCol () const
Returns the anchor column of the selection.

int QTableSelection::anchorRow () const
Returns the anchor row of the selection.

int QTableSelection::bottomRow () const
Returns the bottom row of the selection.

void QTableSelection::expandTo ( int row, int col )
Expands the selection to row, col. The new selection rectangle is the bounding rectangle of row, col and the old selection rectangle. After calling that function, the selections is active.

If you didn't call init() yet, this function does nothing.

See also init() and isActive().

void QTableSelection::init ( int row, int col )
Sets the selection anchor to row row and column col and sets the selection to just that cell.

See also expandTo() and isActive().

bool QTableSelection::isActive () const
Returns whether the selection is active or not. A selection is active after init() and expandTo() has beem called.

int QTableSelection::leftCol () const
Returns the left column of the selection.

bool QTableSelection::operator== ( const QTableSelection & s ) const
Returns TRUE if s includes the same cells as this selection, or else FALSE.

int QTableSelection::rightCol () const
Returns the right column of the selection.

int QTableSelection::topRow () const
Returns the top row of the selection.

SEE ALSO
http://doc.trolltech.com/qtableselection.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports make our job much simpler. Thank you.

In case of content or formattting problems with this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qtableselection.3qt) and the Qt version (2.3.1).