'\" t .TH TQTableSelection 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. .\" .ad l .nh .SH NAME TQTableSelection \- Access to a selected area in a TQTable .SH SYNOPSIS \fC#include \fR .PP .SS "Public Members" .in +1c .ti -1c .BI "\fBTQTableSelection\fR ()" .br .ti -1c .BI "\fBTQTableSelection\fR ( int start_row, int start_col, int end_row, int end_col )" .br .ti -1c .BI "void \fBinit\fR ( int row, int col )" .br .ti -1c .BI "void \fBexpandTo\fR ( int row, int col )" .br .ti -1c .BI "bool \fBoperator==\fR ( const TQTableSelection & s ) const" .br .ti -1c .BI "bool \fBoperator!=\fR ( const TQTableSelection & s ) const" .br .ti -1c .BI "int \fBtopRow\fR () const" .br .ti -1c .BI "int \fBbottomRow\fR () const" .br .ti -1c .BI "int \fBleftCol\fR () const" .br .ti -1c .BI "int \fBrightCol\fR () const" .br .ti -1c .BI "int \fBanchorRow\fR () const" .br .ti -1c .BI "int \fBanchorCol\fR () const" .br .ti -1c .BI "int \fBnumRows\fR () const" .br .ti -1c .BI "int \fBnumCols\fR () const" .br .ti -1c .BI "bool \fBisActive\fR () const" .br .ti -1c .BI "bool \fBisEmpty\fR () const" .br .in -1c .SH DESCRIPTION The TQTableSelection class provides access to a selected area in a TQTable. .PP 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. .PP 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. .PP A newly created TQTableSelection is inactive -- isActive() returns FALSE. You must use init() and expandTo() to activate it. .PP See also TQTable, TQTable::addSelection(), TQTable::selection(), TQTable::selectCells(), TQTable::selectRow(), TQTable::selectColumn(), and Advanced Widgets. .SH MEMBER FUNCTION DOCUMENTATION .SH "TQTableSelection::TQTableSelection ()" Creates an inactive selection. Use init() and expandTo() to activate it. .SH "TQTableSelection::TQTableSelection ( int start_row, int start_col, int end_row, int end_col )" Creates an active selection, starting at \fIstart_row\fR and \fIstart_col\fR, ending at \fIend_row\fR and \fIend_col\fR. .SH "int TQTableSelection::anchorCol () const" Returns the anchor column of the selection. .PP See also anchorRow() and expandTo(). .SH "int TQTableSelection::anchorRow () const" Returns the anchor row of the selection. .PP See also anchorCol() and expandTo(). .SH "int TQTableSelection::bottomRow () const" Returns the bottom row of the selection. .PP See also topRow(), leftCol(), and rightCol(). .SH "void TQTableSelection::expandTo ( int row, int col )" Expands the selection to include cell \fIrow\fR, \fIcol\fR. The new selection rectangle is the bounding rectangle of \fIrow\fR, \fIcol\fR and the previous selection rectangle. After calling this function the selection is active. .PP If you haven't called init(), this function does nothing. .PP See also init() and isActive(). .SH "void TQTableSelection::init ( int row, int col )" Sets the selection anchor to cell \fIrow\fR, \fIcol\fR and the selection to only contain this cell. The selection is not active until expandTo() is called. .PP To extend the selection to include additional cells, call expandTo(). .PP See also isActive(). .SH "bool TQTableSelection::isActive () const" Returns whether the selection is active or not. A selection is active after init() \fIand\fR expandTo() have been called. .SH "bool TQTableSelection::isEmpty () const" Returns whether the selection is empty or not. .PP See also numRows() and numCols(). .SH "int TQTableSelection::leftCol () const" Returns the left column of the selection. .PP See also topRow(), bottomRow(), and rightCol(). .SH "int TQTableSelection::numCols () const" Returns the number of columns in the selection. .PP See also numRows(). .SH "int TQTableSelection::numRows () const" Returns the number of rows in the selection. .PP See also numCols(). .SH "bool TQTableSelection::operator!= ( const TQTableSelection & s ) const" Returns TRUE if \fIs\fR does not include the same cells as the selection; otherwise returns FALSE. .SH "bool TQTableSelection::operator== ( const TQTableSelection & s ) const" Returns TRUE if \fIs\fR includes the same cells as the selection; otherwise returns FALSE. .SH "int TQTableSelection::rightCol () const" Returns the right column of the selection. .PP See also topRow(), bottomRow(), and leftCol(). .SH "int TQTableSelection::topRow () const" Returns the top row of the selection. .PP See also bottomRow(), leftCol(), and rightCol(). .SH "SEE ALSO" .BR http://doc.trolltech.com/tqtableselection.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. .SH AUTHOR Generated automatically from the source code. .SH BUGS If you find a bug in Qt, please report it as described in .BR http://doc.trolltech.com/bughowto.html . Good bug reports help us to help you. Thank you. .P 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. .P If you find errors in this manual page, please report them to .BR qt-bugs@trolltech.com . Please include the name of the manual page (tqtableselection.3qt) and the Qt version (3.3.8).