The Range class is a spreadsheet range iterator. More...
#include <Range.h>
Public Member Functions | |
std::string | address () const |
Current cell as a string. More... | |
int | colCount () const |
Column count. More... | |
int | column () const |
Current column. More... | |
CellAddress | from () const |
Position of start of range. More... | |
std::string | fromCellString () const |
Start of range as a string. More... | |
bool | next () |
void | normalize () |
Make sure the range starts from top left and ends with bottom right corner. More... | |
CellAddress | operator* () const |
bool | operator< (const Range &other) const |
Range (const CellAddress &from, const CellAddress &to, bool normalize=false) | |
Range (const char *range, bool normalize=false) | |
Range (int _row_begin, int _col_begin, int _row_end, int _col_end, bool normalize=false) | |
std::string | rangeString () const |
The raneg as a string. More... | |
int | row () const |
Current row. More... | |
int | rowCount () const |
Row count. More... | |
int | size () const |
Number of elements in range. More... | |
CellAddress | to () const |
Position of end of range. More... | |
std::string | toCellString () const |
End of range as a string. More... | |
The Range class is a spreadsheet range iterator.
It takes a starting (row, col) and an ending (row, col). Notice that ranges are always at least one element. The next() functions is therefore used e.g as follows:
do { ... while (range.next());
Range::Range | ( | const char * | range, |
bool | normalize = false |
||
) |
References App::CellAddress::col(), from(), normalize(), App::CellAddress::row(), and to().
References normalize().
Range::Range | ( | const CellAddress & | from, |
const CellAddress & | to, | ||
bool | normalize = false |
||
) |
References normalize().
std::string App::Range::address | ( | ) | const |
Current cell as a string.
References App::CellAddress::toString().
Referenced by Spreadsheet::PropertySheet::setPathValue().
int App::Range::colCount | ( | ) | const |
Column count.
Referenced by Spreadsheet::PropertySheet::pasteCells(), and Spreadsheet::PropertySheet::setPathValue().
int App::Range::column | ( | ) | const |
Current column.
CellAddress App::Range::from | ( | ) | const |
Position of start of range.
Referenced by operator<(), Spreadsheet::PropertySheet::pasteCells(), Range(), and Spreadsheet::PropertySheet::setPathValue().
std::string App::Range::fromCellString | ( | ) | const |
Start of range as a string.
References App::CellAddress::toString().
bool Range::next | ( | ) |
Referenced by Spreadsheet::PropertySheet::setPathValue().
void Range::normalize | ( | ) |
Make sure the range starts from top left and ends with bottom right corner.
Referenced by PathScripts.PathDressupLeadInOut.ObjectDressup::getLeadEnd(), PathScripts.PathDressupLeadInOut.ObjectDressup::getLeadStart(), and Range().
CellAddress App::Range::operator* | ( | ) | const |
std::string App::Range::rangeString | ( | ) | const |
The raneg as a string.
References App::CellAddress::toString().
int App::Range::row | ( | ) | const |
Current row.
int App::Range::rowCount | ( | ) | const |
int App::Range::size | ( | ) | const |
Number of elements in range.
Referenced by SpreadsheetGui::DlgBindSheet::accept(), gzip_utf8.GzipFile::close(), PathScripts.PostUtils.GCodeEditorDialog::done(), Spreadsheet::PropertySheet::setPathValue(), and gzip_utf8.GzipFile::write().
CellAddress App::Range::to | ( | ) | const |
Position of end of range.
Referenced by operator<(), Range(), and Spreadsheet::PropertySheet::setPathValue().
std::string App::Range::toCellString | ( | ) | const |
End of range as a string.
References App::CellAddress::toString().