TQTableSelection(3qt)

NAME
TQTableSelection - Access to a selected area in a TQTable

SYNOPSIS
#include <tqtable.h>

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

DESCRIPTION
The TQTableSelection class provides access to a selected area in a TQTable.

The selection is a rectangular set of cells in a TQTable. 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 TQTableSelection is inactive -- isActive() returns false. You must use init() and expandTo() to activate it.

See also TQTable, TQTable::addSelection(), TQTable::selection(), TQTable::selectCells(), TQTable::selectRow(), TQTable::selectColumn(), and Advanced Widgets.

MEMBER FUNCTION DOCUMENTATION

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

TQTableSelection::TQTableSelection ( int start_row, int start_col, int end_row, int end_col )
Creates an active selection, starting at start_row and start_col, ending at end_row and end_col.

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

See also anchorRow() and expandTo().

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

See also anchorCol() and expandTo().

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

See also topRow(), leftCol(), and rightCol().

void TQTableSelection::expandTo ( int row, int col )
Expands the selection to include cell row, col. The new selection rectangle is the bounding rectangle of row, col and the previous selection rectangle. After calling this function the selection is active.

If you haven't called init(), this function does nothing.

See also init() and isActive().

void TQTableSelection::init ( int row, int col )
Sets the selection anchor to cell row, col and the selection to only contain this cell. The selection is not active until expandTo() is called.

To extend the selection to include additional cells, call expandTo().

See also isActive().

bool TQTableSelection::isActive () const
Returns whether the selection is active or not. A selection is active after init() and expandTo() have been called.

bool TQTableSelection::isEmpty () const
Returns whether the selection is empty or not.

See also numRows() and numCols().

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

See also topRow(), bottomRow(), and rightCol().

int TQTableSelection::numCols () const
Returns the number of columns in the selection.

See also numRows().

int TQTableSelection::numRows () const
Returns the number of rows in the selection.

See also numCols().

bool TQTableSelection::operator!= ( const TQTableSelection & s ) const
Returns true if s does not include the same cells as the selection; otherwise returns false.

bool TQTableSelection::operator== ( const TQTableSelection & s ) const
Returns true if s includes the same cells as the selection; otherwise returns false.

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

See also topRow(), bottomRow(), and leftCol().

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

See also bottomRow(), leftCol(), and rightCol().

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

COPYRIGHT
Copyright 1992-2007 Trolltech ASA, 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 help us to help you. Thank you.

The definitive TQt documentation is provided in HTML format; it is located at $TQTDIR/doc/html and can be read using TQt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech.

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (tqtableselection.3qt) and the Qt version (3.3.8).