QTableSelection(3qt)
π QTableSelection β the 3qt girlie's guide to selecting a whole vibe (cells) in a QTable π
okay bestie, sit down, grab your strawberry milk π, because we're talking about QTableSelection, a little class from the Qt 3 era that gives you access to a selected area in a QTable. it's giving "rectangular glow-up" and honestly? iconic.
β¨ NAME β¨
QTableSelection β access to a selected area in a QTable. that's it. that's the whole job. she selects, she serves. π
πΈ SYNOPSIS πΈ
first things first, you gotta include her:
#include <qtable.h>
π Public Members π
here's the full roster, no skips, no cuts:
QTableSelection ()
QTableSelection ( 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 QTableSelection & s ) const
bool operator!= ( const QTableSelection & 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
look at her. fifteen public members and not a single one out of place. main character energy fr fr. π
π DESCRIPTION π
so, QTableSelection is the class that gives you access to a selected area in a QTable.
the selection is a rectangular set of cells in a QTable. and here's the cute part β one of the rectangle's cells is called the anchor cell, which is the cell that was selected first. she's the origin story, the blueprint, the one who started it all. π«Ά
init()sets the anchor and the selection rectangle to exactly this cell β just the one, no extras.expandTo()expands the selection rectangle to include additional cells.
there are various access functions to find out about the area, and yes bestie we're listing all of them:
anchorRow()andanchorCol()return the anchor's position.leftCol(),rightCol(),topRow()andbottomRow()return the rectangle's four edges.
heads up: all four are part of the selection. every edge counts, no cell left behind. π
now for the part that lowkey trips people up: a newly created QTableSelection is inactive β isActive() returns FALSE. so she's not doing anything yet, she's just sitting there. you must use init() and expandTo() to activate her. no shortcut, no cheat code. π
See also: QTable, QTable::addSelection(), QTable::selection(), QTable::selectCells(), QTable::selectRow(), QTable::selectColumn(), and Advanced Widgets.
π MEMBER FUNCTION DOCUMENTATION π
π¦ QTableSelection::QTableSelection ()
creates an inactive selection. that's it, that's the whole vibe β she exists but she's not activated yet. use init() and expandTo() to activate her. periodt. π
π¦ QTableSelection::QTableSelection ( 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.
see, this one comes out the gate already activated. no warm-up needed. she's ready. π₯
π¦ int QTableSelection::anchorCol () const
returns the anchor column of the selection.
See also: anchorRow() and expandTo().
π¦ int QTableSelection::anchorRow () const
returns the anchor row of the selection.
See also: anchorCol() and expandTo().
π¦ int QTableSelection::bottomRow () const
returns the bottom row of the selection.
See also: topRow(), leftCol(), and rightCol().
π¦ void QTableSelection::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.
careful bestie: if you haven't called init(), this function does nothing. literally nothing. zero. zilch. the void. π
See also: init() and isActive().
π¦ void QTableSelection::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 QTableSelection::isActive () const
returns whether the selection is active or not. a selection is active after init() and expandTo() have been called.
both of them. not one. both. iykyk. π§
π¦ bool QTableSelection::isEmpty () const
returns whether the selection is empty or not.
See also: numRows() and numCols().
π¦ int QTableSelection::leftCol () const
returns the left column of the selection.
See also: topRow(), bottomRow(), and rightCol().
π¦ int QTableSelection::numCols () const
returns the number of columns in the selection.
See also: numRows().
π¦ int QTableSelection::numRows () const
returns the number of rows in the selection.
See also: numCols().
π¦ bool QTableSelection::operator!= ( const QTableSelection & s ) const
returns TRUE if s does not include the same cells as the selection; otherwise returns FALSE.
π¦ bool QTableSelection::operator== ( const QTableSelection & s ) const
returns TRUE if s includes the same cells as the selection; otherwise returns FALSE.
they're twins, your honor. matching energy. β¨
π¦ int QTableSelection::rightCol () const
returns the right column of the selection.
See also: topRow(), bottomRow(), and leftCol().
π¦ int QTableSelection::topRow () const
returns the top row of the selection.
See also: bottomRow(), leftCol(), and rightCol().
π SEE ALSO π
π 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. (yes, a robot wrote her. she's still that girl. π )
π 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 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.
if you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qtableselection.3qt) and the Qt version (3.3.8).
and that's the whole page bestie!! this one came from Trolltech AS, dated 2 February 2007, and the man page itself is QTableSelection(3qt). go forth and select your rectangle, anchor your cell, and remember β init() first, expandTo() second, or nothing happens at all. mwah. π«Άπβ¨
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms