Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

Q3TableSelection Class

TheQ3TableSelection class provides access to a selected area in aQ3Table.More...

Header:#include <Q3TableSelection>

Public Functions

Q3TableSelection()
Q3TableSelection(int start_row, int start_col, int end_row, int end_col)
intanchorCol() const
intanchorRow() const
intbottomRow() const
voidexpandTo(int row, int col)
voidinit(int row, int col)
boolisActive() const
boolisEmpty() const
intleftCol() const
intnumCols() const
intnumRows() const
intrightCol() const
inttopRow() const
booloperator!=(const Q3TableSelection & s) const
booloperator==(const Q3TableSelection & s) const

Detailed Description

TheQ3TableSelection class provides access to a selected area in aQ3Table.

The selection is a rectangular set of cells in aQ3Table. One of the rectangle's cells is called the anchor cell; this is the cell that was selected first. Theinit() function sets the anchor and the selection rectangle to exactly this cell; theexpandTo() function expands the selection rectangle to include additional cells.

There are various access functions to find out about the area:anchorRow() andanchorCol() return the anchor's position;leftCol(),rightCol(),topRow() andbottomRow() return the rectangle's four edges. All four are part of the selection.

A newly createdQ3TableSelection is inactive --isActive() returns false. You must useinit() andexpandTo() to activate it.

Q3Table::selectCells()Q3Table::selectRow()Q3Table::selectColumn()

See alsoQ3Table,Q3Table::addSelection(), andQ3Table::selection().

Member Function Documentation

Q3TableSelection::Q3TableSelection()

Creates an inactive selection. Useinit() andexpandTo() to activate it.

Q3TableSelection::Q3TableSelection(int start_row,int start_col,int end_row,int end_col)

Creates an active selection, starting atstart_row andstart_col, ending atend_row andend_col.

int Q3TableSelection::anchorCol() const

Returns the anchor column of the selection.

See alsoanchorRow() andexpandTo().

int Q3TableSelection::anchorRow() const

Returns the anchor row of the selection.

See alsoanchorCol() andexpandTo().

int Q3TableSelection::bottomRow() const

Returns the bottom row of the selection.

See alsotopRow(),leftCol(), andrightCol().

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

Expands the selection to include cellrow,col. The new selection rectangle is the bounding rectangle ofrow,col and the previous selection rectangle. After calling this function the selection is active.

If you haven't calledinit(), this function does nothing.

See alsoinit() andisActive().

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

Sets the selection anchor to cellrow,col and the selection to only contain this cell. The selection is not active untilexpandTo() is called.

To extend the selection to include additional cells, callexpandTo().

See alsoisActive().

bool Q3TableSelection::isActive() const

Returns whether the selection is active or not. A selection is active afterinit()andexpandTo() have been called.

bool Q3TableSelection::isEmpty() const

Returns whether the selection is empty or not.

See alsonumRows() andnumCols().

int Q3TableSelection::leftCol() const

Returns the left column of the selection.

See alsotopRow(),bottomRow(), andrightCol().

int Q3TableSelection::numCols() const

Returns the number of columns in the selection.

See alsonumRows().

int Q3TableSelection::numRows() const

Returns the number of rows in the selection.

See alsonumCols().

int Q3TableSelection::rightCol() const

Returns the right column of the selection.

See alsotopRow(),bottomRow(), andleftCol().

int Q3TableSelection::topRow() const

Returns the top row of the selection.

See alsobottomRow(),leftCol(), andrightCol().

bool Q3TableSelection::operator!=(constQ3TableSelection & s) const

Returns true ifs does not include the same cells as the selection; otherwise returns false.

bool Q3TableSelection::operator==(constQ3TableSelection & s) const

Returns true ifs includes the same cells as the selection; otherwise returns false.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp