#include <QicsRegion.h>
Inherits QRect.
Public Member Functions | |
| QicsRegion (int begin_row, int begin_col, int end_row, int end_col) | |
| QicsRegion (const QicsICell &begin_cell, const QicsICell &end_cell) | |
| QicsRegion (int row, int col) | |
| QicsRegion (const QicsICell &cell) | |
| QicsRegion (void) | |
| QicsICell | startCell (void) const |
| QicsICell | endCell (void) const |
| int | startRow (void) const |
| int | endRow (void) const |
| int | startColumn (void) const |
| int | endColumn (void) const |
| int | numColumns (void) const |
| int | numRows (void) const |
| void | setStartCell (const QicsICell &cell) |
| void | setEndCell (const QicsICell &cell) |
| void | setStartRow (int val) |
| void | setEndRow (int val) |
| void | setStartColumn (int val) |
| void | setEndColumn (int val) |
| bool | containsCell (const QicsICell &cell) const |
| bool | containsCell (int row, int col) const |
| QicsRegion | intersect (const QicsRegion ®) const |
| bool | isValid (void) const |
| void | normalize () |
A QicsRegion specifies a rectangular region of a QicsTable. A QicsRegion instance is defined by a beginning (row, column) pair and an ending (row, column) pair. As it is subclassed from QRect, a QicsRegion object has all the functionality of its superclass, including union, intersection, and contains methods. QicsRegions are always in view rather than model coordinates.
| QicsRegion::QicsRegion | ( | int | begin_row, | |
| int | begin_col, | |||
| int | end_row, | |||
| int | end_col | |||
| ) | [inline] |
Constructs a new region object. The region extends from row begin_row, column begin_col to row end_row, column end_col.
Constructs a new region object. The region extends from row begin_row, column begin_col to row end_row, column end_col.
| QicsRegion::QicsRegion | ( | int | row, | |
| int | col | |||
| ) | [inline] |
Constructs a new region object covering row and col.
| QicsRegion::QicsRegion | ( | const QicsICell & | cell | ) | [inline] |
Constructs a new region object covering cell.
| QicsRegion::QicsRegion | ( | void | ) | [inline] |
Constructs an empty, invalid region.
| QicsICell QicsRegion::startCell | ( | void | ) | const [inline] |
Returns the starting (i.e. top-left) cell of the region.
| QicsICell QicsRegion::endCell | ( | void | ) | const [inline] |
Returns the ending (i.e. bottom-right) cell of the region.
| int QicsRegion::startRow | ( | void | ) | const [inline] |
Returns the starting row of the region.
| int QicsRegion::endRow | ( | void | ) | const [inline] |
Returns the ending row of the region.
| int QicsRegion::startColumn | ( | void | ) | const [inline] |
Returns the starting column of the region.
| int QicsRegion::endColumn | ( | void | ) | const [inline] |
Returns the ending column of the region.
| int QicsRegion::numColumns | ( | void | ) | const [inline] |
Returns the number of columns in the region.
| int QicsRegion::numRows | ( | void | ) | const [inline] |
Returns the number of rows in the region.
| void QicsRegion::setStartCell | ( | const QicsICell & | cell | ) | [inline] |
Sets the starting (i.e. top-left) cell of the region.
| void QicsRegion::setEndCell | ( | const QicsICell & | cell | ) | [inline] |
Sets the ending (i.e. bottom-right) cell of the region.
| void QicsRegion::setStartRow | ( | int | val | ) | [inline] |
Sets the starting row of the region.
| void QicsRegion::setEndRow | ( | int | val | ) | [inline] |
Sets the ending row of the region.
| void QicsRegion::setStartColumn | ( | int | val | ) | [inline] |
Sets the starting column of the region.
| void QicsRegion::setEndColumn | ( | int | val | ) | [inline] |
Sets the ending column of the region.
| bool QicsRegion::containsCell | ( | const QicsICell & | cell | ) | const [inline] |
Returns true if the cell is in the region.
| bool QicsRegion::containsCell | ( | int | row, | |
| int | col | |||
| ) | const [inline] |
Returns true if the cell (row, col) is in the region.
| QicsRegion QicsRegion::intersect | ( | const QicsRegion & | reg | ) | const [inline] |
Returns intersect region
| bool QicsRegion::isValid | ( | void | ) | const [inline] |
Returns true if the region is valid
| void QicsRegion::normalize | ( | ) | [inline] |
Normalizes region (i.e. region will have a non-negative width and height). If width() < 0 the function swaps the left and right corners, and it swaps the top and bottom corners if height() < 0.