kspread

KSpread::Sheet Class Reference

A sheet contains several cells. More...

#include <Sheet.h>

Inheritance diagram for KSpread::Sheet:

List of all members.

Public Types

enum  ChangeRef { ColumnInsert, ColumnRemove, RowInsert, RowRemove }
enum  TestType { Text, Validity, Comment, ConditionalCellAttribute }

Signals

void documentSizeChanged (const QSizeF &)
void sig_nameChanged (Sheet *sheet, const QString &old_name)
void sig_RefreshView (Sheet *)
void sig_refreshView ()
void sig_SheetActivated (Sheet *)
void sig_SheetHidden (Sheet *sheet)
void sig_SheetRemoved (Sheet *sheet)
void sig_SheetShown (Sheet *sheet)
void sig_updateColumnHeader (Sheet *_sheet)
void sig_updateRowHeader (Sheet *_sheet)
void sig_updateView (Sheet *_sheet, const Region &)
void sig_updateView (Sheet *_sheet)
void visibleSizeChanged ()

Public Member Functions

 Sheet (const Sheet &other)
 Sheet (Map *map, const QString &sheetName)
 ~Sheet ()
virtual void addShape (KoShape *shape)
void adjustDocumentHeight (double deltaHeight)
void adjustDocumentWidth (double deltaWidth)
bool areaIsEmpty (const Region &area, TestType _type=Text)
int bottomRow (double _ypos) const
QRectF cellCoordinatesToDocument (const QRect &cellRange) const
CellStoragecellStorage () const
void changeNameCellRef (const QPoint &pos, bool fullRowOrColumn, ChangeRef ref, const QString &sheetName, int number)
bool checkPassword (QByteArray const &passwd) const
const ColumnFormatcolumnFormat (int _column) const
double columnPosition (int col) const
const CommentStoragecommentStorage () const
const ConditionsStorageconditionsStorage () const
QString copyAsText (Selection *selection)
void copySelection (Selection *selection)
void cutSelection (Selection *selection)
virtual QMap< QString,
KoDataCenter * > 
dataCenterMap () const
void deleteCells (const Region &region)
void deleteColumnFormat (int column)
void deleteRowFormat (int row)
Docdoc () const
QSizeF documentSize () const
QRect documentToCellCoordinates (const QRectF &area) const
void emit_updateColumn (ColumnFormat *columnFormat, int _column)
void emit_updateRow (RowFormat *rowFormat, int _row, bool repaint=true)
void emitHideColumn ()
void emitHideRow ()
ColumnFormatfirstCol () const
RowFormatfirstRow () const
const FormulaStorageformulaStorage () const
const FusionStoragefusionStorage () const
bool getFirstLetterUpper () const
bool getHideZero () const
bool getLcMode () const
bool getShowColumnNumber () const
bool getShowCommentIndicator () const
bool getShowFormula () const
bool getShowFormulaIndicator () const
bool getShowGrid () const
QString guessColumnTitle (QRect &area, int col)
QString guessRowTitle (QRect &area, int row)
void hideSheet (bool _hide)
void insertColumnFormat (ColumnFormat *columnFormat)
void insertColumns (int row, int numbers)
void insertRowFormat (RowFormat *rowFormat)
void insertRows (int row, int numbers)
void insertShiftDown (const QRect &rect)
void insertShiftRight (const QRect &rect)
bool isAutoCalculationEnabled () const
bool isHidden () const
bool isLoading ()
bool isProtected () const
bool isShowPageBorders () const
Qt::LayoutDirection layoutDirection () const
int leftColumn (double _xpos, double &_left) const
const LinkStoragelinkStorage () const
bool loadChildren (KoStore *_store)
bool loadOdf (const KoXmlElement &sheet, OdfLoadingContext &odfContext, const Styles &autoStyles, const QHash< QString, Conditions > &conditionalStyles)
void loadOdfSettings (const KoOasisSettings::NamedMap &settings)
bool loadSelection (const KoXmlDocument &doc, const QRect &pasteArea, int _xshift, int _yshift, bool makeUndo, Paste::Mode=Paste::Normal, Paste::Operation=Paste::OverWrite, bool insert=false, int insertTo=0, bool paste=false)
void loadSelectionUndo (const KoXmlDocument &doc, const QRect &loadArea, int _xshift, int _yshift, bool insert, int insertTo)
bool loadXML (const KoXmlElement &)
Mapmap () const
ColumnFormatnonDefaultColumnFormat (int _column, bool force_creation=true)
RowFormatnonDefaultRowFormat (int _row, bool force_creation=true)
void password (QByteArray &passwd) const
void paste (const QByteArray &data, const QRect &pasteArea, bool makeUndo=false, Paste::Mode=Paste::Normal, Paste::Operation=Paste::OverWrite, bool insert=false, int insertTo=0, bool pasteFC=false)
void paste (const QRect &pasteArea, bool makeUndo=true, Paste::Mode=Paste::Normal, Paste::Operation=Paste::OverWrite, bool insert=false, int insertTo=0, bool pasteFC=false, QClipboard::Mode clipboardMode=QClipboard::Clipboard)
void pasteTextPlain (const QString &_text, const QRect &pasteArea)
SheetPrintprint () const
void printDebug ()
PrintSettingsprintSettings () const
void removeColumns (int row, int numbers)
void removeRows (int row, int numbers)
virtual void removeShape (KoShape *shape)
void removeShiftLeft (const QRect &rect)
void removeShiftUp (const QRect &rect)
int rightColumn (double _xpos) const
const RowFormatrowFormat (int _row) const
double rowPosition (int _row) const
QDomDocument saveCellRegion (const Region &, bool era=false)
bool saveChildren (KoStore *_store, const QString &_path)
bool saveOdf (OdfSavingContext &tableContext)
void saveOdfHeaderFooter (KoXmlWriter &xmlWriter) const
void saveOdfPrintStyleLayout (KoGenStyle &style) const
void saveOdfSettings (KoXmlWriter &settingsWriter) const
QDomElement saveXML (QDomDocument &)
void setAutoCalculationEnabled (bool enable)
void setDefaultHeight (double height)
void setDefaultWidth (double width)
void setFirstLetterUpper (bool _firstUpper)
void setHidden (bool hidden)
void setHideZero (bool _hideZero)
void setLayoutDirection (Qt::LayoutDirection dir)
void setLcMode (bool _lcMode)
void setPrintSettings (const PrintSettings &settings)
void setProtected (QByteArray const &passwd)
void setRegionPaintDirty (const QRect &rect)
void setRegionPaintDirty (const Region &region)
bool setSheetName (const QString &name, bool init=false)
void setShowColumnNumber (bool _showColumnNumber)
void setShowCommentIndicator (bool b)
void setShowFormula (bool _showFormula)
void setShowFormulaIndicator (bool _showFormulaIndicator)
void setShowGrid (bool _showGrid)
void setShowPageBorders (bool _b)
QList< KoShape * > shapes () const
QString sheetName () const
StyleStoragestyleStorage () const
bool testAreaPasteInsert () const
bool testListChoose (Selection *selection)
int topRow (double _ypos, double &_top) const
void updateLocale ()
void updateView (const Region &region)
void updateView ()
QRect usedArea () const
const ValidityStoragevalidityStorage () const
const ValueStoragevalueStorage () const

Protected Member Functions

void addText (const QString &text, KoXmlWriter &writer) const
bool cellIsEmpty (const Cell &cell, TestType _type)
void changeCellTabName (QString const &old_name, QString const &new_name)
QString changeNameCellRefHelper (const QPoint &pos, bool fullRowOrColumn, ChangeRef ref, int NbCol, const QPoint &point, bool isColumnFixed, bool isRowFixed)
bool compareRows (int row1, int row2, int &maxCols, OdfSavingContext &tableContext) const
void convertPart (const QString &part, KoXmlWriter &writer) const
QString getPart (const KoXmlNode &part)
bool loadColumnFormat (const KoXmlElement &row, const KoOdfStylesReader &stylesReader, int &indexCol, QHash< QString, QRegion > &columnStyleRegions)
void loadOdfInsertStyles (const Styles &autoStyles, const QHash< QString, QRegion > &styleRegions, const QHash< QString, Conditions > &conditionalStyles, const QRect &usedArea)
void loadOdfMasterLayoutPage (KoStyleStack &styleStack)
bool loadRowFormat (const KoXmlElement &row, int &rowIndex, OdfLoadingContext &odfContext, QHash< QString, QRegion > &rowStyleRegions, QHash< QString, QRegion > &cellStyleRegions)
bool loadSheetStyleFormat (KoXmlElement *style)
void replaceMacro (QString &text, const QString &old, const QString &newS)
void saveOdfCells (KoXmlWriter &xmlWriter, KoGenStyles &mainStyles, int row, int maxCols, OdfSavingContext &tableContext)
void saveOdfColRowCell (KoXmlWriter &xmlWriter, KoGenStyles &mainStyles, int maxCols, int maxRows, OdfSavingContext &tableContext)
QString saveOdfSheetStyleName (KoGenStyles &mainStyles)

Static Protected Member Functions

static Sheetfind (int _id)

Static Protected Attributes

static int s_id = 0
static QHash< int, Sheet * > * s_mapSheets

Properties

bool autoCalc
QString sheetName
bool showGrid

Detailed Description

A sheet contains several cells.

Definition at line 89 of file Sheet.h.


Member Enumeration Documentation

Enumerator:
ColumnInsert 
ColumnRemove 
RowInsert 
RowRemove 

Definition at line 97 of file Sheet.h.

Enumerator:
Text 
Validity 
Comment 
ConditionalCellAttribute 

Definition at line 98 of file Sheet.h.


Constructor & Destructor Documentation

KSpread::Sheet::Sheet ( Map map,
const QString sheetName 
)

Creates a sheet in map with the name sheetName.

Definition at line 174 of file Sheet.cpp.

KSpread::Sheet::Sheet ( const Sheet other  ) 

Copy constructor.

Creates a sheet with the contents and the settings of other.

Definition at line 230 of file Sheet.cpp.

KSpread::Sheet::~Sheet (  ) 

Destructor.

Definition at line 292 of file Sheet.cpp.


Member Function Documentation

void KSpread::Sheet::addShape ( KoShape shape  )  [virtual]

Definition at line 331 of file Sheet.cpp.

void KSpread::Sheet::adjustDocumentHeight ( double  deltaHeight  ) 

Adjusts the internal reference of the sum of the heights of all rows.

Used in resizing of rows.

Definition at line 612 of file Sheet.cpp.

void KSpread::Sheet::adjustDocumentWidth ( double  deltaWidth  ) 

Adjusts the internal reference of the sum of the widths of all columns.

Used in resizing of columns.

Definition at line 606 of file Sheet.cpp.

bool KSpread::Sheet::areaIsEmpty ( const Region area,
TestType  _type = Text 
)

Definition at line 1185 of file Sheet.cpp.

int KSpread::Sheet::bottomRow ( double  _ypos  )  const

Determines the row for a given position _ypos .

If the position is on the border between two cells, the lower row is returned.

Parameters:
_ypos the position for which the row should be determined
Returns:
the row for the given position _ypos

Definition at line 653 of file Sheet.cpp.

QRectF KSpread::Sheet::cellCoordinatesToDocument ( const QRect cellRange  )  const

Calculates the region in document coordinates occupied by a range of cells.

Parameters:
cellRange the range of cells
Returns:
the document area covered by the cells

Definition at line 662 of file Sheet.cpp.

bool KSpread::Sheet::cellIsEmpty ( const Cell cell,
TestType  _type 
) [protected]

Definition at line 1157 of file Sheet.cpp.

CellStorage * KSpread::Sheet::cellStorage (  )  const
Returns:
the cell storage

Definition at line 521 of file Sheet.cpp.

void KSpread::Sheet::changeCellTabName ( QString const &  old_name,
QString const &  new_name 
) [protected]

Change the name of a sheet in all formulas.

When you change name sheet Sheet1 -> Price for all cell which refere to Sheet1, this function changes the name.

Definition at line 754 of file Sheet.cpp.

void KSpread::Sheet::changeNameCellRef ( const QPoint pos,
bool  fullRowOrColumn,
ChangeRef  ref,
const QString sheetName,
int  number 
)

Change name of reference when the user inserts or removes a column, a row or a cell (= insertion of a row [or column] on a single column [or row]).

For example the formula =Sheet1!A1 is changed into =Sheet1!B1 if a Column is inserted before A.

Parameters:
pos the point of insertion (only one coordinate may be used, depending on the other parameters).
fullRowOrColumn if true, a whole row or column has been inserted/removed. if false, we inserted or removed a cell
ref see ChangeRef
sheetName completes the pos specification by giving the sheet name
number number of columns which were inserted

Definition at line 999 of file Sheet.cpp.

QString KSpread::Sheet::changeNameCellRefHelper ( const QPoint pos,
bool  fullRowOrColumn,
ChangeRef  ref,
int  NbCol,
const QPoint point,
bool  isColumnFixed,
bool  isRowFixed 
) [protected]

Definition at line 934 of file Sheet.cpp.

bool KSpread::Sheet::checkPassword ( QByteArray const &  passwd  )  const

Definition at line 581 of file Sheet.cpp.

const ColumnFormat * KSpread::Sheet::columnFormat ( int  _column  )  const
Returns:
the column format of column _column . The default column format, if no special one exists.

Definition at line 503 of file Sheet.cpp.

double KSpread::Sheet::columnPosition ( int  col  )  const
Returns:
the left corner of the column as double. Use this method, when you later calculate other positions depending on this one to avoid rounding problems
Parameters:
col the column's index

Definition at line 692 of file Sheet.cpp.

const CommentStorage * KSpread::Sheet::commentStorage (  )  const

Definition at line 526 of file Sheet.cpp.

const ConditionsStorage * KSpread::Sheet::conditionsStorage (  )  const

Definition at line 531 of file Sheet.cpp.

QString KSpread::Sheet::copyAsText ( Selection selection  ) 

returns the text to be copied to the clipboard

Parameters:
selection the selection of cells to work on

Definition at line 1281 of file Sheet.cpp.

void KSpread::Sheet::copySelection ( Selection selection  ) 
Parameters:
selection the selection of cells to work on

Definition at line 1311 of file Sheet.cpp.

void KSpread::Sheet::cutSelection ( Selection selection  ) 
Parameters:
selection the selection of cells to work on

Definition at line 1330 of file Sheet.cpp.

QMap< QString, KoDataCenter * > KSpread::Sheet::dataCenterMap (  )  const [virtual]

Definition at line 366 of file Sheet.cpp.

void KSpread::Sheet::deleteCells ( const Region region  ) 

Deletes all cells in the given rectangle.

The display is NOT updated by this function. This function can be used to clear an area before you paste something from the clipboard in this area.

Parameters:
region The region that contains the cells that should be deleted

Definition at line 1792 of file Sheet.cpp.

void KSpread::Sheet::deleteColumnFormat ( int  column  ) 

Deletes the column format at column.

Definition at line 4132 of file Sheet.cpp.

void KSpread::Sheet::deleteRowFormat ( int  row  ) 

Deletes the row format at row.

Definition at line 4140 of file Sheet.cpp.

Doc * KSpread::Sheet::doc (  )  const
Returns:
the document this sheet belongs to

Definition at line 326 of file Sheet.cpp.

QSizeF KSpread::Sheet::documentSize (  )  const
Returns:
the document size

Definition at line 601 of file Sheet.cpp.

void KSpread::Sheet::documentSizeChanged ( const QSizeF  )  [signal]
QRect KSpread::Sheet::documentToCellCoordinates ( const QRectF area  )  const

Calculates the cell range covering a document area.

Parameters:
area the document area
Returns:
the cell range covering the area

Definition at line 673 of file Sheet.cpp.

void KSpread::Sheet::emit_updateColumn ( ColumnFormat columnFormat,
int  _column 
)

Definition at line 4166 of file Sheet.cpp.

void KSpread::Sheet::emit_updateRow ( RowFormat rowFormat,
int  _row,
bool  repaint = true 
)

Definition at line 4148 of file Sheet.cpp.

void KSpread::Sheet::emitHideColumn (  ) 

Updates horizontal border and view.

Definition at line 927 of file Sheet.cpp.

void KSpread::Sheet::emitHideRow (  ) 

Updates vertical border and view.

Definition at line 920 of file Sheet.cpp.

Sheet * KSpread::Sheet::find ( int  _id  )  [static, protected]

Definition at line 166 of file Sheet.cpp.

ColumnFormat * KSpread::Sheet::firstCol (  )  const
Returns:
the first non-default row format

Definition at line 717 of file Sheet.cpp.

RowFormat * KSpread::Sheet::firstRow (  )  const
Returns:
the first non-default row format

Definition at line 712 of file Sheet.cpp.

const FormulaStorage * KSpread::Sheet::formulaStorage (  )  const

Definition at line 536 of file Sheet.cpp.

const FusionStorage * KSpread::Sheet::fusionStorage (  )  const

Definition at line 541 of file Sheet.cpp.

bool KSpread::Sheet::getFirstLetterUpper (  )  const

Definition at line 488 of file Sheet.cpp.

bool KSpread::Sheet::getHideZero (  )  const

Definition at line 478 of file Sheet.cpp.

bool KSpread::Sheet::getLcMode (  )  const

Definition at line 436 of file Sheet.cpp.

bool KSpread::Sheet::getShowColumnNumber (  )  const

Definition at line 468 of file Sheet.cpp.

bool KSpread::Sheet::getShowCommentIndicator (  )  const

Returns true if comment indicator is visible.

Definition at line 426 of file Sheet.cpp.

bool KSpread::Sheet::getShowFormula (  )  const

Sets, if formula shall be shown instead of the result.

Definition at line 406 of file Sheet.cpp.

bool KSpread::Sheet::getShowFormulaIndicator (  )  const

Sets, if indicator must be shown when the cell holds a formula.

Definition at line 416 of file Sheet.cpp.

bool KSpread::Sheet::getShowGrid (  )  const

Returns, if the grid shall be shown on the screen.

Definition at line 396 of file Sheet.cpp.

QString KSpread::Sheet::guessColumnTitle ( QRect area,
int  col 
)

Attempts to guess the title (or 'header') of a column, within a given area of the sheet This is used, for example, by the Data Sort dialog, to guess the names of columns within the selected area.

An empty string may be returned if guessColumnTitle does not think that column col has a title.

Parameters:
area The area within the sheet to guess from
col The column to find the title (or 'header') for.

Definition at line 1228 of file Sheet.cpp.

QString KSpread::Sheet::guessRowTitle ( QRect area,
int  row 
)

Attempts to guess the title (or 'header') of a row, within a given area of the sheet This is used, for example, by the Data Sort dialog, to guess the names of rows within the selected area.

An empty string may be returned if guessRowTitle does not think that row row has a title.

Parameters:
area The area within the sheet to guess from
row The row to find the title (or 'header') for.

Definition at line 1249 of file Sheet.cpp.

void KSpread::Sheet::hideSheet ( bool  _hide  ) 

Definition at line 4198 of file Sheet.cpp.

void KSpread::Sheet::insertColumnFormat ( ColumnFormat columnFormat  ) 

Insert the non-default column format columnFormat.

Definition at line 4116 of file Sheet.cpp.

void KSpread::Sheet::insertColumns ( int  row,
int  numbers 
)

Helper method.

See also:
InsertDeleteColumnManipulator Moves all columns which are >= col number positions to the right and inserts a new and empty column.

Definition at line 831 of file Sheet.cpp.

void KSpread::Sheet::insertRowFormat ( RowFormat rowFormat  ) 

Inserts the non-default row format rowFormat.

Definition at line 4124 of file Sheet.cpp.

void KSpread::Sheet::insertRows ( int  row,
int  numbers 
)

Helper method.

See also:
InsertDeleteRowManipulator Moves all rows which are >= row number positions down and inserts a new and empty row.

Definition at line 853 of file Sheet.cpp.

void KSpread::Sheet::insertShiftDown ( const QRect rect  ) 

Helper method.

See also:
ShiftManipulator

Definition at line 792 of file Sheet.cpp.

void KSpread::Sheet::insertShiftRight ( const QRect rect  ) 

Helper method.

See also:
ShiftManipulator

Definition at line 779 of file Sheet.cpp.

bool KSpread::Sheet::isAutoCalculationEnabled (  )  const

Definition at line 446 of file Sheet.cpp.

bool KSpread::Sheet::isHidden (  )  const
Returns:
true if this sheet is hidden

Definition at line 386 of file Sheet.cpp.

bool KSpread::Sheet::isLoading (  ) 
Returns:
true , if a document is currently loading

Definition at line 2231 of file Sheet.cpp.

bool KSpread::Sheet::isProtected (  )  const

Definition at line 571 of file Sheet.cpp.

bool KSpread::Sheet::isShowPageBorders (  )  const
Returns:
a flag that indicates whether the sheet should paint the page breaks.
See also:
setShowPageBorders
Sheet::Private::showPageBorders

Definition at line 498 of file Sheet.cpp.

Qt::LayoutDirection KSpread::Sheet::layoutDirection (  )  const

Returns the layout direction of the sheet.

Definition at line 376 of file Sheet.cpp.

int KSpread::Sheet::leftColumn ( double  _xpos,
double &  _left 
) const

Determines the column for a given position _xpos .

If the position is on the border between two cells, the left column is returned. Also, the offset between the coordinate system root and the left column border is determined.

Parameters:
_xpos the position for which the column should be determined
_left the offset between the coordinate system root and the left column border
Returns:
the column for the given position _xpos

Definition at line 618 of file Sheet.cpp.

const LinkStorage * KSpread::Sheet::linkStorage (  )  const

Definition at line 546 of file Sheet.cpp.

bool KSpread::Sheet::loadSelection ( const KoXmlDocument &  doc,
const QRect pasteArea,
int  _xshift,
int  _yshift,
bool  makeUndo,
Paste::Mode  mode = Paste::Normal,
Paste::Operation  operation = Paste::OverWrite,
bool  insert = false,
int  insertTo = 0,
bool  paste = false 
)

insertTo defined if you insert to the bottom or right insert to bottom if insertTo==1 insert to right if insertTo ==-1 insertTo used just for insert/paste an area

See also:
paste

Definition at line 1445 of file Sheet.cpp.

void KSpread::Sheet::loadSelectionUndo ( const KoXmlDocument &  doc,
const QRect loadArea,
int  _xshift,
int  _yshift,
bool  insert,
int  insertTo 
)

Definition at line 1630 of file Sheet.cpp.

Map * KSpread::Sheet::map (  )  const
Returns:
the map this sheet belongs to

Definition at line 321 of file Sheet.cpp.

ColumnFormat * KSpread::Sheet::nonDefaultColumnFormat ( int  _column,
bool  force_creation = true 
)

If no special ColumnFormat exists for this column, then a new one is created.

Returns:
a non default ColumnFormat for this column.

Definition at line 722 of file Sheet.cpp.

RowFormat * KSpread::Sheet::nonDefaultRowFormat ( int  _row,
bool  force_creation = true 
)

If no special RowFormat exists for this row, then a new one is created.

Returns:
a non default RowFormat for this row.

Definition at line 738 of file Sheet.cpp.

void KSpread::Sheet::password ( QByteArray passwd  )  const

Definition at line 566 of file Sheet.cpp.

void KSpread::Sheet::paste ( const QByteArray data,
const QRect pasteArea,
bool  makeUndo = false,
Paste::Mode  mode = Paste::Normal,
Paste::Operation  operation = Paste::OverWrite,
bool  insert = false,
int  insertTo = 0,
bool  pasteFC = false 
)

Definition at line 1419 of file Sheet.cpp.

void KSpread::Sheet::paste ( const QRect pasteArea,
bool  makeUndo = true,
Paste::Mode  mode = Paste::Normal,
Paste::Operation  operation = Paste::OverWrite,
bool  insert = false,
int  insertTo = 0,
bool  pasteFC = false,
QClipboard::Mode  clipboardMode = QClipboard::Clipboard 
)

A convenience function which retrieves the data to be pasted from the clipboard.

Definition at line 1356 of file Sheet.cpp.

void KSpread::Sheet::pasteTextPlain ( const QString _text,
const QRect pasteArea 
)

A function which allows to paste a text plain from the clipboard.

Definition at line 1389 of file Sheet.cpp.

SheetPrint * KSpread::Sheet::print (  )  const

Definition at line 586 of file Sheet.cpp.

void KSpread::Sheet::printDebug (  ) 

Definition at line 4324 of file Sheet.cpp.

PrintSettings * KSpread::Sheet::printSettings (  )  const

Definition at line 591 of file Sheet.cpp.

void KSpread::Sheet::removeColumns ( int  row,
int  numbers 
)

Helper method.

See also:
InsertDeleteColumnManipulator Deletes number columns beginning at col .

Definition at line 875 of file Sheet.cpp.

void KSpread::Sheet::removeRows ( int  row,
int  numbers 
)

Helper method.

See also:
InsertDeleteRowManipulator Deletes number rows beginning at row .

Definition at line 897 of file Sheet.cpp.

void KSpread::Sheet::removeShape ( KoShape shape  )  [virtual]

Definition at line 349 of file Sheet.cpp.

void KSpread::Sheet::removeShiftLeft ( const QRect rect  ) 

Helper method.

See also:
ShiftManipulator

Definition at line 818 of file Sheet.cpp.

void KSpread::Sheet::removeShiftUp ( const QRect rect  ) 

Helper method.

See also:
ShiftManipulator

Definition at line 805 of file Sheet.cpp.

int KSpread::Sheet::rightColumn ( double  _xpos  )  const

Determines the column for a given position _xpos .

If the position is on the border between two cells, the right column is returned.

Parameters:
_xpos the position for which the column should be determined
Returns:
the column for the given position _xpos

Definition at line 631 of file Sheet.cpp.

const RowFormat * KSpread::Sheet::rowFormat ( int  _row  )  const
Returns:
the row format of row _row . The default row format, if no special one exists.

Definition at line 512 of file Sheet.cpp.

double KSpread::Sheet::rowPosition ( int  _row  )  const
Returns:
the top corner of the row as double. Use this method, when you later calculate other positions depending on this one to avoid rounding problems
Parameters:
_row the row's index

Definition at line 702 of file Sheet.cpp.

QDomDocument KSpread::Sheet::saveCellRegion ( const Region region,
bool  era = false 
)
Parameters:
era set this to true if you want to encode relative references absolutely (they will be switched back to relative references during decoding) - used for cut to clipboard

Definition at line 1889 of file Sheet.cpp.

void KSpread::Sheet::setAutoCalculationEnabled ( bool  enable  ) 

Definition at line 451 of file Sheet.cpp.

void KSpread::Sheet::setDefaultHeight ( double  height  ) 
void KSpread::Sheet::setDefaultWidth ( double  width  ) 
void KSpread::Sheet::setFirstLetterUpper ( bool  _firstUpper  ) 

Definition at line 493 of file Sheet.cpp.

void KSpread::Sheet::setHidden ( bool  hidden  ) 

Hides or shows this sheets.

Definition at line 391 of file Sheet.cpp.

void KSpread::Sheet::setHideZero ( bool  _hideZero  ) 

Definition at line 483 of file Sheet.cpp.

void KSpread::Sheet::setLayoutDirection ( Qt::LayoutDirection  dir  ) 

Sets the layout direction of the sheet.

For example, for Arabic or Hebrew documents, it is possibly to layout the sheet from right to left.

Definition at line 381 of file Sheet.cpp.

void KSpread::Sheet::setLcMode ( bool  _lcMode  ) 

Definition at line 441 of file Sheet.cpp.

void KSpread::Sheet::setPrintSettings ( const PrintSettings settings  ) 

Definition at line 596 of file Sheet.cpp.

void KSpread::Sheet::setProtected ( QByteArray const &  passwd  ) 

Definition at line 576 of file Sheet.cpp.

void KSpread::Sheet::setRegionPaintDirty ( const QRect rect  ) 

Definition at line 4318 of file Sheet.cpp.

bool KSpread::Sheet::setSheetName ( const QString name,
bool  init = false 
)

Renames a sheet.

This will automatically adapt all formulas in all sheets and all cells to reflect the new name.

If the name really changed then sig_nameChanged is emitted and the GUI will reflect the change.

Parameters:
name The new sheet name.
init If set to true then no formula will be changed and no signal will be emitted and no undo action created. Usually you do not want to do that.
Returns:
true if the sheet was renamed successfully
false if the sheet could not be renamed. Usually the reason is that this name is already used.
See also:
changeCellTabName
TabBar::renameTab
sheetName

Definition at line 4207 of file Sheet.cpp.

void KSpread::Sheet::setShowColumnNumber ( bool  _showColumnNumber  ) 

Definition at line 473 of file Sheet.cpp.

void KSpread::Sheet::setShowCommentIndicator ( bool  b  ) 

If b is true, comment indicator is visible, otherwise it will be hidden.

Definition at line 431 of file Sheet.cpp.

void KSpread::Sheet::setShowFormula ( bool  _showFormula  ) 

Definition at line 411 of file Sheet.cpp.

void KSpread::Sheet::setShowFormulaIndicator ( bool  _showFormulaIndicator  ) 

Definition at line 421 of file Sheet.cpp.

void KSpread::Sheet::setShowGrid ( bool  _showGrid  ) 

Sets, if the grid shall be shown on the screen.

Definition at line 401 of file Sheet.cpp.

void KSpread::Sheet::setShowPageBorders ( bool  _b  ) 

Turns the page break lines on or off.

See also:
isShowPageBorders
Sheet::Private::showPageBorders

Definition at line 4107 of file Sheet.cpp.

QString KSpread::Sheet::sheetName (  )  const
Returns:
the name of this sheet
void KSpread::Sheet::sig_nameChanged ( Sheet sheet,
const QString old_name 
) [signal]
See also:
setSheetName
void KSpread::Sheet::sig_RefreshView ( Sheet  )  [signal]
void KSpread::Sheet::sig_refreshView (  )  [signal]
void KSpread::Sheet::sig_SheetActivated ( Sheet  )  [signal]
void KSpread::Sheet::sig_SheetHidden ( Sheet sheet  )  [signal]
void KSpread::Sheet::sig_SheetRemoved ( Sheet sheet  )  [signal]
void KSpread::Sheet::sig_SheetShown ( Sheet sheet  )  [signal]
void KSpread::Sheet::sig_updateColumnHeader ( Sheet _sheet  )  [signal]
void KSpread::Sheet::sig_updateRowHeader ( Sheet _sheet  )  [signal]
void KSpread::Sheet::sig_updateView ( Sheet _sheet,
const Region  
) [signal]
void KSpread::Sheet::sig_updateView ( Sheet _sheet  )  [signal]
StyleStorage * KSpread::Sheet::styleStorage (  )  const

Definition at line 551 of file Sheet.cpp.

bool KSpread::Sheet::testAreaPasteInsert (  )  const

Used when you insert and paste cell return true if it's a area false if it's a column/row it's used to select if you want to insert at the bottom or right.

See also:
paste

Definition at line 1750 of file Sheet.cpp.

bool KSpread::Sheet::testListChoose ( Selection selection  ) 
Returns:
true if there are text value in cell so you can create list selection
Parameters:
selection the selection of cells to work on

Definition at line 1850 of file Sheet.cpp.

int KSpread::Sheet::topRow ( double  _ypos,
double &  _top 
) const

Determines the row for a given position _ypos .

If the position is on the border between two cells, the upper row is returned. Also, the offset between the coordinate system root and the upper row border is determined.

Parameters:
_ypos the position for which the row should be determined
_top the offset between the coordinate system root and the upper row border
Returns:
the row for the given position _ypos

Definition at line 640 of file Sheet.cpp.

void KSpread::Sheet::updateLocale (  ) 

Definition at line 4238 of file Sheet.cpp.

QRect KSpread::Sheet::usedArea (  )  const

Determines the used area, i.e.

the area spanning from A1 to the maximum occupied column and row.

Returns:
the used area

Definition at line 2990 of file Sheet.cpp.

const ValidityStorage * KSpread::Sheet::validityStorage (  )  const

Definition at line 556 of file Sheet.cpp.

const ValueStorage * KSpread::Sheet::valueStorage (  )  const

Definition at line 561 of file Sheet.cpp.

void KSpread::Sheet::visibleSizeChanged (  )  [signal]

Member Data Documentation

int KSpread::Sheet::s_id = 0 [static, protected]

Definition at line 974 of file Sheet.h.

QHash< int, Sheet * > * KSpread::Sheet::s_mapSheets [static, protected]

Definition at line 975 of file Sheet.h.


Property Documentation

bool KSpread::Sheet::autoCalc [read, write]

Definition at line 93 of file Sheet.h.

QString KSpread::Sheet::sheetName [read]

Definition at line 92 of file Sheet.h.

bool KSpread::Sheet::showGrid [read, write]

Definition at line 94 of file Sheet.h.


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