kspread

KSpread::Cell Class Reference

#include <kspread_cell.h>

List of all members.


Detailed Description

For every cell in the spread sheet there is a Cell object.

Cell contains format information and algorithm and it contains the calculation algorithm.

However, all empty cells are represented by one instace, called the default cell. isDefault can be used to determine whether or not a Cell object represents the default one.

Definition at line 110 of file kspread_cell.h.


Public Types

 Border_None = 0x00
 Border_Left = 0x01
 Border_Right = 0x02
 Border_Top = 0x04
 Border_Bottom = 0x08
 Border_SizeGrip = 0x10
 Flag_LayoutDirty = 0x00010000
 Flag_CalcDirty = 0x00020000
 Flag_Progress = 0x00040000
 Flag_UpdatingDeps = 0x00080000
 Flag_DisplayDirty = 0x00100000
 Flag_Merged = 0x00200000
 Flag_CellTooShortX = 0x00400000
 Flag_CellTooShortY = 0x00800000
 Flag_ParseError = 0x01000000
 Flag_CircularCalculation = 0x02000000
 Flag_DependancyError = 0x04000000
 Flag_PaintingCell = 0x08000000
 Flag_TextFormatDirty = 0x10000000
enum  BorderSides {
  Border_None = 0x00, Border_Left = 0x01, Border_Right = 0x02, Border_Top = 0x04,
  Border_Bottom = 0x08, Border_SizeGrip = 0x10
}
enum  CellFlags {
  Flag_LayoutDirty = 0x00010000, Flag_CalcDirty = 0x00020000, Flag_Progress = 0x00040000, Flag_UpdatingDeps = 0x00080000,
  Flag_DisplayDirty = 0x00100000, Flag_Merged = 0x00200000, Flag_CellTooShortX = 0x00400000, Flag_CellTooShortY = 0x00800000,
  Flag_ParseError = 0x01000000, Flag_CircularCalculation = 0x02000000, Flag_DependancyError = 0x04000000, Flag_PaintingCell = 0x08000000,
  Flag_TextFormatDirty = 0x10000000
}

Public Member Functions

 Cell (Sheet *_sheet, int _column, int _row)
 Cell (Sheet *_sheet, Style *_style, int _column, int _row)
 ~Cell ()
Sheetsheet () const
bool isDefault () const
bool isEmpty () const
int column () const
int row () const
QString name () const
QString fullName () const
QString columnName () const
KLocale * locale () const
bool isFormula () const
QString text () const
QString strOutText () const
Formulaformula () const
Formatformat () const
const Value value () const
void setValue (const Value &value)
void setCellValue (const Value &v, FormatType fmtType=No_format, const QString &txt=QString::null)
CellpreviousCell () const
CellnextCell () const
void setPreviousCell (Cell *c)
void setNextCell (Cell *c)
void move (int column, int row)
void sheetDies ()
QDomElement save (QDomDocument &doc, int _x_offset=0, int _y_offset=0, bool force=false, bool copy=false, bool era=false)
virtual bool saveOasis (KoXmlWriter &xmlwriter, KoGenStyles &mainStyles, int row, int column, int maxCol, int &repeated, GenValidationStyles &valStyle)
void saveOasisValue (KoXmlWriter &xmlWriter)
QString saveOasisCellStyle (KoGenStyle &currentCellStyle, KoGenStyles &mainStyles)
bool load (const QDomElement &cell, int _xshift, int _yshift, Paste::Mode pm=Paste::Normal, Paste::Operation op=Paste::OverWrite, bool paste=false)
bool loadOasis (const QDomElement &element, KoOasisLoadingContext &oasisContext, Style *style)
QTime toTime (const QDomElement &element)
QDate toDate (const QDomElement &element)
void copyFormat (const int column, const int row)
void copyFormat (const Cell *cell)
void copyContent (const Cell *cell)
void copyAll (Cell *cell)
void paintCell (const KoRect &rect, QPainter &painter, View *view, const KoPoint &coordinate, const QPoint &cellRef, int paintBorder, QPen &rightPen, QPen &bottomPen, QPen &leftPen, QPen &topPen, QValueList< QPoint > &mergedCellsPainted, bool drawCursor=true)
int width (int _col=-1, const Canvas *_canvas=0L) const
int height (int _row=-1, const Canvas *_canvas=0L) const
double dblWidth (int _col=-1, const Canvas *_canvas=0L) const
double dblHeight (int _row=-1, const Canvas *_canvas=0L) const
QRect cellRect ()
bool needsPrinting () const
void incPrecision ()
void decPrecision ()
void setCellText (const QString &_text, bool asString=false)
void setDisplayText (const QString &_text)
void setLink (const QString &link)
QString link () const
const QPen & effLeftBorderPen (int col, int row) const
const QPen & effTopBorderPen (int col, int row) const
const QPen & effRightBorderPen (int col, int row) const
const QPen & effBottomBorderPen (int col, int row) const
const QPen & effGoUpDiagonalPen (int col, int row) const
const QPen & effFallDiagonalPen (int col, int row) const
const QColor & effTextColor (int col, int row) const
uint effBottomBorderValue (int col, int row) const
uint effRightBorderValue (int col, int row) const
uint effLeftBorderValue (int col, int row) const
uint effTopBorderValue (int col, int row) const
const QPen & leftBorderPen (int col, int row) const
const QPen & topBorderPen (int col, int row) const
const QPen & rightBorderPen (int col, int row) const
const QPen & bottomBorderPen (int col, int row) const
const QColor & bgColor (int col, int row) const
const QBrush & backGroundBrush (int col, int row) const
void setLeftBorderPen (const QPen &p)
void setTopBorderPen (const QPen &p)
void setRightBorderPen (const QPen &p)
void setBottomBorderPen (const QPen &p)
FormatType formatType () const
bool isDate () const
bool isTime () const
void setNumber (double number)
double getDouble ()
void convertToDouble ()
void convertToPercent ()
void convertToMoney ()
void convertToTime ()
void convertToDate ()
double textWidth () const
double textHeight () const
bool updateChart (bool refresh=true)
QString testAnchor (int _x, int _y) const
bool calc (bool delay=true)
void setCalcDirtyFlag ()
bool calcDirtyFlag ()
void NotifyDepending (int col, int row, Sheet *sheet, bool isDepending)
virtual void setLayoutDirtyFlag (bool format=false)
bool layoutDirtyFlag () const
void clearDisplayDirtyFlag ()
void setDisplayDirtyFlag ()
void obscure (Cell *cell, bool isForcing=false)
void unobscure (Cell *cell)
bool isObscured () const
bool isPartOfMerged () const
CellultimateObscuringCell () const
QValueList< Cell * > obscuringCells () const
void clearObscuringCells ()
void mergeCells (int _col, int _row, int _x, int _y)
bool doesMergeCells () const
int mergedXCells () const
int mergedYCells () const
int extraXCells () const
int extraYCells () const
double extraWidth () const
double extraHeight () const
QString encodeFormula (bool _era=false, int _col=-1, int _row=-1) const
QString decodeFormula (const QString &_text, int _col=-1, int _row=-1) const
QString pasteOperation (const QString &new_text, const QString &old_text, Paste::Operation op)
bool hasError () const
void clearAllErrors ()
void makeLayout (QPainter &_painter, int _col, int _row)
bool makeFormula ()
void defaultStyle ()
QValueList< ConditionalconditionList () const
void setConditionList (const QValueList< Conditional > &newList)
ValiditygetValidity (int newStruct=-1)
void removeValidity ()
bool testValidity () const
void calculateTextParameters (QPainter &painter, int _col, int _row)
int defineAlignX ()
bool operator> (const Cell &) const
bool operator< (const Cell &) const
void freeAllObscuredCells ()
void clearFlag (CellFlags flag)
void setFlag (CellFlags flag)
bool testFlag (CellFlags flag) const

Static Public Member Functions

static QString name (int col, int row)
static QString fullName (const Sheet *s, int col, int row)
static QString columnName (uint column)

Protected Member Functions

void applyZoomedFont (QPainter &painter, int _col, int _row)
void textSize (QPainter &_paint)
QString textDisplaying (QPainter &painter)
void clearFormula ()
void checkTextInput ()
void checkNumberFormat ()
void loadOasisCellText (const QDomElement &parent)
void loadOasisObjects (const QDomElement &e, KoOasisLoadingContext &oasisContext)
void loadOasisValidation (const QString &validationName)
void loadOasisValidationCondition (QString &valExpression)
void saveOasisAnnotation (KoXmlWriter &xmlwriter)
void loadOasisConditional (QDomElement *style)

Friends

class Conditions

Constructor & Destructor Documentation

KSpread::Cell::~Cell (  ) 

See also:
sheetDies


Member Function Documentation

void KSpread::Cell::applyZoomedFont ( QPainter &  painter,
int  _col,
int  _row 
) [protected]

Applies the font to use to painter.

const QBrush& KSpread::Cell::backGroundBrush ( int  col,
int  row 
) const

const QColor& KSpread::Cell::bgColor ( int  col,
int  row 
) const

See also:
Format::bgColor

const QPen& KSpread::Cell::bottomBorderPen ( int  col,
int  row 
) const

bool KSpread::Cell::calc ( bool  delay = true  ) 

Starts calculating.

Parameters:
delay true if you want to check for delay condition in doc() false if you really have to calculate the value right now e.g. if you sort with formula as key
Returns:
true on success and false on error.

bool KSpread::Cell::calcDirtyFlag (  ) 

Checks the calcDirtyFlag.

void KSpread::Cell::calculateTextParameters ( QPainter &  painter,
int  _col,
int  _row 
)

Calculates the text parameters stored in cell Applies font to use to painter.

QRect KSpread::Cell::cellRect (  ) 

Returns:
a QRect for this cell (i.e., a 1x1 rect).
See also:
zoomedCellRect

void KSpread::Cell::checkNumberFormat (  )  [protected]

Automatically chooses between a number format and a scientific format (if the number is too big).

void KSpread::Cell::checkTextInput (  )  [protected]

Check the input from the user, and determine the contents of the cell accordingly (in particular the data type).

This is to be called only when m_content == Text.

Input: m_strText Output: m_dataType

void KSpread::Cell::clearAllErrors (  ) 

Clear all error flags from the cell.

void KSpread::Cell::clearFormula (  )  [protected]

Cleans up formula stuff.

Call this before you store a new formula or to delete the formula.

int KSpread::Cell::column (  )  const

Returns the cell's column.

This could be 0 if the cell is the default cell.

static QString KSpread::Cell::columnName ( uint  column  )  [static]

Given the column number, this static function returns the corresponding column name, i.e.

the first column is "A", the second is "B", and so on.

QString KSpread::Cell::columnName (  )  const

Returns the column name of the cell.

QValueList<Conditional> KSpread::Cell::conditionList (  )  const

Gets a copy of the list of current conditions.

void KSpread::Cell::convertToDate (  ) 

converts content to date format

void KSpread::Cell::convertToDouble (  ) 

converts content to double format

void KSpread::Cell::convertToMoney (  ) 

converts content to money format

void KSpread::Cell::convertToPercent (  ) 

converts content to percentageformat

void KSpread::Cell::convertToTime (  ) 

converts content to time format

void KSpread::Cell::copyAll ( Cell cell  ) 

Copies the format and the content.

It does not copy the m_row and m_column attributes. Besides that all persistent attributes are copied. setCellText is called to set the real content.

See also:
copyFormat

void KSpread::Cell::copyFormat ( const Cell cell  ) 

A convenience function.

See also:
copyAll

void KSpread::Cell::copyFormat ( const int  column,
const int  row 
)

Copyies the format from the cell at the position (_column|_row).

See also:
copyAll

double KSpread::Cell::dblHeight ( int  _row = -1,
const Canvas _canvas = 0L 
) const

Parameters:
_row the row this cell is assumed to be in.
_canvas the canvas this cell is assumed to be in.
Returns:
the height of this cell as double

double KSpread::Cell::dblWidth ( int  _col = -1,
const Canvas _canvas = 0L 
) const

Parameters:
_canvas the canvas this cell is assumed to be in.
_col the column this cell is assumed to be in. This parameter defaults to the return value of column.
Returns:
the width of this cell as double

void KSpread::Cell::decPrecision (  ) 

Decreases the precison of the value displayed.

Precision means here the amount of digits behind the dot. If the current precision is the default of -1, then it is set to the number of digits behind the dot minus 1.

int KSpread::Cell::defineAlignX (  ) 

return align X when align is undefined

bool KSpread::Cell::doesMergeCells (  )  const

Returns:
true if the cell is forced to obscure other cells.

const QPen& KSpread::Cell::effBottomBorderPen ( int  col,
int  row 
) const

Returns:
effective pen for the bottom border
See also:
effLeftBorderPen

uint KSpread::Cell::effBottomBorderValue ( int  col,
int  row 
) const

Returns:
"worth" of the effective bottom border pen
See also:
Style::calculateValue

effLeftBorderPen

const QPen& KSpread::Cell::effFallDiagonalPen ( int  col,
int  row 
) const

Returns:
effective pen for the go up diagonal border
See also:
effGoUpDiagonalPen

const QPen& KSpread::Cell::effGoUpDiagonalPen ( int  col,
int  row 
) const

Returns:
effective pen for the go up diagonal border If this cell's conditional formatting contains a go up diagonal pen and the condition is matched, the conditional formatting's pen. Otherwise, its own go up diagonal pen.

const QPen& KSpread::Cell::effLeftBorderPen ( int  col,
int  row 
) const

Returns:
effective pen for the left border If this cell is merged by another cell, the other cell's left border pen. If this cell's conditional formatting contains a left border pen and the condition is matched, the conditional formatting's pen. Otherwise, its own left border pen.

uint KSpread::Cell::effLeftBorderValue ( int  col,
int  row 
) const

Returns:
"worth" of the effective left border pen
See also:
Style::calculateValue

effLeftBorderPen

const QPen& KSpread::Cell::effRightBorderPen ( int  col,
int  row 
) const

Returns:
effective pen for the right border
See also:
effLeftBorderPen

uint KSpread::Cell::effRightBorderValue ( int  col,
int  row 
) const

Returns:
"worth" of the effective right border pen
See also:
Style::calculateValue

effLeftBorderPen

const QPen& KSpread::Cell::effTopBorderPen ( int  col,
int  row 
) const

Returns:
effective pen for the top border
See also:
effLeftBorderPen

uint KSpread::Cell::effTopBorderValue ( int  col,
int  row 
) const

Returns:
"worth" of the effective top border pen
See also:
Style::calculateValue

effLeftBorderPen

QString KSpread::Cell::encodeFormula ( bool  _era = false,
int  _col = -1,
int  _row = -1 
) const

encode a formula into a text representation

Parameters:
_era encode relative references absolutely (this is used for copying a cell to make the paste operation create a formula that points to the original cells, not the cells at the same relative position)
_col row the formula is in
_row column the formula is in

int KSpread::Cell::extraXCells (  )  const

Returns:
the amount of obscured cells in the horizontal direction

int KSpread::Cell::extraYCells (  )  const

Returns:
the amount of obscured cells in the vertical direction

Format* KSpread::Cell::format (  )  const

Returns the format object of this cell.

FormatType KSpread::Cell::formatType (  )  const

Return the format of this cell.

Convenience method for Format::getFormatType Note that this is "how the user would like the data to be displayed if possible". If he selects a date format, and the cell contains a string, we won't apply that format.

static QString KSpread::Cell::fullName ( const Sheet s,
int  col,
int  row 
) [static]

Given the sheet and cell position, this static function returns the full name of the cell, i.e.

with the name of the sheet.

QString KSpread::Cell::fullName (  )  const

Returns the full name of the cell, i.e.

including the worksheet name. Example: "Sheet1!A1"

double KSpread::Cell::getDouble (  ) 

return the cell's value as a double

bool KSpread::Cell::hasError (  )  const

Returns:
true if the cell contains a formula that could not be evaluated. These cells usually appear with "####" on the screen.

int KSpread::Cell::height ( int  _row = -1,
const Canvas _canvas = 0L 
) const

Parameters:
_row the row this cell is assumed to be in.
_canvas the canvas this cell is assumed to be in.
Returns:
the height of this cell as int

void KSpread::Cell::incPrecision (  ) 

Increases the precison of the value displayed.

Precision means here the amount of digits behind the dot. If the current precision is the default of -1, then it is set to the number of digits behind the dot plus 1.

bool KSpread::Cell::isDate (  )  const

returns true, if cell format is of date type or content is a date

bool KSpread::Cell::isDefault (  )  const

Returns true if this is a default cell (with row and column equal to zero).

Normally, cell constructed within a sheet can't be a default cell.

bool KSpread::Cell::isEmpty (  )  const

Returns true if this cell has no content, i.e no text and no formula.

bool KSpread::Cell::isFormula (  )  const

Returns true if this cell holds a formula.

bool KSpread::Cell::isObscured (  )  const

Returns:
true if this cell is obscured by another.

bool KSpread::Cell::isPartOfMerged (  )  const

If this cell is part of a merged cell, then the marker may never reside on this cell.

Returns:
true if another cell has this one merged into itself.

bool KSpread::Cell::isTime (  )  const

returns true, if cell format is of time type or content is a time

const QPen& KSpread::Cell::leftBorderPen ( int  col,
int  row 
) const

QString KSpread::Cell::link (  )  const

Returns the link associated with cell.

It is empty if this cell contains no link.

bool KSpread::Cell::loadOasis ( const QDomElement &  element,
KoOasisLoadingContext &  oasisContext,
Style style 
)

Loads a cell from an OASIS XML element.

Parameters:
element An OASIS XML element
oasisContext The loading context assoiated with the XML element

void KSpread::Cell::loadOasisCellText ( const QDomElement &  parent  )  [protected]

Load the text paragraphs from an OASIS XML cell description.

Parameters:
parent The DOM element representing the cell.

KLocale* KSpread::Cell::locale (  )  const

Returns the locale setting of this cell.

bool KSpread::Cell::makeFormula (  ) 

Parses the formula.

Fills dependList and formula.

Returns:
false on error.

void KSpread::Cell::makeLayout ( QPainter &  _painter,
int  _col,
int  _row 
)

Calculates the layout of the cell, i,e, determines what should be shown for this cell, m_strOutText.

void KSpread::Cell::mergeCells ( int  _col,
int  _row,
int  _x,
int  _y 
)

Merge a number of cells, i.e.

force the cell to occupy other cells space. If '_x' and '_y' are 0 then the merging is disabled.

Parameters:
_col is the column this cell is assumed to be in.
_row is the row this cell is assumed to be in.
_x tells to occupy _x additional cells in the horizontal
_y tells to occupy _y additional cells in the vertical

int KSpread::Cell::mergedXCells (  )  const

Returns:
the number of obscured cells in the horizontal direction as a result of cell merging (forced obscuring)

int KSpread::Cell::mergedYCells (  )  const

Returns:
the number of obscured cells in the vertical direction as a result of cell merging (forced obscuring)

void KSpread::Cell::move ( int  column,
int  row 
)

Moves around the cell.

It cares about obscured and obscuring cells and forces, relayout, calculation and redrawing of the cell.

static QString KSpread::Cell::name ( int  col,
int  row 
) [static]

Given the cell position, this static function returns the name of the cell.

Example: name(5,4) will return "E4".

QString KSpread::Cell::name (  )  const

Returns the name of the cell.

For example, the cell in first column and first row is "A1".

bool KSpread::Cell::needsPrinting (  )  const

Returns:
true if the cell should be printed in a print out. That si the case if it has any content, border, backgroundcolor, or background brush.
See also:
Sheet::print

void KSpread::Cell::NotifyDepending ( int  col,
int  row,
Sheet sheet,
bool  isDepending 
)

Notify this cell that another cell is depending, or no longer depending on this cell's value.

Parameters:
col the column of the cell
row the row of the cell
sheet the sheet that the cell is on
isDepending true if the cell is now depending on this one, false if it is not any longer depending on it.

void KSpread::Cell::obscure ( Cell cell,
bool  isForcing = false 
)

Tells this cell that the Cell 'cell' obscures this one.

If this cell has to be redrawn, then the obscuring cell is redrawn instead.

Parameters:
cell the obscuring cell
isForcing whether this is a forced obscuring (merged cells) or just a temporary obscure (text overlap).

QValueList<Cell*> KSpread::Cell::obscuringCells (  )  const

Returns:
the obscuring cell list (might be empty)

bool KSpread::Cell::operator> ( const Cell  )  const

Used for comparing cells (when sorting).

void KSpread::Cell::paintCell ( const KoRect &  rect,
QPainter &  painter,
View view,
const KoPoint &  coordinate,
const QPoint &  cellRef,
int  paintBorder,
QPen &  rightPen,
QPen &  bottomPen,
QPen &  leftPen,
QPen &  topPen,
QValueList< QPoint > &  mergedCellsPainted,
bool  drawCursor = true 
)

Paints the cell.

Parameters:
rect the portion of the canvas that is actually in view
painter the painter object to paint on
view the view of this data. This may be NULL, but no selection will be included with the painting.
coordinate coordinates on the painter where the top left corner of the cell should be painted plus width and height
cellRef the column/row coordinates of the cell.
paintBorder a combination of flags from the Cell::BorderSides enum which specifies which cell borders to paint
rightPen pen to use to draw the right border if paintBorder includes the Border_Right flag
bottomPen pen to use to draw the bottom border if paintBorderBottom includes the Border_Bottom flag
leftPen pen to use to draw the left border if paintBorderLeft includes the Border_Left flag
topPen pen to use to draw the top border if paintBorderTop includes the Border_Top flag
mergedCellsPainted list of merged cells being painted
drawCursor whether to draw the cursor and selection or not

QString KSpread::Cell::pasteOperation ( const QString &  new_text,
const QString &  old_text,
Paste::Operation  op 
)

Merges the new_text with old_text during a paste operation.

If both texts represent doubles, then the operation is performed on both values and the result is returned. If both texts represents a formula or one a formula and the other a double value, then a formula is returned. In all other cases new_text is returned.

Returns:
the merged text.

const QPen& KSpread::Cell::rightBorderPen ( int  col,
int  row 
) const

int KSpread::Cell::row (  )  const

Returns the cell's row.

This could be 0 if the cell is the default cell.

QDomElement KSpread::Cell::save ( QDomDocument &  doc,
int  _x_offset = 0,
int  _y_offset = 0,
bool  force = false,
bool  copy = false,
bool  era = false 
)

Save this cell.

Parameters:
doc document to save cell in
_x_offset x offset
_y_offset y offset
force if set to true, all the properties of the format are stored (used for "Copy"), otherwise only the non-default properties will be stored. Set this to false if you want smaller files.
copy if set to true, all cell formats will be copied instead of referencing the format (style name), thus resulting in larger output (files). Set this to false if you want smaller files.
era set this to true if you want to encode relative references as absolutely (they will be switched back to relative references during decoding) - is used for cutting to clipboard Usually this is false, to only store the properties explicitely set.

QString KSpread::Cell::saveOasisCellStyle ( KoGenStyle &  currentCellStyle,
KoGenStyles &  mainStyles 
)

Returns:
the OASIS style's name

void KSpread::Cell::setBottomBorderPen ( const QPen &  p  ) 

void KSpread::Cell::setCalcDirtyFlag (  ) 

Set the calcDirtyFlag.

void KSpread::Cell::setCellText ( const QString &  _text,
bool  asString = false 
)

The high-level method for setting text, when the user inputs it.

It will revert back to the old text if testValidity() returns action==stop.

void KSpread::Cell::setCellValue ( const Value v,
FormatType  fmtType = No_format,
const QString &  txt = QString::null 
)

Like setValue, but also sets formatting and input text.

Can therefore be used as a replacement for setCellText, if we don't need to parse.

void KSpread::Cell::setConditionList ( const QValueList< Conditional > &  newList  ) 

Replace the old set of conditions with a new one.

void KSpread::Cell::setDisplayText ( const QString &  _text  ) 

Sets the text in the cell when the user inputs it.

Will determine the type of contents automatically. Called by setCellText.

virtual void KSpread::Cell::setLayoutDirtyFlag ( bool  format = false  )  [virtual]

Causes the format to be recalculated when the cell is drawn next time.

This flag is for example set if the width of the column changes or if some cell specific format value like font or text change.

void KSpread::Cell::setLeftBorderPen ( const QPen &  p  ) 

void KSpread::Cell::setLink ( const QString &  link  ) 

Sets a link for this cell.

For example, setLink( "mailto:joe@somewhere.com" ) will open a new e-mail if this cell is clicked. Possible choices for link are URL (web, ftp), e-mail address, local file, or another cell.

void KSpread::Cell::setRightBorderPen ( const QPen &  p  ) 

void KSpread::Cell::setTopBorderPen ( const QPen &  p  ) 

void KSpread::Cell::setValue ( const Value value  ) 

Sets the value for this cell.

Sheet* KSpread::Cell::sheet (  )  const

Returns the worksheet which owns this cell.

void KSpread::Cell::sheetDies (  ) 

This method notifies the cell that the parent sheet is being deleted.

bool KSpread::Cell::testValidity (  )  const

return true if value is good else show a messagebox

QString KSpread::Cell::text (  )  const

Return the text the user entered.

This could be a value (e.g. "14.03") or a formula (e.g. "=SUM(A1:A10)")

QString KSpread::Cell::textDisplaying ( QPainter &  painter  )  [protected]

Called from paintCell to determine the text wich can be displaying.

double KSpread::Cell::textHeight (  )  const

return height of the text

void KSpread::Cell::textSize ( QPainter &  _paint  )  [protected]

Called from makeFormat() to determine the space needed for the text.

double KSpread::Cell::textWidth (  )  const

return width of the text

const QPen& KSpread::Cell::topBorderPen ( int  col,
int  row 
) const

Cell* KSpread::Cell::ultimateObscuringCell (  )  const

Return the cell that is obscuring this one (merged cells only).

If no obscuring, return the cell itself.

Returns:
the cell that decides the format for the cell in question.

void KSpread::Cell::unobscure ( Cell cell  ) 

Tells this cell that it is no longer obscured.

Parameters:
cell the cell that is no longer obscuring this one.

bool KSpread::Cell::updateChart ( bool  refresh = true  ) 

Refreshing chart.

Parameters:
refresh is default true when it's false it's just for test it's used when you paste cell

const Value KSpread::Cell::value (  )  const

Returns the value that this cell holds.

It could be from the user (i.e. when s/he enters a value) or a result of formula.

int KSpread::Cell::width ( int  _col = -1,
const Canvas _canvas = 0L 
) const

Parameters:
_col the column this cell is assumed to be in. This parameter defaults to the return value of column.
_canvas the canvas this cell is assumed to be in.
Returns:
the width of this cell as int


The documentation for this class was generated from the following file:
KDE Home | KDE Accessibility Home | Description of Access Keys