KSpreadDoc Class Reference
This class holds the data that makes up a spreadsheet. More...
#include <kspread_doc.h>
Collaboration diagram for KSpreadDoc:

Public Types | |
enum | { STYLE_PAGE = 20, STYLE_COLUMN, STYLE_ROW, STYLE_CELL, STYLE_PAGEMASTER, STYLE_USERSTYLE, STYLE_DEFAULTSTYLE, STYLE_NUMERIC_NUMBER } |
Public Slots | |
void | refreshInterface () |
void | flushDamages () |
Signals | |
void | sig_updateView () |
void | sig_refreshView () |
void | sig_refreshLocale () |
void | sig_addAreaName (const QString &) |
void | sig_removeAreaName (const QString &) |
void | damagesFlushed (const QValueList< KSpread::Damage * > &damages) |
Public Member Functions | |
KSpreadDoc (QWidget *parentWidget=0, const char *widgetName=0, QObject *parent=0, const char *name=0, bool singleViewMode=false) | |
~KSpreadDoc () | |
virtual QCString | mimeType () const |
KLocale * | locale () const |
KSpreadMap * | map () const |
KSpreadStyleManager * | styleManager () const |
KSpread::ValueParser * | parser () const |
KSpread::ValueFormatter * | formatter () const |
KSpread::ValueConverter * | converter () const |
KSpread::ValueCalc * | calc () const |
void | addCommand (KCommand *command) |
void | addCommand (KSpreadUndoAction *command) |
void | undo () |
void | redo () |
void | undoLock () |
void | undoUnlock () |
bool | undoLocked () const |
KoCommandHistory * | commandHistory () |
KoUnit::Unit | unit () const |
KoUnit::Unit | getUnit () const |
void | setUnit (KoUnit::Unit u) |
QString | unitName () const |
QString | getUnitName () const |
int | syntaxVersion () const |
void | setShowVerticalScrollBar (bool b) |
bool | showVerticalScrollBar () const |
bool | getShowVerticalScrollBar () const |
void | setShowHorizontalScrollBar (bool b) |
bool | showHorizontalScrollBar () const |
bool | getShowHorizontalScrollBar () const |
void | setShowColumnHeader (bool b) |
bool | showColumnHeader () const |
void | setShowColHeader (bool b) |
bool | getShowColHeader () const |
void | setShowRowHeader (bool b) |
bool | showRowHeader () const |
bool | getShowRowHeader () const |
void | setGridColor (const QColor &color) |
QColor | gridColor () const |
void | setIndentValue (double val) |
double | indentValue () const |
double | getIndentValue () const |
void | setShowStatusBar (bool b) |
bool | showStatusBar () const |
bool | getShowStatusBar () const |
void | setShowTabBar (bool b) |
bool | showTabBar () const |
bool | getShowTabBar () const |
void | setShowFormulaBar (bool b) |
bool | showFormulaBar () const |
bool | getShowFormulaBar () const |
void | setShowCommentIndicator (bool b) |
bool | showCommentIndicator () const |
bool | getShowCommentIndicator () const |
void | setShowMessageError (bool b) |
bool | showMessageError () const |
bool | getShowMessageError () const |
KGlobalSettings::Completion | completionMode () const |
void | setCompletionMode (KGlobalSettings::Completion _complMode) |
KSpread::MoveTo | getMoveToValue () const |
void | setMoveToValue (KSpread::MoveTo _moveTo) |
void | setTypeOfCalc (MethodOfCalc _calc) |
MethodOfCalc | getTypeOfCalc () const |
void | setKSpellConfig (KSpellConfig _kspell) |
KSpellConfig * | getKSpellConfig () const |
bool | dontCheckUpperWord () const |
void | setDontCheckUpperWord (bool _b) |
bool | dontCheckTitleCase () const |
void | setDontCheckTitleCase (bool _b) |
QColor | pageBorderColor () const |
void | changePageBorderColor (const QColor &_color) |
virtual QDomDocument | saveXML () |
virtual bool | saveOasis (KoStore *store, KoXmlWriter *manifestWriter) |
void | saveOasisDocumentStyles (KoStore *store, KoGenStyles &mainStyles) const |
virtual int | supportedSpecialFormats () const |
virtual bool | loadXML (QIODevice *, const QDomDocument &doc) |
virtual bool | loadOasis (const QDomDocument &doc, KoOasisStyles &oasisStyles, const QDomDocument &settings, KoStore *) |
virtual bool | loadChildren (KoStore *_store) |
QDomElement | saveAreaName (QDomDocument &doc) |
void | saveOasisAreaName (KoXmlWriter &xmlWriter) |
void | loadAreaName (const QDomElement &element) |
void | loadOasisAreaName (const QDomElement &element) |
void | loadOasisCellValidation (const QDomElement &body) |
virtual void | addView (KoView *_view) |
virtual bool | initDoc (InitDocFlags flags, QWidget *parentWidget=0) |
virtual void | setZoomAndResolution (int zoom, int dpiX, int dpiY) |
void | newZoomAndResolution (bool updateViews, bool forPrint) |
KSpreadInterpreter * | interpreter () const |
void | resetInterpreter () |
KSContext & | context () |
void | enableUndo (bool _b) |
void | enableRedo (bool _b) |
bool | isLoading () const |
virtual void | paintContent (QPainter &painter, const QRect &rect, bool transparent=false, double zoomX=1.0, double zoomY=1.0) |
void | paintContent (QPainter &painter, const QRect &rect, bool transparent, KSpreadSheet *sheet, bool drawCursor=true) |
bool | docData (QString const &xmlTag, QDomElement &data) |
void | deregisterPlugin (KSpreadPlugin *plugin) |
void | registerPlugin (KSpreadPlugin *plugin) |
void | paintCellRegions (QPainter &painter, const QRect &viewRect, KSpreadView *view, QValueList< QRect > cellRegions, const KSpreadSheet *sheet, bool drawCursor) |
virtual DCOPObject * | dcopObject () |
void | addAreaName (const QRect &_rect, const QString &name, const QString &sheetName) |
const QValueList< Reference > & | listArea () |
void | removeArea (const QString &name) |
KCompletion & | completion () |
void | addStringCompletion (const QString &stringCompletion) |
void | changeAreaSheetName (const QString &oldName, const QString &sheetName) |
QRect | getRectArea (const QString &_sheetName) |
void | insertChild (KoDocumentChild *child) |
void | initConfig () |
void | saveConfig () |
void | refreshLocale () |
void | emitBeginOperation (bool waitCursor) |
virtual void | emitBeginOperation () |
virtual void | emitEndOperation () |
void | emitEndOperation (QRect const &rect) |
bool | delayCalculation () const |
void | updateBorderButton () |
void | insertSheet (KSpreadSheet *sheet) |
void | takeSheet (KSpreadSheet *sheet) |
void | addIgnoreWordAll (const QString &word) |
void | clearIgnoreWordAll () |
void | addIgnoreWordAllList (const QStringList &_lst) |
QStringList | spellListIgnoreAll () const |
void | setDisplaySheet (KSpreadSheet *_Sheet) |
KSpreadSheet * | displaySheet () const |
KSPLoadingInfo * | loadingInfo () const |
void | increaseNumOperation () |
void | decreaseNumOperation () |
void | addDamage (KSpread::Damage *damage) |
void | loadConfigFromFile () |
bool | configLoadFromFile () const |
Static Public Member Functions | |
static QValueList< KSpreadDoc * > | documents () |
static QString | getAttribute (const QDomElement &element, const char *attributeName, const QString &defaultValue) |
static int | getAttribute (const QDomElement &element, const char *attributeName, int defaultValue) |
static double | getAttribute (const QDomElement &element, const char *attributeName, double defaultValue) |
Protected Slots | |
void | commandExecuted () |
void | documentRestored () |
Protected Member Functions | |
KoView * | createViewInstance (QWidget *parent, const char *name) |
virtual bool | completeLoading (KoStore *) |
virtual bool | saveChildren (KoStore *_store) |
void | initInterpreter () |
void | destroyInterpreter () |
Protected Attributes | |
SavedDocParts | m_savedDocParts |
Properties | |
bool | getShowRowHeader |
bool | getShowColHeader |
double | getIndentValue |
bool | getShowMessageError |
bool | dontCheckUpperWord |
bool | dontCheckTitleCase |
int | syntaxVersion |
bool | showVerticalScrollBar |
bool | showHorizontalScrollBar |
bool | showColumnHeader |
bool | showRowHeader |
bool | showStatusBar |
bool | showFormulaBar |
bool | showTabBar |
Detailed Description
This class holds the data that makes up a spreadsheet.
Definition at line 104 of file kspread_doc.h.
Constructor & Destructor Documentation
|
Creates a new document.
Definition at line 181 of file kspread_doc.cc. References documents(), and initInterpreter(). |
|
Destroys the document.
Definition at line 263 of file kspread_doc.cc. References destroyInterpreter(). |
Member Function Documentation
|
Returns list of all documents.
Definition at line 290 of file kspread_doc.cc. Referenced by KSpreadDoc(). |
|
Returns the MIME type of KSpread document.
Definition at line 147 of file kspread_doc.h. |
|
Adds a command to the command history. The command itself would not be executed. Definition at line 1531 of file kspread_doc.cc. |
|
Undoes the last operation.
Definition at line 1542 of file kspread_doc.cc. |
|
Redoes the last undo.
Definition at line 1547 of file kspread_doc.cc. |
|
Locks the undo buffer.
Definition at line 1562 of file kspread_doc.cc. |
|
Releases lock of undo buffer.
Definition at line 1567 of file kspread_doc.cc. |
|
Returns true if undo buffer is locked.
Definition at line 1572 of file kspread_doc.cc. |
|
Returns the command history for the document. This is used in KSpreadView for updating the actions (i.e through signal KoCommandHistory::commandExecuted) Definition at line 1577 of file kspread_doc.cc. |
|
Returns the unit used to display margins.
Definition at line 1413 of file kspread_doc.cc. |
|
Definition at line 210 of file kspread_doc.h. |
|
Sets the unit used to display margins.
Definition at line 1418 of file kspread_doc.cc. |
|
Returns the name of the unit used to display margins. For example, if unit() returns KoUnit::U_MM, then this functions return "mm". Definition at line 1423 of file kspread_doc.cc. |
|
Definition at line 227 of file kspread_doc.h. |
|
Returns the syntax version of the currently opened file.
|
|
If b is true, vertical scrollbar is visible, otherwise it will be hidden.
Definition at line 1235 of file kspread_doc.cc. |
|
Returns true if vertical scroll bar is visible.
|
|
Definition at line 248 of file kspread_doc.h. |
|
If b is true, horizontal scrollbar is visible, otherwise it will be hidden.
Definition at line 1245 of file kspread_doc.cc. |
|
Returns true if horizontal scroll bar is visible.
|
|
Definition at line 264 of file kspread_doc.h. |
|
If b is true, column header is visible, otherwise it will be hidden.
Definition at line 1260 of file kspread_doc.cc. |
|
Returns true if column header is visible.
|
|
Definition at line 280 of file kspread_doc.h. |
|
Definition at line 285 of file kspread_doc.h. |
|
If b is true, row header is visible, otherwise it will be hidden.
Definition at line 1270 of file kspread_doc.cc. |
|
Returns true if row header is visible.
|
|
Definition at line 301 of file kspread_doc.h. |
|
Sets the color of the grid.
Definition at line 1280 of file kspread_doc.cc. |
|
Returns the color of the grid.
Definition at line 1285 of file kspread_doc.cc. |
|
Sets the indentation value.
Definition at line 1300 of file kspread_doc.cc. |
|
Returns the indentation value.
Definition at line 1295 of file kspread_doc.cc. |
|
Definition at line 326 of file kspread_doc.h. |
|
If b is true, status bar is visible, otherwise it will be hidden.
Definition at line 1305 of file kspread_doc.cc. |
|
Returns true if status bar is visible.
|
|
Definition at line 342 of file kspread_doc.h. |
|
If b is true, tab bar is visible, otherwise it will be hidden.
Definition at line 1315 of file kspread_doc.cc. |
|
Returns true if tab bar is visible.
|
|
Definition at line 358 of file kspread_doc.h. |
|
If b is true, formula bar is visible, otherwise it will be hidden.
Definition at line 1335 of file kspread_doc.cc. |
|
Returns true if formula bar is visible.
|
|
Definition at line 374 of file kspread_doc.h. |
|
If b is true, comment indicator is visible, otherwise it will be hidden.
Definition at line 1325 of file kspread_doc.cc. |
|
Returns true if comment indicator is visible.
Definition at line 1330 of file kspread_doc.cc. |
|
Definition at line 390 of file kspread_doc.h. |
|
If b is true, an error message will pop up whenever error occurs.
Definition at line 1345 of file kspread_doc.cc. |
|
Returns true if error message should pop up whenever error occurs.
Definition at line 1350 of file kspread_doc.cc. |
|
Definition at line 405 of file kspread_doc.h. |
|
completion mode
Definition at line 1255 of file kspread_doc.cc. |
|
Method of calc.
Definition at line 1365 of file kspread_doc.cc. |
|
get custom kspell config
Definition at line 1375 of file kspread_doc.cc. |
|
Change the zoom factor to 150 for 150%) and/or change the resolution, given in DPI. This is done on startup and when printing. The same call combines both so that all the updating done behind the scenes is done only once, even if both zoom and DPI must be changed. Definition at line 1463 of file kspread_doc.cc. |
|
updates all properties after zoom changed
Definition at line 1468 of file kspread_doc.cc. References sig_refreshView(). |
|
Definition at line 459 of file kspread_doc.cc. |
|
Kills the interpreter and creates a new one and reloads all scripts. This is useful if they have been edited and the changes should take effect. Definition at line 1448 of file kspread_doc.cc. References destroyInterpreter(), initInterpreter(), and sig_updateView(). |
|
Definition at line 479 of file kspread_doc.cc. Referenced by initInterpreter(). |
|
Definition at line 464 of file kspread_doc.cc. |
|
Primary entry point for painting. Use this function to paint groups of cells
Definition at line 1691 of file kspread_doc.cc. References KSpreadView::activeSheet(), KSpreadView::canvasWidget(), and KSpreadView::selectionInfo(). |
|
Functions to begin a kspread 'operation'. Calls to emitBeginOperation and emitEndOperation should surround each logical user operation. During the operation, the following should hold true:
The waitCursor parameter specifies whether to put the hourglass up during the operation. Definition at line 2316 of file kspread_doc.cc. |
|
default override of koDocument version. Changes the cursor to an hourglass Definition at line 2333 of file kspread_doc.cc. |
|
Mark the end of an operation and triggers repaints/calculations. See above comment to emitBeginOperation(bool). Definition at line 2339 of file kspread_doc.cc. References CellBinding::cellChanged(). |
|
s.a. difference does only specified tasks and thats why it improves performance significantly. rect normally are the visible cells/the cells that need to be updated. Definition at line 2375 of file kspread_doc.cc. References CellBinding::cellChanged(). |
|
Emitted if all views have to be updated.
Referenced by resetInterpreter(). |
|
Emitted if all interfaces have to be updated.
Referenced by newZoomAndResolution(). |
|
Emitted if we update to locale system.
|
|
Overloaded function of KoDocument.
Definition at line 1194 of file kspread_doc.cc. |
|
Overloaded function of KoDocument.
Definition at line 502 of file kspread_doc.cc. |
|
Initializes the KScript Interpreter.
Definition at line 1478 of file kspread_doc.cc. References context(). Referenced by KSpreadDoc(), and resetInterpreter(). |
|
Destroys the interpreter.
Definition at line 1520 of file kspread_doc.cc. Referenced by resetInterpreter(), and ~KSpreadDoc(). |
The documentation for this class was generated from the following files: