summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/tqtableselection.3qt
blob: 1e8b63e9ad74ee1f6e13e71ea13cf600dd10f6b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
'\" 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 <ntqtable.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 TQt documentation is provided in HTML format; it is
located at $QTDIR/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).