kspread

#include <region.h>

Inheritance diagram for KSpread::Region:
KSpread::Manipulator KSpread::ProtectedCheck KSpread::AdjustColumnRowManipulator KSpread::DilationManipulator KSpread::FormatManipulator KSpread::HideShowManipulator KSpread::InsertDeleteManipulator KSpread::MergeManipulator KSpread::ResizeColumnManipulator KSpread::ResizeRowManipulator

Classes

class  Element
class  Point
class  Range

Public Types

typedef TQValueList< Element * >::Iterator Iterator
typedef TQValueList< Element * >::ConstIterator ConstIterator

Public Member Functions

 Region ()
 Region (const TQPoint &point, Sheet *sheet=0)
 Region (const TQRect &range, Sheet *sheet=0)
 Region (View *view, const TQString &strRegion, Sheet *sheet=0)
 Region (const Region &region)
 Region (int col, int row, Sheet *sheet=0)
 Region (int col, int row, int width, int height, Sheet *sheet=0)
virtual ~Region ()
TQString name (Sheet *originSheet=0) const
Sheet * filterSheetName (TQString &sRegion)
bool isEmpty () const
bool isSingular () const
bool isContiguous () const
bool isValid () const
bool isColumnSelected (uint col=0) const
bool isRowSelected (uint row=0) const
bool isColumnOrRowSelected () const
bool isColumnAffected (uint col) const
bool isRowAffected (uint row) const
bool contains (const TQPoint &point, Sheet *sheet=0) const
Element * add (const TQPoint &point, Sheet *sheet=0)
Element * add (const TQRect &range, Sheet *sheet=0)
Element * add (const Region &region)
void sub (const TQPoint &point)
void sub (const TQRect &range)
void sub (const Region &region)
virtual Element * eor (const TQPoint &point, Sheet *sheet=0)
virtual void clear ()
TQRect boundingRect () const
bool operator== (const Region &region) const
void operator= (const Region &region)
View * view () const
void setView (View *)
ConstIterator constBegin () const
ConstIterator constEnd () const

Protected Member Functions

TQValueList< Element * > & cells () const
Iterator insert (Iterator iterator, const TQPoint &point, Sheet *, bool multi=true)
Iterator insert (Iterator iterator, const TQRect &range, Sheet *, bool multi=true)
virtual Point * createPoint (const TQPoint &) const
virtual Point * createPoint (const TQString &) const
virtual Point * createPoint (const Point &) const
virtual Range * createRange (const TQRect &) const
virtual Range * createRange (const TQString &) const
virtual Range * createRange (const Range &) const

Detailed Description

The one for all class for points and ranges.

Definition at line 43 of file region.h.

Member Typedef Documentation

◆ ConstIterator

typedef TQValueList<Element*>::ConstIterator KSpread::Region::ConstIterator

Definition at line 269 of file region.h.

◆ Iterator

typedef TQValueList<Element*>::Iterator KSpread::Region::Iterator

Definition at line 268 of file region.h.

Constructor & Destructor Documentation

◆ Region() [1/7]

KSpread::Region::Region ( )

Constructor.

Creates an empty region.

Definition at line 54 of file region.cpp.

◆ Region() [2/7]

KSpread::Region::Region ( const TQPoint & point,
Sheet * sheet = 0 )

Constructor.

Creates a region consisting of a point.

Parameters
pointthe point's location
sheetthe sheet the point belongs to

Definition at line 126 of file region.cpp.

◆ Region() [3/7]

KSpread::Region::Region ( const TQRect & range,
Sheet * sheet = 0 )

Constructor.

Creates a region consisting of a range.

Parameters
rangethe range's location
sheetthe sheet the range belongs to

Definition at line 114 of file region.cpp.

◆ Region() [4/7]

KSpread::Region::Region ( View * view,
const TQString & strRegion,
Sheet * sheet = 0 )

Constructor.

Creates a region consisting of the region defined in strRegion .

Parameters
viewused to determine the sheet, if it's named in the string
strRegiona string representing the region (e.g. "A1:B3")
sheetthe sheet the region belongs to

Definition at line 59 of file region.cpp.

◆ Region() [5/7]

KSpread::Region::Region ( const Region & region)

Copy Constructor.

Creates a copy of the region.

Parameters
regionthe region to copy

Definition at line 138 of file region.cpp.

◆ Region() [6/7]

KSpread::Region::Region ( int col,
int row,
Sheet * sheet = 0 )

Constructor.

Creates a region consisting of a point.

Parameters
colthe column of the point
rowthe row of the point
sheetthe sheet the point belongs to

Definition at line 160 of file region.cpp.

◆ Region() [7/7]

KSpread::Region::Region ( int col,
int row,
int width,
int height,
Sheet * sheet = 0 )

Constructor.

Creates a region consisting of a range at the location

Parameters
colthe column of the range' starting point
rowthe row of the range' starting point
widththe width of the range
heightthe height of the range
sheetthe sheet the range belongs to

Definition at line 172 of file region.cpp.

◆ ~Region()

KSpread::Region::~Region ( )
virtual

Destructor.

Definition at line 185 of file region.cpp.

Member Function Documentation

◆ add() [1/3]

Region::Element * KSpread::Region::add ( const Region & region)

Adds the region region to this region.

Parameters
regionthe range's location

Definition at line 270 of file region.cpp.

◆ add() [2/3]

Region::Element * KSpread::Region::add ( const TQPoint & point,
Sheet * sheet = 0 )

Adds the point point to this region.

Parameters
pointthe point's location
sheetthe sheet the point belongs to

Definition at line 245 of file region.cpp.

◆ add() [3/3]

Region::Element * KSpread::Region::add ( const TQRect & range,
Sheet * sheet = 0 )

Adds the range range to this region.

Parameters
rangethe range's location
sheetthe sheet the range belongs to

Definition at line 256 of file region.cpp.

◆ boundingRect()

TQRect KSpread::Region::boundingRect ( ) const

Definition at line 609 of file region.cpp.

◆ cells()

TQValueList< Region::Element * > & KSpread::Region::cells ( ) const
protected
Returns
the list of elements

Definition at line 649 of file region.cpp.

◆ clear()

void KSpread::Region::clear ( )
virtual

Deletes all elements of the region.

The result is an empty region.

Definition at line 600 of file region.cpp.

◆ constBegin()

Region::ConstIterator KSpread::Region::constBegin ( ) const

Definition at line 639 of file region.cpp.

◆ constEnd()

Region::ConstIterator KSpread::Region::constEnd ( ) const

Definition at line 644 of file region.cpp.

◆ contains()

bool KSpread::Region::contains ( const TQPoint & point,
Sheet * sheet = 0 ) const
Parameters
pointthe point's location
sheetthe sheet the point belongs to
Returns
true, if the region contains the point point

Definition at line 573 of file region.cpp.

◆ createPoint() [1/3]

Region::Point * KSpread::Region::createPoint ( const Point & point) const
protectedvirtual

Definition at line 720 of file region.cpp.

◆ createPoint() [2/3]

Region::Point * KSpread::Region::createPoint ( const TQPoint & point) const
protectedvirtual

Definition at line 710 of file region.cpp.

◆ createPoint() [3/3]

Region::Point * KSpread::Region::createPoint ( const TQString & string) const
protectedvirtual

Definition at line 715 of file region.cpp.

◆ createRange() [1/3]

Region::Range * KSpread::Region::createRange ( const Range & range) const
protectedvirtual

Definition at line 735 of file region.cpp.

◆ createRange() [2/3]

Region::Range * KSpread::Region::createRange ( const TQRect & rect) const
protectedvirtual

Definition at line 725 of file region.cpp.

◆ createRange() [3/3]

Region::Range * KSpread::Region::createRange ( const TQString & string) const
protectedvirtual

Definition at line 730 of file region.cpp.

◆ eor()

Region::Element * KSpread::Region::eor ( const TQPoint & point,
Sheet * sheet = 0 )
virtual
Parameters
pointthe point's location
sheetthe sheet the point belongs to

Definition at line 330 of file region.cpp.

◆ filterSheetName()

Sheet * KSpread::Region::filterSheetName ( TQString & sRegion)
Parameters
sRegionwill be modified, if a valid sheet was found. The sheetname will be removed
Returns
sheet named in the sRegion or the active sheet of the view

Definition at line 691 of file region.cpp.

◆ insert() [1/2]

Region::Iterator KSpread::Region::insert ( Region::Iterator pos,
const TQPoint & point,
Sheet * sheet,
bool multi = true )
protected
Parameters
iteratorthe iterator to the element in whose front the new point is inserted
pointthe location of the point to be inserted
multitrue to allow multiple occurences of a point
Returns
an iterator to the added point or iterator, if point is not valid or the point is already in the list

Definition at line 396 of file region.cpp.

◆ insert() [2/2]

Region::Iterator KSpread::Region::insert ( Region::Iterator pos,
const TQRect & range,
Sheet * sheet,
bool multi = true )
protected
Parameters
iteratorthe iterator to the element in whose front the new range is inserted
rangethe location of the range to be inserted
multitrue to allow multiple occurences of a range
Returns
an iterator to the added range or iterator, if range is not valid or the range is already in the list

Definition at line 449 of file region.cpp.

◆ isColumnAffected()

bool KSpread::Region::isColumnAffected ( uint col) const
Parameters
colthe col to check
Returns
true, if the at least one cell in column col is selected

Definition at line 495 of file region.cpp.

◆ isColumnOrRowSelected()

bool KSpread::Region::isColumnOrRowSelected ( ) const
Returns
true,if at least one column or one row is selected

Definition at line 557 of file region.cpp.

◆ isColumnSelected()

bool KSpread::Region::isColumnSelected ( uint col = 0) const
Parameters
colthe col to check
Returns
true, if the colum col is selected. If column col is not given, it returns true, if at least one column is selected

Definition at line 525 of file region.cpp.

◆ isContiguous()

bool KSpread::Region::isContiguous ( ) const
Returns
true, if this region is contiguous

Definition at line 224 of file region.cpp.

◆ isEmpty()

bool KSpread::Region::isEmpty ( ) const
Returns
true, if this region contains no elements

Definition at line 595 of file region.cpp.

◆ isRowAffected()

bool KSpread::Region::isRowAffected ( uint row) const
Parameters
rowthe row to check
Returns
true, if the at least one cell in row row is selected

Definition at line 510 of file region.cpp.

◆ isRowSelected()

bool KSpread::Region::isRowSelected ( uint row = 0) const
Parameters
rowthe row to check
Returns
true, if the row row is selected. If row row is not given, it returns true, if at least one row is selected

Definition at line 541 of file region.cpp.

◆ isSingular()

bool KSpread::Region::isSingular ( ) const
Returns
true, if this region contains only a single point

Definition at line 215 of file region.cpp.

◆ isValid()

bool KSpread::Region::isValid ( ) const
Returns
true, if this region contains at least one valid point or one valid range

Definition at line 202 of file region.cpp.

◆ name()

TQString KSpread::Region::name ( Sheet * originSheet = 0) const
Parameters
originSheetThe name is created relative to this sheet.
Returns
the name of the region (e.g. "A1:A2")

Definition at line 233 of file region.cpp.

◆ operator=()

void KSpread::Region::operator= ( const Region & region)
Parameters
regionthe region to copy

Definition at line 670 of file region.cpp.

◆ operator==()

bool KSpread::Region::operator== ( const Region & region) const
Parameters
regionthe region to compare
Returns
true, if this region equals region region

Definition at line 654 of file region.cpp.

◆ setView()

void KSpread::Region::setView ( View * view)

Sets the view to which this region belongs.

Definition at line 197 of file region.cpp.

◆ sub() [1/3]

void KSpread::Region::sub ( const Region & region)

Substracts the region region from this region.

Parameters
regionthe region to substract

Definition at line 312 of file region.cpp.

◆ sub() [2/3]

void KSpread::Region::sub ( const TQPoint & point)

Substracts the point point from this region.

Parameters
pointthe point's location

Definition at line 280 of file region.cpp.

◆ sub() [3/3]

void KSpread::Region::sub ( const TQRect & range)

Substracts the range range from this region.

Parameters
rangethe range's location

Definition at line 296 of file region.cpp.

◆ view()

View * KSpread::Region::view ( ) const
Returns
the view to which this region belongs.

Definition at line 191 of file region.cpp.


The documentation for this class was generated from the following files: