1QTableSelection(3qt)                                      QTableSelection(3qt)
2
3
4

NAME

6       QTableSelection - Access to a selected area in a QTable
7

SYNOPSIS

9       #include <qtable.h>
10
11   Public Members
12       QTableSelection ()
13       QTableSelection ( int start_row, int start_col, int end_row, int
14           end_col )
15       void init ( int row, int col )
16       void expandTo ( int row, int col )
17       bool operator== ( const QTableSelection & s ) const
18       bool operator!= ( const QTableSelection & s ) const
19       int topRow () const
20       int bottomRow () const
21       int leftCol () const
22       int rightCol () const
23       int anchorRow () const
24       int anchorCol () const
25       int numRows () const
26       int numCols () const
27       bool isActive () const
28       bool isEmpty () const
29

DESCRIPTION

31       The QTableSelection class provides access to a selected area in a
32       QTable.
33
34       The selection is a rectangular set of cells in a QTable. One of the
35       rectangle's cells is called the anchor cell; this is the cell that was
36       selected first. The init() function sets the anchor and the selection
37       rectangle to exactly this cell; the expandTo() function expands the
38       selection rectangle to include additional cells.
39
40       There are various access functions to find out about the area:
41       anchorRow() and anchorCol() return the anchor's position; leftCol(),
42       rightCol(), topRow() and bottomRow() return the rectangle's four edges.
43       All four are part of the selection.
44
45       A newly created QTableSelection is inactive -- isActive() returns
46       FALSE. You must use init() and expandTo() to activate it.
47
48       See also QTable, QTable::addSelection(), QTable::selection(),
49       QTable::selectCells(), QTable::selectRow(), QTable::selectColumn(), and
50       Advanced Widgets.
51

MEMBER FUNCTION DOCUMENTATION

QTableSelection::QTableSelection ()

54       Creates an inactive selection. Use init() and expandTo() to activate
55       it.
56

QTableSelection::QTableSelection ( int start_row, int start_col, int end_row,

58       int end_col )
59       Creates an active selection, starting at start_row and start_col,
60       ending at end_row and end_col.
61

int QTableSelection::anchorCol () const

63       Returns the anchor column of the selection.
64
65       See also anchorRow() and expandTo().
66

int QTableSelection::anchorRow () const

68       Returns the anchor row of the selection.
69
70       See also anchorCol() and expandTo().
71

int QTableSelection::bottomRow () const

73       Returns the bottom row of the selection.
74
75       See also topRow(), leftCol(), and rightCol().
76

void QTableSelection::expandTo ( int row, int col )

78       Expands the selection to include cell row, col. The new selection
79       rectangle is the bounding rectangle of row, col and the previous
80       selection rectangle. After calling this function the selection is
81       active.
82
83       If you haven't called init(), this function does nothing.
84
85       See also init() and isActive().
86

void QTableSelection::init ( int row, int col )

88       Sets the selection anchor to cell row, col and the selection to only
89       contain this cell. The selection is not active until expandTo() is
90       called.
91
92       To extend the selection to include additional cells, call expandTo().
93
94       See also isActive().
95

bool QTableSelection::isActive () const

97       Returns whether the selection is active or not. A selection is active
98       after init() and expandTo() have been called.
99

bool QTableSelection::isEmpty () const

101       Returns whether the selection is empty or not.
102
103       See also numRows() and numCols().
104

int QTableSelection::leftCol () const

106       Returns the left column of the selection.
107
108       See also topRow(), bottomRow(), and rightCol().
109

int QTableSelection::numCols () const

111       Returns the number of columns in the selection.
112
113       See also numRows().
114

int QTableSelection::numRows () const

116       Returns the number of rows in the selection.
117
118       See also numCols().
119

bool QTableSelection::operator!= ( const QTableSelection & s ) const

121       Returns TRUE if s does not include the same cells as the selection;
122       otherwise returns FALSE.
123

bool QTableSelection::operator== ( const QTableSelection & s ) const

125       Returns TRUE if s includes the same cells as the selection; otherwise
126       returns FALSE.
127

int QTableSelection::rightCol () const

129       Returns the right column of the selection.
130
131       See also topRow(), bottomRow(), and leftCol().
132

int QTableSelection::topRow () const

134       Returns the top row of the selection.
135
136       See also bottomRow(), leftCol(), and rightCol().
137
138

SEE ALSO

140       http://doc.trolltech.com/qtableselection.html
141       http://www.trolltech.com/faq/tech.html
142
144       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
145       license file included in the distribution for a complete license
146       statement.
147

AUTHOR

149       Generated automatically from the source code.
150

BUGS

152       If you find a bug in Qt, please report it as described in
153       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
154       help you. Thank you.
155
156       The definitive Qt documentation is provided in HTML format; it is
157       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
158       web browser. This man page is provided as a convenience for those users
159       who prefer man pages, although this format is not officially supported
160       by Trolltech.
161
162       If you find errors in this manual page, please report them to qt-
163       bugs@trolltech.com.  Please include the name of the manual page
164       (qtableselection.3qt) and the Qt version (3.3.8).
165
166
167
168Trolltech AS                    2 February 2007           QTableSelection(3qt)
Impressum