kspread
KSpread::Sheet Class Reference
A sheet contains several cells.
More...
#include <Sheet.h>
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 |
| CellStorage * | cellStorage () const |
| void | changeNameCellRef (const QPoint &pos, bool fullRowOrColumn, ChangeRef ref, const QString &sheetName, int number) |
| bool | checkPassword (QByteArray const &passwd) const |
| const ColumnFormat * | columnFormat (int _column) const |
| double | columnPosition (int col) const |
| const CommentStorage * | commentStorage () const |
| const ConditionsStorage * | conditionsStorage () const |
| QString | copyAsText (Selection *selection) |
| void | copySelection (Selection *selection) |
| void | cutSelection (Selection *selection) |
virtual QMap< QString,
KoDataCenter * > | dataCenterMap () const |
| void | deleteCells (const Region ®ion) |
| void | deleteColumnFormat (int column) |
| void | deleteRowFormat (int row) |
| Doc * | doc () 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 () |
| ColumnFormat * | firstCol () const |
| RowFormat * | firstRow () const |
| const FormulaStorage * | formulaStorage () const |
| const FusionStorage * | fusionStorage () 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 LinkStorage * | linkStorage () 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 &) |
| Map * | map () const |
| ColumnFormat * | nonDefaultColumnFormat (int _column, bool force_creation=true) |
| RowFormat * | nonDefaultRowFormat (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) |
| SheetPrint * | print () const |
| void | printDebug () |
| PrintSettings * | printSettings () 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 RowFormat * | rowFormat (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 ®ion) |
| 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 |
| StyleStorage * | styleStorage () const |
| bool | testAreaPasteInsert () const |
| bool | testListChoose (Selection *selection) |
| int | topRow (double _ypos, double &_top) const |
| void | updateLocale () |
| void | updateView (const Region ®ion) |
| void | updateView () |
| QRect | usedArea () const |
| const ValidityStorage * | validityStorage () const |
| const ValueStorage * | valueStorage () 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 Sheet * | find (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 |
( |
|
) |
|
Member Function Documentation
| void KSpread::Sheet::addShape |
( |
KoShape * |
shape |
) |
[virtual] |
| 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 | |
|
) |
| | |
| 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] |
- 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] |
| bool KSpread::Sheet::checkPassword |
( |
QByteArray const & |
passwd |
) |
const |
| 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:
-
Definition at line 692 of file Sheet.cpp.
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.
| 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:
-
- Returns:
- the cell range covering the area
Definition at line 673 of file Sheet.cpp.
| void KSpread::Sheet::emit_updateColumn |
( |
ColumnFormat * |
columnFormat, |
|
|
int |
_column | |
|
) |
| | |
| void KSpread::Sheet::emit_updateRow |
( |
RowFormat * |
rowFormat, |
|
|
int |
_row, |
|
|
bool |
repaint = true | |
|
) |
| | |
| 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] |
- 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.
| bool KSpread::Sheet::getFirstLetterUpper |
( |
|
) |
const |
| bool KSpread::Sheet::getHideZero |
( |
|
) |
const |
| bool KSpread::Sheet::getLcMode |
( |
|
) |
const |
| bool KSpread::Sheet::getShowColumnNumber |
( |
|
) |
const |
| 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 |
) |
|
| 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 | |
|
) |
| | |
| 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 | |
|
) |
| | |
| void KSpread::Sheet::insertShiftDown |
( |
const QRect & |
rect |
) |
|
| void KSpread::Sheet::insertShiftRight |
( |
const QRect & |
rect |
) |
|
| bool KSpread::Sheet::isAutoCalculationEnabled |
( |
|
) |
const |
| 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 |
| 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 |
| 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 | |
|
) |
| | |
| 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 | |
|
) |
| | |
| 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 |
| 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 | |
|
) |
| | |
| 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.
| void KSpread::Sheet::printDebug |
( |
|
) |
|
| void KSpread::Sheet::removeColumns |
( |
int |
row, |
|
|
int |
numbers | |
|
) |
| | |
| void KSpread::Sheet::removeRows |
( |
int |
row, |
|
|
int |
numbers | |
|
) |
| | |
| void KSpread::Sheet::removeShape |
( |
KoShape * |
shape |
) |
[virtual] |
| void KSpread::Sheet::removeShiftLeft |
( |
const QRect & |
rect |
) |
|
| void KSpread::Sheet::removeShiftUp |
( |
const QRect & |
rect |
) |
|
| 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:
-
Definition at line 702 of file Sheet.cpp.
- 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 |
) |
|
| void KSpread::Sheet::setDefaultHeight |
( |
double |
height |
) |
|
| void KSpread::Sheet::setDefaultWidth |
( |
double |
width |
) |
|
| void KSpread::Sheet::setFirstLetterUpper |
( |
bool |
_firstUpper |
) |
|
| 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 |
) |
|
| 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 |
) |
|
| void KSpread::Sheet::setPrintSettings |
( |
const PrintSettings & |
settings |
) |
|
| void KSpread::Sheet::setProtected |
( |
QByteArray const & |
passwd |
) |
|
| void KSpread::Sheet::setRegionPaintDirty |
( |
const QRect & |
rect |
) |
|
| 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 |
) |
|
| 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 |
) |
|
| void KSpread::Sheet::setShowFormulaIndicator |
( |
bool |
_showFormulaIndicator |
) |
|
| 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 |
) |
|
| QString KSpread::Sheet::sheetName |
( |
|
) |
const |
- Returns:
- the name of this sheet
| void KSpread::Sheet::sig_nameChanged |
( |
Sheet * |
sheet, |
|
|
const QString & |
old_name | |
|
) |
| | [signal] |
| 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] |
| 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 |
( |
|
) |
|
| 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.
| void KSpread::Sheet::visibleSizeChanged |
( |
|
) |
[signal] |
Member Data Documentation
Property Documentation
bool KSpread::Sheet::autoCalc [read, write] |
QString KSpread::Sheet::sheetName [read] |
bool KSpread::Sheet::showGrid [read, write] |
The documentation for this class was generated from the following files:
|