kspread
KSpread::Sheet Class Reference
List of all members.Detailed Description
Definition at line 180 of file kspread_sheet.h.
Public Types | |
Right | |
Left | |
Up | |
Down | |
Increase | |
Decrease | |
ColumnInsert | |
ColumnRemove | |
RowInsert | |
RowRemove | |
Text | |
Validity | |
Comment | |
ConditionalCellAttribute | |
LeftToRight | |
RightToLeft | |
enum | Direction { Right, Left, Up, Down } |
enum | SortingOrder { Increase, Decrease } |
enum | ChangeRef { ColumnInsert, ColumnRemove, RowInsert, RowRemove } |
enum | TestType { Text, Validity, Comment, ConditionalCellAttribute } |
enum | LayoutDirection { LeftToRight, RightToLeft } |
Signals | |
void | sig_refreshView () |
void | sig_updateView (Sheet *_sheet) |
void | sig_updateView (Sheet *_sheet, const Region &) |
void | sig_updateView (EmbeddedObject *obj) |
void | sig_updateHBorder (Sheet *_sheet) |
void | sig_updateVBorder (Sheet *_sheet) |
void | sig_updateChildGeometry (EmbeddedKOfficeObject *_child) |
void | sig_maxColumn (int _max_column) |
void | sig_maxRow (int _max_row) |
void | sig_nameChanged (Sheet *sheet, const QString &old_name) |
void | sig_polygonInvalidated (const QPointArray &) |
void | sig_SheetHidden (Sheet *sheet) |
void | sig_SheetShown (Sheet *sheet) |
void | sig_SheetRemoved (Sheet *sheet) |
void | sig_SheetActivated (Sheet *) |
void | sig_RefreshView (Sheet *) |
Public Member Functions | |
Sheet (Map *map, const QString &sheetName, const char *_name=0L) | |
~Sheet () | |
virtual bool | isEmpty (unsigned long int x, unsigned long int y) const |
QString | sheetName () const |
QString | tableName () const |
bool | setSheetName (const QString &name, bool init=false, bool makeUndo=true) |
Map * | workbook () const |
Doc * | doc () const |
virtual QDomElement | saveXML (QDomDocument &) |
virtual bool | loadXML (const QDomElement &) |
virtual bool | loadOasis (const QDomElement &sheet, KoOasisLoadingContext &oasisContext, QDict< Style > &styleMap) |
virtual bool | saveOasis (KoXmlWriter &xmlWriter, KoGenStyles &mainStyles, GenValidationStyles &valStyle, KoStore *store, KoXmlWriter *manifestWriter, int &indexObj, int &partIndexObj) |
void | saveOasisHeaderFooter (KoXmlWriter &xmlWriter) const |
void | loadOasisObjects (const QDomElement &e, KoOasisLoadingContext &oasisContext) |
void | loadOasisSettings (const KoOasisSettings::NamedMap &settings) |
void | saveOasisSettings (KoXmlWriter &settingsWriter) const |
void | saveOasisPrintStyleLayout (KoGenStyle &style) const |
virtual bool | saveChildren (KoStore *_store, const QString &_path) |
bool | saveOasisObjects (KoStore *store, KoXmlWriter &xmlWriter, KoGenStyles &mainStyles, int &indexObj, int &partIndexObj) |
virtual bool | loadChildren (KoStore *_store) |
bool | isLoading () |
QPtrList< EmbeddedObject > | getSelectedObjects () |
KoRect | getRealRect (bool all) |
KCommand * | moveObject (View *_view, double diffx, double diffy) |
KCommand * | moveObject (View *m_view, const KoPoint &_move, bool key) |
void | unifyObjectName (EmbeddedObject *object) |
LayoutDirection | layoutDirection () const |
void | setLayoutDirection (LayoutDirection dir) |
bool | isRightToLeft () const |
void | password (QCString &passwd) const |
bool | isProtected () const |
void | setProtected (QCString const &passwd) |
bool | checkPassword (QCString const &passwd) const |
void | setDefaultHeight (double height) |
void | setDefaultWidth (double width) |
const ColumnFormat * | columnFormat (int _column) const |
ColumnFormat * | columnFormat (int _column) |
ColumnFormat * | nonDefaultColumnFormat (int _column, bool force_creation=true) |
const RowFormat * | rowFormat (int _row) const |
RowFormat * | rowFormat (int _row) |
RowFormat * | nonDefaultRowFormat (int _row, bool force_creation=true) |
Cell * | firstCell () const |
RowFormat * | firstRow () const |
ColumnFormat * | firstCol () const |
Cell * | cellAt (int _column, int _row) const |
Cell * | cellAt (int _column, int _row, bool _scrollbar_update=false) |
Cell * | cellAt (const QPoint &_point, bool _scrollbar_update=false) |
Cell * | visibleCellAt (int _column, int _row, bool _scrollbar_update=false) |
Cell * | nonDefaultCell (int _column, int _row, bool _scrollbar_update=false, Style *_style=0) |
Cell * | nonDefaultCell (QPoint const &cellRef, bool scroll=false) |
Cell * | defaultCell () const |
Format * | defaultFormat () |
const Format * | defaultFormat () const |
Value | value (int col, int row) const |
Value | valueRange (int col1, int row1, int col2, int row2) const |
QRect | visibleRect (Canvas const *const _canvas) const |
int | topRow (double _ypos, double &_top, const Canvas *_canvas=0L) const |
int | bottomRow (double _ypos, const Canvas *_canvas=0L) const |
int | leftColumn (double _xpos, double &_left, const Canvas *_canvas=0L) const |
int | rightColumn (double _xpos, const Canvas *_canvas=0L) const |
int | columnPos (int _col, const Canvas *_canvas=0L) const |
double | dblColumnPos (int _col, const Canvas *_canvas=0L) const |
int | rowPos (int _row, const Canvas *_canvas=0L) const |
double | dblRowPos (int _row, const Canvas *_canvas=0L) const |
double | sizeMaxX () const |
double | sizeMaxY () const |
void | adjustSizeMaxX (double _x) |
void | adjustSizeMaxY (double _y) |
void | setLayoutDirtyFlag () |
void | setCalcDirtyFlag () |
void | recalc (bool force) |
void | recalc () |
void | valueChanged (Cell *cell) |
QString | guessColumnTitle (QRect &area, int col) |
QString | guessRowTitle (QRect &area, int row) |
void | setText (int row, int column, const QString &text, bool asString=false) |
void | setArrayFormula (Selection *selectionInfo, const QString &_text) |
void | setSelectionFont (Selection *selectionInfo, const char *_font=0L, int _size=-1, signed char _bold=-1, signed char _italic=-1, signed char _underline=-1, signed char _strike=-1) |
void | setSelectionMoneyFormat (Selection *selectionInfo, bool b) |
void | setSelectionAlign (Selection *selectionInfo, Format::Align _align) |
void | setSelectionAlignY (Selection *selectionInfo, Format::AlignY _alignY) |
void | setSelectionPrecision (Selection *selectionInfo, int _delta) |
void | setSelectionPercent (Selection *selectionInfo, bool b) |
void | setSelectionMultiRow (Selection *selectionInfo, bool enable) |
void | setSelectionStyle (Selection *selectionInfo, Style *style) |
void | setSelectionSize (Selection *selectionInfo, int _size) |
void | setSelectionUpperLower (Selection *selectionInfo, int _type) |
void | setSelectionfirstLetterUpper (Selection *selectionInfo) |
void | setSelectionVerticalText (Selection *selectionInfo, bool _b) |
void | setSelectionComment (Selection *selectionInfo, const QString &_comment) |
void | setSelectionRemoveComment (Selection *selectionInfo) |
void | setSelectionAngle (Selection *selectionInfo, int _value) |
void | setSelectionTextColor (Selection *selectionInfo, const QColor &tbColor) |
void | setSelectionbgColor (Selection *selectionInfo, const QColor &bg_Color) |
void | setSelectionBorderColor (Selection *selectionInfo, const QColor &bd_Color) |
void | deleteSelection (Selection *selectionInfo, bool undo=true) |
void | copySelection (Selection *selectionInfo) |
void | cutSelection (Selection *selectionInfo) |
void | clearTextSelection (Selection *selectionInfo) |
void | clearValiditySelection (Selection *selectionInfo) |
void | clearConditionalSelection (Selection *selectionInfo) |
void | fillSelection (Selection *selectionInfo, int direction) |
void | setWordSpelling (Selection *selectionInfo, const QString _listWord) |
QString | getWordSpelling (Selection *selectionInfo) |
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 | 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 | defaultSelection (Selection *selectionInfo) |
void | pasteTextPlain (QString &_text, QRect pasteArea) |
void | sortByRow (const QRect &area, int ref_row, SortingOrder) |
void | sortByRow (const QRect &area, int key1, int key2, int key3, SortingOrder order1, SortingOrder order2, SortingOrder order3, QStringList const *firstKey, bool copyFormat, bool headerRow, Point const &outputPoint, bool respectCase) |
void | sortByColumn (const QRect &area, int ref_column, SortingOrder) |
void | sortByColumn (const QRect &area, int key1, int key2, int key3, SortingOrder order1, SortingOrder order2, SortingOrder order3, QStringList const *firstKey, bool copyFormat, bool headerCol, Point const &outputPoint, bool respectCase) |
void | swapCells (int x1, int y1, int x2, int y2, bool cpFormat) |
void | copyCells (int x1, int y1, int x2, int y2, bool cpFormat) |
void | setSeries (const QPoint &_marker, double start, double end, double step, Series mode, Series type) |
bool | shiftRow (const QRect &_rect, bool makeUndo=true) |
bool | shiftColumn (const QRect &rect, bool makeUndo=true) |
void | unshiftColumn (const QRect &rect, bool makeUndo=true) |
void | unshiftRow (const QRect &rect, bool makeUndo=true) |
bool | insertColumn (int col, int nbCol=0, bool makeUndo=true) |
bool | insertRow (int row, int nbRow=0, bool makeUndo=true) |
void | removeColumn (int col, int nbCol=0, bool makeUndo=true) |
void | removeRow (int row, int nbRow=0, bool makeUndo=true) |
void | hideRow (const Region &) |
void | emitHideRow () |
void | showRow (const Region &) |
void | hideColumn (const Region &) |
void | emitHideColumn () |
void | showColumn (const Region &) |
void | adjustArea (const Region &) |
void | adjustColumn (const Region &) |
void | adjustRow (const Region &) |
void | borderLeft (Selection *selectionInfo, const QColor &_color) |
void | borderTop (Selection *selectionInfo, const QColor &_color) |
void | borderOutline (Selection *selectionInfo, const QColor &_color) |
void | borderAll (Selection *selectionInfo, const QColor &_color) |
void | borderRemove (Selection *selectionInfo) |
void | borderBottom (Selection *selectionInfo, const QColor &_color) |
void | borderRight (Selection *selectionInfo, const QColor &_color) |
void | setConditional (Selection *selectionInfo, QValueList< Conditional > const &newConditions) |
void | setValidity (Selection *selectionInfo, KSpread::Validity tmp) |
bool | getShowGrid () const |
void | setShowGrid (bool _showGrid) |
bool | getShowFormula () const |
void | setShowFormula (bool _showFormula) |
bool | getShowFormulaIndicator () const |
void | setShowFormulaIndicator (bool _showFormulaIndicator) |
bool | getShowCommentIndicator () const |
void | setShowCommentIndicator (bool b) |
bool | getLcMode () const |
void | setLcMode (bool _lcMode) |
bool | getAutoCalc () const |
void | setAutoCalc (bool _AutoCalc) |
bool | getShowColumnNumber () const |
void | setShowColumnNumber (bool _showColumnNumber) |
bool | getHideZero () const |
void | setHideZero (bool _hideZero) |
bool | getFirstLetterUpper () const |
void | setFirstLetterUpper (bool _firstUpper) |
void | changeMergedCell (int, int, int, int) |
void | mergeCells (const Region ®ion, bool hor=false, bool ver=false) |
void | dissociateCells (const Region ®ion) |
void | increaseIndent (Selection *selectionInfo) |
void | decreaseIndent (Selection *selectionInfo) |
bool | areaIsEmpty (const Region &area, TestType _type=Text) |
void | refreshPreference () |
void | hideSheet (bool _hide) |
void | removeSheet () |
QRect | selectionCellMerged (const QRect &_sel) |
void | changeNameCellRef (const QPoint &pos, bool fullRowOrColumn, ChangeRef ref, QString tabname, int NbCol=1, UndoInsertRemoveAction *undo=0) |
void | refreshRemoveAreaName (const QString &_areaName) |
void | refreshChangeAreaName (const QString &_areaName) |
void | refreshChart (const QPoint &pos, bool fullRowOrColumn, ChangeRef ref) |
void | refreshMergedCell () |
bool | isHidden () const |
void | setHidden (bool hidden) |
QPainter & | painter () |
QWidget * | widget () const |
bool | isShowPageBorders () const |
void | setShowPageBorders (bool _b) |
void | addCellBinding (CellBinding *_bind) |
void | removeCellBinding (CellBinding *_bind) |
CellBinding * | firstCellBinding () |
CellBinding * | nextCellBinding () |
bool | getCellRectangle (const QRect &_range, QPtrList< Cell > &_list) |
Sheet * | findSheet (const QString &_name) |
void | insertCell (Cell *_cell) |
void | insertColumnFormat (ColumnFormat *_l) |
void | insertRowFormat (RowFormat *_l) |
QDomDocument | saveCellRegion (const Region &, bool copy=false, bool era=false) |
bool | loadSelection (const QDomDocument &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 QDomDocument &doc, const QRect &loadArea, int _xshift, int _yshift, bool insert, int insertTo) |
bool | testAreaPasteInsert () const |
void | deleteCells (const Region ®ion) |
bool | testListChoose (Selection *selectionInfo) |
QString | copyAsText (Selection *selection) |
void | autofill (QRect &src, QRect &dest) |
bool | insertChild (const KoRect &_geometry, KoDocumentEntry &) |
bool | insertChart (const KoRect &_geometry, KoDocumentEntry &, const QRect &_data) |
bool | insertPicture (const KoPoint &point, const KURL &file) |
bool | insertPicture (const KoPoint &point, const QPixmap &pixmap) |
void | changeChildGeometry (EmbeddedKOfficeObject *_child, const KoRect &_geometry) |
const QColorGroup & | colorGroup () |
int | id () const |
int | maxColumn () const |
void | checkRangeHBorder (int _column) |
int | maxRow () const |
void | checkRangeVBorder (int _row) |
void | enableScrollBarUpdates (bool _enable) |
virtual DCOPObject * | dcopObject () |
void | printDebug () |
void | updateCell (Cell *_cell, int _col, int _row) |
void | updateCellArea (const Region &cellArea) |
void | update () |
void | updateView () |
void | updateView (QRect const &rect) |
void | updateView (Region *) |
void | refreshView (const Region ®ion) |
void | emit_updateRow (RowFormat *_format, int _row, bool repaint=true) |
void | emit_updateColumn (ColumnFormat *_format, int _column) |
const QPen & | emptyPen () const |
const QBrush & | emptyBrush () const |
const QColor & | emptyColor () const |
void | updateLocale () |
void | setRegionPaintDirty (QRect const &range) |
void | setRegionPaintDirty (Region const ®ion) |
void | clearPaintDirtyData () |
bool | cellIsPaintDirty (QPoint const &cell) const |
Cell * | getFirstCellColumn (int col) const |
Cell * | getLastCellColumn (int col) const |
Cell * | getFirstCellRow (int row) const |
Cell * | getLastCellRow (int row) const |
Cell * | getNextCellUp (int col, int row) const |
Cell * | getNextCellDown (int col, int row) const |
Cell * | getNextCellLeft (int col, int row) const |
Cell * | getNextCellRight (int col, int row) const |
SheetPrint * | print () const |
KSpread::DependencyManager * | dependencies () |
int | numSelected () const |
Static Public Member Functions | |
static Sheet * | find (int _id) |
Protected Types | |
CompleteRows | |
CompleteColumns | |
CellRegion | |
enum | SelectionType { CompleteRows, CompleteColumns, CellRegion } |
Protected Slots | |
void | slotAreaModified (const QString &name) |
Protected Member Functions | |
void | updateAllDependencies () |
void | changeCellTabName (QString const &old_name, QString const &new_name) |
bool | loadRowFormat (const QDomElement &row, int &rowIndex, KoOasisLoadingContext &oasisContext, QDict< Style > &styleMap) |
bool | loadColumnFormat (const QDomElement &row, const KoOasisStyles &oasisStyles, int &indexCol, const QDict< Style > &styleMap) |
bool | loadSheetStyleFormat (QDomElement *style) |
void | loadOasisMasterLayoutPage (KoStyleStack &styleStack) |
QString | saveOasisSheetStyleName (KoGenStyles &mainStyles) |
void | saveOasisColRowCell (KoXmlWriter &xmlWriter, KoGenStyles &mainStyles, int maxCols, int maxRows, GenValidationStyles &valStyle) |
void | saveOasisCells (KoXmlWriter &xmlWriter, KoGenStyles &mainStyles, int row, int maxCols, GenValidationStyles &valStyle) |
void | convertPart (const QString &part, KoXmlWriter &writer) const |
void | addText (const QString &text, KoXmlWriter &writer) const |
void | maxRowCols (int &maxCols, int &maxRows) |
bool | rowAsCell (int row, int maxCols) |
QString | getPart (const QDomNode &part) |
void | replaceMacro (QString &text, const QString &old, const QString &newS) |
void | insertObject (EmbeddedObject *_obj) |
void | fillSequence (QPtrList< Cell > &_srcList, QPtrList< Cell > &_destList, QPtrList< AutoFillSequence > &_seqList, bool down=true) |
SelectionType | workOnCells (Selection *selectionInfo, CellWorker &worker) |
Static Protected Attributes | |
static int | s_id = 0L |
static QIntDict< Sheet > * | s_mapSheets |
Properties | |
QString | sheetName [] |
bool | autoCalc [] |
bool | showGrid [] |
Friends | |
class | Cell |
Classes | |
struct | CellWorker |
struct | CellWorkerTypeA |
Member Function Documentation
void KSpread::Sheet::adjustArea | ( | const Region & | ) |
void KSpread::Sheet::adjustColumn | ( | const Region & | ) |
void KSpread::Sheet::adjustRow | ( | const Region & | ) |
void KSpread::Sheet::adjustSizeMaxX | ( | double | _x | ) |
Adjusts the internal reference of the sum of the widths of all columns.
Used in resizing of columns.
Definition at line 999 of file kspread_sheet.cc.
void KSpread::Sheet::adjustSizeMaxY | ( | double | _y | ) |
Adjusts the internal reference of the sum of the heights of all rows.
Used in resizing of rows.
Definition at line 1004 of file kspread_sheet.cc.
void Sheet::autofill | ( | QRect & | src, | |
QRect & | dest | |||
) |
Assume that the retangle 'src' was already selected.
Then the user clicked on the lower right corner of the marker and resized the area ( left mouse button ). Once he releases the mouse we have to autofill the region 'dest'. Mention that src.left() == dest.left() and src.top() == dest.top().
- See also:
- mouseReleaseEvent
Definition at line 579 of file kspread_autofill.cc.
void KSpread::Sheet::borderLeft | ( | Selection * | selectionInfo, | |
const QColor & | _color | |||
) |
Cell* KSpread::Sheet::cellAt | ( | const QPoint & | _point, | |
bool | _scrollbar_update = false | |||
) | [inline] |
- Parameters:
-
_scrollbar_update will change the scrollbar if set to true disregarding whether _column/_row are bigger than m_iMaxRow/m_iMaxColumn. May be overruled by m_bScrollbarUpdates.
Definition at line 1042 of file kspread_sheet.cc.
bool KSpread::Sheet::cellIsPaintDirty | ( | QPoint const & | cell | ) | const |
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 2350 of file kspread_sheet.cc.
void KSpread::Sheet::changeNameCellRef | ( | const QPoint & | pos, | |
bool | fullRowOrColumn, | |||
ChangeRef | ref, | |||
QString | tabname, | |||
int | NbCol = 1 , |
|||
UndoInsertRemoveAction * | undo = 0 | |||
) |
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 tabname completes the pos specification by giving the sheet name undo is the handler of the undo class in case of lost cell references
Definition at line 2781 of file kspread_sheet.cc.
void KSpread::Sheet::checkRangeHBorder | ( | int | _column | ) |
Checks if the argument _column is out of the current maximum range of the vertical border If this is the case, the current maximum value m_iMaxColumn is adjusted and the vertical border is resized.
Use this function with care, as it involves a repaint of the border, when it is out of range.
Definition at line 8149 of file kspread_sheet.cc.
void KSpread::Sheet::checkRangeVBorder | ( | int | _row | ) |
Checks if the argument _row is out of the current maximum range of the horizontal border If this is the case, the current maximum value m_iMaxRow is adjusted and the horizontal border is resized.
Use this function with care, as it involves a repaint of the border, when it is out of range.
Definition at line 8158 of file kspread_sheet.cc.
void KSpread::Sheet::clearPaintDirtyData | ( | ) |
void KSpread::Sheet::clearTextSelection | ( | Selection * | selectionInfo | ) |
- Parameters:
-
_marker is used if there is no selection currently. In this case the cell on which the marker is will be cleared.
Definition at line 4603 of file kspread_sheet.cc.
- Returns:
- the left corner of the column as int.
- Parameters:
-
_canvas If not 0 then the returned position is in screen coordinates. Otherwise the point (0|0) is in the upper left corner of the sheet.
Definition at line 966 of file kspread_sheet.cc.
QString KSpread::Sheet::copyAsText | ( | Selection * | selection | ) |
- Parameters:
-
x1,y1,: values from source cell, x2,y2,: values from target cell cpFormat,: if true: cell format gets copied, too
Definition at line 3842 of file kspread_sheet.cc.
void KSpread::Sheet::copySelection | ( | Selection * | selectionInfo | ) |
- Parameters:
-
_marker is used if there is no selection currently. In this case the cell on which the marker is will be copied.
Definition at line 5060 of file kspread_sheet.cc.
void KSpread::Sheet::cutSelection | ( | Selection * | selectionInfo | ) |
- Parameters:
-
_marker is used if there is no selection currently. In this case the cell on which the marker is will be cut.
Definition at line 5079 of file kspread_sheet.cc.
- 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:
-
_canvas If not 0 then the returned position is in screen coordinates. Otherwise the point (0|0) is in the upper left corner of the sheet.
Definition at line 946 of file kspread_sheet.cc.
- 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:
-
_canvas If not 0 then the returned position is in screen coordinates. Otherwise the point (0|0) is in the upper top corner of the sheet.
Definition at line 972 of file kspread_sheet.cc.
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
- See also:
- loadCells
Definition at line 5544 of file kspread_sheet.cc.
void KSpread::Sheet::deleteSelection | ( | Selection * | selectionInfo, | |
bool | undo = true | |||
) |
- Parameters:
-
_marker is used if there is no selection currently. In this case the cell on which the marker is will be deleted.
Definition at line 5611 of file kspread_sheet.cc.
KSpread::DependencyManager * KSpread::Sheet::dependencies | ( | ) |
const QPen & KSpread::Sheet::emptyPen | ( | ) | const |
Needed for Cell::leftBorderPen and friends, since we can not have a static pen object.
The returned pen has pen style NoPen set.
Definition at line 744 of file kspread_sheet.cc.
void Sheet::fillSequence | ( | QPtrList< Cell > & | _srcList, | |
QPtrList< Cell > & | _destList, | |||
QPtrList< AutoFillSequence > & | _seqList, | |||
bool | down = true | |||
) | [protected] |
Sheet * KSpread::Sheet::findSheet | ( | const QString & | _name | ) |
A convenience function that finds a sheet by its name.
Definition at line 7824 of file kspread_sheet.cc.
Cell * KSpread::Sheet::firstCell | ( | ) | const |
- Returns:
- the first cell of this sheet. Next cells can be retrieved by calling Cell::nextCell.
Definition at line 1018 of file kspread_sheet.cc.
bool KSpread::Sheet::getCellRectangle | ( | const QRect & | _range, | |
QPtrList< Cell > & | _list | |||
) |
Used by the 'chart' to get the sheet on which the chart is build.
The cells we are interested in are in the rectangle '_range'. The cells are stored row after row in '_list'.
Retrieve the first used cell in a given column.
Can be used in conjunction with getNextCellDown to loop through a column.
- Parameters:
-
col The column to get the first cell from
- Returns:
- Returns a pointer to the cell, or NULL if there are no used cells in this column
Definition at line 8241 of file kspread_sheet.cc.
Retrieve the first used cell in a given row.
Can be used in conjunction with getNextCellRight to loop through a row.
- Parameters:
-
row The row to get the first cell from
- Returns:
- Returns a pointer to the cell, or NULL if there are no used cells in this row
Definition at line 8247 of file kspread_sheet.cc.
Retrieve the last used cell in a given column.
Can be used in conjunction with getNextCellUp to loop through a column.
- Parameters:
-
col The column to get the cell from
- Returns:
- Returns a pointer to the cell, or NULL if there are no used cells in this column
Definition at line 8244 of file kspread_sheet.cc.
Retrieve the last used cell in a given row.
Can be used in conjunction with getNextCellLeft to loop through a row.
- Parameters:
-
row The row to get the last cell from
- Returns:
- Returns a pointer to the cell, or NULL if there are no used cells in this row
Definition at line 8250 of file kspread_sheet.cc.
Retrieves the next used cell below the given col/row pair.
The given col/row pair does not need to reference a used cell.
- Parameters:
-
col column to start looking through row the row below which to start looking.
- Returns:
- Returns the next used cell below this one, or NULL if there are none
Definition at line 8256 of file kspread_sheet.cc.
Retrieves the next used cell to the right of the given col/row pair.
The given col/row pair does not need to reference a used cell.
- Parameters:
-
col the column after which should be searched row the row to search through
- Returns:
- Returns the next used cell to the right of this one, or NULL if there are none
Definition at line 8259 of file kspread_sheet.cc.
Retrieves the next used cell to the left of the given col/row pair.
The given col/row pair does not need to reference a used cell.
- Parameters:
-
col the column before which should be searched row the row to search through
- Returns:
- Returns the next used cell to the left of this one, or NULL if there are none
Definition at line 8262 of file kspread_sheet.cc.
Retrieves the next used cell above the given col/row pair.
The given col/row pair does not need to reference a used cell.
- Parameters:
-
col column to start looking through row the row above which to start looking.
- Returns:
- Returns the next used cell above this one, or NULL if there are none
Definition at line 8253 of file kspread_sheet.cc.
KoRect KSpread::Sheet::getRealRect | ( | bool | all | ) |
get the rect for the objects
- Parameters:
-
all true if the rect for all objects shoud be returned false if only the rect for selected objects sould be returned
- Returns:
- rect of the objects
Definition at line 6108 of file kspread_sheet.cc.
QPtrList< EmbeddedObject > KSpread::Sheet::getSelectedObjects | ( | ) |
Get a list of all selected objects.
- Returns:
- list of selected objets.
Definition at line 6093 of file kspread_sheet.cc.
bool KSpread::Sheet::getShowCommentIndicator | ( | ) | const |
bool KSpread::Sheet::getShowFormula | ( | ) | const |
Sets, if formula shall be shown instead of the result.
Definition at line 490 of file kspread_sheet.cc.
bool KSpread::Sheet::getShowFormulaIndicator | ( | ) | const |
Sets, if indicator must be shown when the cell holds a formula.
Definition at line 500 of file kspread_sheet.cc.
bool KSpread::Sheet::getShowGrid | ( | ) | const |
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 4234 of file kspread_sheet.cc.
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 4260 of file kspread_sheet.cc.
void KSpread::Sheet::hideColumn | ( | const Region & | ) |
void KSpread::Sheet::hideRow | ( | const Region & | ) |
void KSpread::Sheet::insertCell | ( | Cell * | _cell | ) |
Inserts the _cell
into the sheet.
All cells depending on this cell will be actualized. The border range will be actualized, when the cell is out of current range.
Definition at line 7833 of file kspread_sheet.cc.
Moves all columns which are >= col
one position to the right and inserts a new and empty column.
After this the sheet is redrawn. nbCol is the number of column which are installing
Definition at line 2511 of file kspread_sheet.cc.
void KSpread::Sheet::insertColumnFormat | ( | ColumnFormat * | _l | ) |
bool KSpread::Sheet::insertPicture | ( | const KoPoint & | point, | |
const QPixmap & | pixmap | |||
) |
Creates a new embedded picture object and inserts it into the sheet at the specified position.
- Parameters:
-
point The top-left position for the new picture object in the sheet pixmap The source pixmap for the new picture
Definition at line 8023 of file kspread_sheet.cc.
bool KSpread::Sheet::insertPicture | ( | const KoPoint & | point, | |
const KURL & | file | |||
) |
Creates a new embedded picture object and inserts it into the sheet next to the currently selected cell.
TODO: Remove this method in future and provide a better way of opening pictures and inserting them into the sheet.
- Parameters:
-
file The URL of the file to insert. point The the top-left point in the sheet where the picture should be inserted.
Definition at line 7977 of file kspread_sheet.cc.
Moves all rows which are >= row
one position down and inserts a new and empty row.
After this the sheet is redrawn.
Definition at line 2554 of file kspread_sheet.cc.
void KSpread::Sheet::insertRowFormat | ( | RowFormat * | _l | ) |
bool KSpread::Sheet::isHidden | ( | ) | const |
bool KSpread::Sheet::isRightToLeft | ( | ) | const |
bool KSpread::Sheet::isShowPageBorders | ( | ) | const |
- Returns:
- a flag that indicates whether the sheet should paint the page breaks.
- See also:
- setShowPageBorders
bShowPageBorders
Definition at line 583 of file kspread_sheet.cc.
Sheet::LayoutDirection KSpread::Sheet::layoutDirection | ( | ) | const |
bool KSpread::Sheet::loadChildren | ( | KoStore * | _store | ) | [virtual] |
bool KSpread::Sheet::loadColumnFormat | ( | const QDomElement & | row, | |
const KoOasisStyles & | oasisStyles, | |||
int & | indexCol, | |||
const QDict< Style > & | styleMap | |||
) | [protected] |
Loads the properties of a column from a table:table-column element in an OASIS XML file defaultColumnCellStyles is a map from column indicies to the default cell style for that column.
Definition at line 6686 of file kspread_sheet.cc.
bool KSpread::Sheet::loadSelection | ( | const QDomDocument & | 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 | |||
) |
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 5234 of file kspread_sheet.cc.
bool KSpread::Sheet::loadXML | ( | const QDomElement & | ) | [virtual] |
Loads the sheet and all it's children in XML format.
Definition at line 7433 of file kspread_sheet.cc.
int KSpread::Sheet::maxColumn | ( | ) | const |
Return the currently maximum defined column of the horizontal scrollbar.
It's always 10 times higher than the maximum access column. In an empty sheet it starts with 256.
Definition at line 734 of file kspread_sheet.cc.
int KSpread::Sheet::maxRow | ( | ) | const |
Return the currently maximum defined row of the vertical scrollbar.
It's always 10 times higher than the maximum access row. In an empty sheet it starts with 256.
Definition at line 739 of file kspread_sheet.cc.
void KSpread::Sheet::mergeCells | ( | const Region & | region, | |
bool | hor = false , |
|||
bool | ver = false | |||
) |
- Parameters:
-
region the region to merge hor merge horizontally ver merge vertically
Definition at line 5704 of file kspread_sheet.cc.
Cell * KSpread::Sheet::nonDefaultCell | ( | int | _column, | |
int | _row, | |||
bool | _scrollbar_update = false , |
|||
Style * | _style = 0 | |||
) |
If no special Cell exists for this position then a new one is created.
- Parameters:
-
_scrollbar_update will change the scrollbar if set to true disregarding whether _column/_row are bigger than m_iMaxRow/m_iMaxColumn. May be overruled by m_bScrollbarUpdates.
- Returns:
- a non default Cell for the position.
Definition at line 1096 of file kspread_sheet.cc.
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 1066 of file kspread_sheet.cc.
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 1081 of file kspread_sheet.cc.
int KSpread::Sheet::numSelected | ( | ) | const |
Get the amount of selected objects that belong to this sheet.
- Returns:
- the amount of select objects in this sheet
Definition at line 764 of file kspread_sheet.cc.
QPainter & KSpread::Sheet::painter | ( | ) |
- Returns:
- a painter for the hidden widget ( widget ).
Definition at line 688 of file kspread_sheet.cc.
void KSpread::Sheet::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 | |||
) |
A convenience function which retrieves the data to be pasted from the clipboard.
Definition at line 5100 of file kspread_sheet.cc.
void KSpread::Sheet::pasteTextPlain | ( | QString & | _text, | |
QRect | pasteArea | |||
) |
A function which allows to paste a text plain from the clipboard.
Definition at line 5137 of file kspread_sheet.cc.
void KSpread::Sheet::recalc | ( | ) |
Recalculates the current sheet, if automatic recalculation is enabled.
Definition at line 1229 of file kspread_sheet.cc.
void KSpread::Sheet::recalc | ( | bool | force | ) |
Recalculates the current sheet.
If you want to recalculate EVERYTHING, then call Sheet::setCalcDirtyFlag for all sheets in the m_pMap to make sure that no invalid values in other sheets make you trouble.
Recalc will do nothing if automatic calculation is disabled (via Sheet::setAutoCalc ). unless the force flag is set to true. Automatic recalculation is enabled by default.
- Parameters:
-
force If false, the sheet will be recalculated if automatic calculation is enabled. If true, the sheet will be recalculated regardless of the automatic calculation setting.
Definition at line 1234 of file kspread_sheet.cc.
void KSpread::Sheet::refreshChart | ( | const QPoint & | pos, | |
bool | fullRowOrColumn, | |||
ChangeRef | ref | |||
) |
Update chart when you insert or remove row or column.
- 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 tabname completes the pos specification by giving the sheet name
Definition at line 2723 of file kspread_sheet.cc.
void KSpread::Sheet::refreshMergedCell | ( | ) |
Refresh merged cell when you insert or remove row or column.
Definition at line 2770 of file kspread_sheet.cc.
void KSpread::Sheet::refreshView | ( | const Region & | region | ) |
- Returns:
- the top corner of the row as int.
- Parameters:
-
_canvas If not 0 then the returned position is in screen coordinates. Otherwise the point (0|0) is in the upper top corner of the sheet.
Definition at line 993 of file kspread_sheet.cc.
QDomDocument KSpread::Sheet::saveCellRegion | ( | const Region & | , | |
bool | copy = false , |
|||
bool | era = false | |||
) |
- See also:
- copy
- 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 5767 of file kspread_sheet.cc.
bool KSpread::Sheet::saveChildren | ( | KoStore * | _store, | |
const QString & | _path | |||
) | [virtual] |
QDomElement KSpread::Sheet::saveXML | ( | QDomDocument & | ) | [virtual] |
Saves the sheet and all it's children in XML format.
Definition at line 5902 of file kspread_sheet.cc.
void KSpread::Sheet::setCalcDirtyFlag | ( | ) |
Sets the Cell::calcDirtyFlag in all cells.
That means that the cells are marked dirty and will recalculate if requested. This function does only MARK, it does NOT actually calculate. Use recalc to recaculate dirty values.
Definition at line 1207 of file kspread_sheet.cc.
void KSpread::Sheet::setHidden | ( | bool | hidden | ) |
void KSpread::Sheet::setLayoutDirection | ( | 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 460 of file kspread_sheet.cc.
void KSpread::Sheet::setLayoutDirtyFlag | ( | ) |
void KSpread::Sheet::setRegionPaintDirty | ( | QRect const & | range | ) |
set a region of the spreadsheet to be 'paint dirty' meaning it needs repainted.
This is not a flag on the cell itself since quite often this needs set on a default cell
Definition at line 8328 of file kspread_sheet.cc.
change string to upper case if _type equals 1 or change string to lower if _type equals -1
Definition at line 1802 of file kspread_sheet.cc.
bool KSpread::Sheet::setSheetName | ( | const QString & | name, | |
bool | init = false , |
|||
bool | makeUndo = true | |||
) |
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:
-
init If set to true then no formula will be changed and no signal will be emitted and no undo action created. Usually you dont want to do that.
- Returns:
- false if the sheet could not be renamed. Usually the reason is that this name is already used.
- See also:
- changeCellTabName
TabBar::renameTab
Definition at line 8195 of file kspread_sheet.cc.
void KSpread::Sheet::setShowCommentIndicator | ( | bool | b | ) |
If b is true, comment indicator is visible, otherwise it will be hidden.
Definition at line 515 of file kspread_sheet.cc.
void KSpread::Sheet::setShowGrid | ( | bool | _showGrid | ) |
void KSpread::Sheet::setShowPageBorders | ( | bool | _b | ) |
Turns the page break lines on or off.
- See also:
- isShowPageBorders
bShowPageBorders
Definition at line 7801 of file kspread_sheet.cc.
Sets the contents of the cell at row,column to text.
Definition at line 1125 of file kspread_sheet.cc.
QString KSpread::Sheet::sheetName | ( | ) | const |
Return the name of this sheet.
bool KSpread::Sheet::shiftRow | ( | const QRect & | _rect, | |
bool | makeUndo = true | |||
) |
Moves all cells of the row _marker.y() which are in the column _marker.x() or right hand of that one position to the right.
- Returns:
- true if the shift was possible, or false otherwise. A reason for returning false is that there was a cell in the right most position.
Definition at line 2375 of file kspread_sheet.cc.
void KSpread::Sheet::sig_nameChanged | ( | Sheet * | sheet, | |
const QString & | old_name | |||
) | [signal] |
- See also:
- setSheetName
void KSpread::Sheet::sig_polygonInvalidated | ( | const QPointArray & | ) | [signal] |
Emitted if a certain area of some sheet has to be redrawn.
That is for example the case when a new child is inserted.
double KSpread::Sheet::sizeMaxX | ( | ) | const |
double KSpread::Sheet::sizeMaxY | ( | ) | const |
void KSpread::Sheet::slotAreaModified | ( | const QString & | name | ) | [protected, slot] |
react on modification (add/remove) of a named area
Definition at line 2305 of file kspread_sheet.cc.
QString KSpread::Sheet::tableName | ( | ) | const [inline] |
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 5509 of file kspread_sheet.cc.
bool KSpread::Sheet::testListChoose | ( | Selection * | selectionInfo | ) |
Return true if there are text value in cell so you can create list selection.
Definition at line 5735 of file kspread_sheet.cc.
void KSpread::Sheet::unifyObjectName | ( | EmbeddedObject * | object | ) |
Create a uniq name for an object.
Create a uniq name for the object. If no name is set for the object a name according to its type is created. If the name already exists append ' (x)'. // FIXME: not allowed by I18N
- Parameters:
-
object to work on
Definition at line 6207 of file kspread_sheet.cc.
void KSpread::Sheet::update | ( | ) |
void KSpread::Sheet::updateAllDependencies | ( | ) | [protected] |
Calculates the cell if necessary, makes its layout if necessary, and force redraw.
Then it sets the cell's Cell::m_bDisplayDirtyFlag to false.
Definition at line 7873 of file kspread_sheet.cc.
void KSpread::Sheet::updateCellArea | ( | const Region & | cellArea | ) |
Like updateCell except it works on a range of cells.
Use this function rather than calling updateCell(..) on several adjacent cells so there will be one paint event instead of several
Definition at line 7865 of file kspread_sheet.cc.
void KSpread::Sheet::updateView | ( | Region * | ) |
void KSpread::Sheet::updateView | ( | QRect const & | rect | ) |
void KSpread::Sheet::updateView | ( | ) |
void KSpread::Sheet::valueChanged | ( | Cell * | cell | ) |
handles the fact that a cell has been changed - updates things that need to be updated
Definition at line 1284 of file kspread_sheet.cc.
- Returns:
- the pointer to the cell that is visible at a certain position. That means If the cell at this position is obscured then the obscuring cell is returned.
- Parameters:
-
_scrollbar_update will change the scrollbar if set to true disregarding whether _column/_row are bigger than m_iMaxRow/m_iMaxColumn. May be overruled by m_bScrollbarUpdates.
Definition at line 1009 of file kspread_sheet.cc.
QWidget * KSpread::Sheet::widget | ( | ) | const |
The documentation for this class was generated from the following files: