#include <kspread_util.h>
Public Member Functions | |
| Range (const TQString &) | |
| Range (const TQString &, Map *, Sheet *default_sheet=0) | |
| Range (const Range &r) | |
| Range (const Point &ul, const Point &lr) | |
| bool | isValid () const |
| bool | isSheetKnown () const |
| void | getStartPoint (Point *pt) |
| void | getEndPoint (Point *pt) |
| int | startRow () const |
| int | startCol () const |
| int | endRow () const |
| int | endCol () const |
| virtual void | setRange (const TQRect &newRange) |
| void | setRange (int newStartCol, int newStartRow, int newEndCol, int newEndRow) |
| TQRect | range () const |
| bool | contains (const Point &cell) const |
| bool | intersects (const Range &r) const |
| TQString | toString () const |
| void | setLeftFixed (bool fixed) |
| bool | leftFixed () const |
| void | setRightFixed (bool fixed) |
| bool | rightFixed () const |
| void | setTopFixed (bool fixed) |
| bool | topFixed () const |
| void | setBottomFixed (bool fixed) |
| bool | bottomFixed () const |
| void | setSheet (Sheet *sheet) |
| Sheet * | sheet () const |
| void | setSheetName (TQString sheetName) |
| TQString | sheetName () const |
| TQString | namedArea () const |
| bool | operator== (const Range &range) const |
Detailed Description
Represents a region within a workbook.
The region has an area (the columns and rows that it includes) and optionally an associated KSpread::Sheet A range is defined by four coordinates: Its left column, top row, right column and bottom row. Each of these coordinates may be set as fixed, to represent absolute coordinates in formulae.
Definition at line 130 of file kspread_util.h.
Constructor & Destructor Documentation
◆ Range() [1/5]
| Range::Range | ( | ) |
Definition at line 452 of file kspread_util.cpp.
◆ Range() [2/5]
| Range::Range | ( | const TQString & | _str | ) |
Definition at line 462 of file kspread_util.cpp.
◆ Range() [3/5]
| Range::Range | ( | const TQString & | str, |
| Map * | map, | ||
| Sheet * | default_sheet = 0 |
||
| ) |
Definition at line 523 of file kspread_util.cpp.
◆ Range() [4/5]
| Range::Range | ( | const Range & | r | ) |
Definition at line 494 of file kspread_util.cpp.
◆ Range() [5/5]
Definition at line 507 of file kspread_util.cpp.
Member Function Documentation
◆ bottomFixed()
| bool Range::bottomFixed | ( | ) | const |
Definition at line 711 of file kspread_util.cpp.
◆ contains()
| bool Range::contains | ( | const Point & | cell | ) | const |
Returns true if this range includes the specified cell.
Definition at line 660 of file kspread_util.cpp.
◆ endCol()
|
inline |
Definition at line 161 of file kspread_util.h.
◆ endRow()
|
inline |
Definition at line 160 of file kspread_util.h.
◆ getEndPoint()
| void Range::getEndPoint | ( | Point * | pt | ) |
Fills a Point with info (row,column,sheet) about the last point the range.
Definition at line 648 of file kspread_util.cpp.
◆ getStartPoint()
| void Range::getStartPoint | ( | Point * | pt | ) |
Fills a Point with info (row,column,sheet) about the first point in the range.
Definition at line 636 of file kspread_util.cpp.
◆ intersects()
| bool Range::intersects | ( | const Range & | r | ) | const |
Returns true if this range intersects Range r (ie.
there is at least one cell which is common to both Ranges )
Definition at line 665 of file kspread_util.cpp.
◆ isSheetKnown()
|
inline |
Returns true if this range has an associated Sheet or false otherwise.
Definition at line 151 of file kspread_util.h.
◆ isValid()
| bool Range::isValid | ( | ) | const |
Returns true if this Range represents a valid region of a spreadsheet.
A range is valid if:
- It has an associated Sheet
- The area is non-negative (ie.
- The left-most column is non-negative
- The top-most row is non-negative
Definition at line 670 of file kspread_util.cpp.
◆ leftFixed()
| bool Range::leftFixed | ( | ) | const |
Definition at line 687 of file kspread_util.cpp.
◆ namedArea()
| TQString Range::namedArea | ( | ) | const |
Returns the named area represented by this range or an empty string otherwise.
This is the name of the area which was passed as a TQString to the Range constructor
Definition at line 731 of file kspread_util.cpp.
◆ operator==()
| bool Range::operator== | ( | const Range & | range | ) | const |
Returns true if the other range occupies the same area on the same sheet as this range.
Definition at line 439 of file kspread_util.cpp.
◆ range()
| TQRect Range::range | ( | ) | const |
Returns the area on the spreadsheet occupied by this range.
Definition at line 678 of file kspread_util.cpp.
◆ rightFixed()
| bool Range::rightFixed | ( | ) | const |
Definition at line 695 of file kspread_util.cpp.
◆ setBottomFixed()
| void Range::setBottomFixed | ( | bool | fixed | ) |
Sets whether or not the bottom row is fixed.
Definition at line 707 of file kspread_util.cpp.
◆ setLeftFixed()
| void Range::setLeftFixed | ( | bool | fixed | ) |
Sets whether or not the left column is fixed .
Definition at line 683 of file kspread_util.cpp.
◆ setRange() [1/2]
|
inlinevirtual |
Changes the area on the spreadsheet represented by this range.
- Parameters
-
newRange The new area for this range.
Definition at line 167 of file kspread_util.h.
◆ setRange() [2/2]
|
inline |
Definition at line 169 of file kspread_util.h.
◆ setRightFixed()
| void Range::setRightFixed | ( | bool | fixed | ) |
Sets whether or not the right column is fixed.
Definition at line 691 of file kspread_util.cpp.
◆ setSheet()
| void Range::setSheet | ( | Sheet * | sheet | ) |
Sets the Sheet object associated with this range.
The range can only span a single sheet.
Definition at line 715 of file kspread_util.cpp.
◆ setSheetName()
| void Range::setSheetName | ( | TQString | sheetName | ) |
Sets the name of the sheet associated with this range.
Definition at line 723 of file kspread_util.cpp.
◆ setTopFixed()
| void Range::setTopFixed | ( | bool | fixed | ) |
Sets whether or not the top row is fixed.
Definition at line 699 of file kspread_util.cpp.
◆ sheet()
| KSpread::Sheet * Range::sheet | ( | ) | const |
Definition at line 719 of file kspread_util.cpp.
◆ sheetName()
| TQString Range::sheetName | ( | ) | const |
Definition at line 727 of file kspread_util.cpp.
◆ startCol()
|
inline |
Definition at line 159 of file kspread_util.h.
◆ startRow()
|
inline |
Definition at line 158 of file kspread_util.h.
◆ topFixed()
| bool Range::topFixed | ( | ) | const |
Definition at line 703 of file kspread_util.cpp.
◆ toString()
| TQString Range::toString | ( | ) | const |
Returns a string representation of this range as it would appear in a formula.
ie. In the format " SheetName! [StartCell] : [EndCell] " The string representation uses $ characters to mark fixed parts of the range, eg. Sheet1!$A1:$A20
Definition at line 591 of file kspread_util.cpp.
The documentation for this class was generated from the following files:
