You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/doc/man/man3/qtableselection.3qt

159 lines
5.8 KiB

'\" t
.TH QTableSelection 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
QTableSelection \- Access to a selected area in a QTable
.SH SYNOPSIS
\fC#include <qtable.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQTableSelection\fR ()"
.br
.ti -1c
.BI "\fBQTableSelection\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 QTableSelection & s ) const"
.br
.ti -1c
.BI "bool \fBoperator!=\fR ( const QTableSelection & 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 QTableSelection class provides access to a selected area in a QTable.
.PP
The selection is a rectangular set of cells in a QTable. 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 QTableSelection is inactive -- isActive() returns FALSE. You must use init() and expandTo() to activate it.
.PP
See also QTable, QTable::addSelection(), QTable::selection(), QTable::selectCells(), QTable::selectRow(), QTable::selectColumn(), and Advanced Widgets.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QTableSelection::QTableSelection ()"
Creates an inactive selection. Use init() and expandTo() to activate it.
.SH "QTableSelection::QTableSelection ( 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 QTableSelection::anchorCol () const"
Returns the anchor column of the selection.
.PP
See also anchorRow() and expandTo().
.SH "int QTableSelection::anchorRow () const"
Returns the anchor row of the selection.
.PP
See also anchorCol() and expandTo().
.SH "int QTableSelection::bottomRow () const"
Returns the bottom row of the selection.
.PP
See also topRow(), leftCol(), and rightCol().
.SH "void QTableSelection::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 QTableSelection::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 QTableSelection::isActive () const"
Returns whether the selection is active or not. A selection is active after init() \fIand\fR expandTo() have been called.
.SH "bool QTableSelection::isEmpty () const"
Returns whether the selection is empty or not.
.PP
See also numRows() and numCols().
.SH "int QTableSelection::leftCol () const"
Returns the left column of the selection.
.PP
See also topRow(), bottomRow(), and rightCol().
.SH "int QTableSelection::numCols () const"
Returns the number of columns in the selection.
.PP
See also numRows().
.SH "int QTableSelection::numRows () const"
Returns the number of rows in the selection.
.PP
See also numCols().
.SH "bool QTableSelection::operator!= ( const QTableSelection & s ) const"
Returns TRUE if \fIs\fR does not include the same cells as the selection; otherwise returns FALSE.
.SH "bool QTableSelection::operator== ( const QTableSelection & s ) const"
Returns TRUE if \fIs\fR includes the same cells as the selection; otherwise returns FALSE.
.SH "int QTableSelection::rightCol () const"
Returns the right column of the selection.
.PP
See also topRow(), bottomRow(), and leftCol().
.SH "int QTableSelection::topRow () const"
Returns the top row of the selection.
.PP
See also bottomRow(), leftCol(), and rightCol().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qtableselection.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 Qt documentation is provided in HTML format; it is
located at $QTDIR/doc/html and can be read using Qt 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 (qtableselection.3qt) and the Qt
version (3.3.8).