1
1
/* This file is part of the KDE project
2
Copyright 2010 Marijn Kruisselbrink <m.kruisselbrink@student.tue.nl>
2
3
Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
4
5
This library is free software; you can redistribute it and/or
67
75
* The "embedded document".
68
76
* The Map holds all the document data.
70
class KSPREAD_EXPORT Map : public QObject, public KoDataCenterBase
78
class KSPREAD_EXPORT Map : public QObject, public KoDataCenterBase, public ProtectableObject
75
83
* Created an empty map.
77
explicit Map(Doc* doc, const char* name = 0);
85
explicit Map(DocBase* doc = 0, int syntaxVersion = 1);
80
88
* This deletes all sheets contained in this map.
219
222
bool loadChildren(KoStore* _store);
220
223
bool saveChildren(KoStore* _store);
222
void password(QByteArray & passwd) const;
223
bool isProtected() const;
224
void setProtected(QByteArray const & passwd);
225
bool checkPassword(QByteArray const & passwd) const;
228
226
* The sheet named @p _from is being moved to the sheet @p _to.
229
227
* If @p _before is true @p _from is inserted before (after otherwise)
278
276
* @return index of @p sheet in this map
279
277
* @return @c 0 if the index exceeds the list boundaries
281
int indexOf( Sheet* sheet ) const;
279
int indexOf(Sheet* sheet) const;
284
282
* @return the list of sheets in this map
306
304
bool isLoading() const;
307
* \return the document's syntax version
308
* \ingroup NativeFormat
310
int syntaxVersion() const;
313
* Sets the document's syntax \p version.
314
* \ingroup NativeFormat
316
void setSyntaxVersion(int version);
309
319
* \ingroup OpenDocument
310
320
* \ingroup NativeFormat
311
321
* Creates the loading info, if it does not exist yet.
321
331
void deleteLoadingInfo();
324
* \ingroup Operations
334
* \return the KCompletion object, that allows user input completions.
336
KCompletion &stringCompletion();
339
* Adds \p string to the list of string values in order to be able to
340
* complete user inputs.
342
void addStringCompletion(const QString &string);
326
347
void addDamage(Damage* damage);
350
* Return a pointer to the resource manager associated with the
351
* document. The resource manager contains
352
* document wide resources * such as variable managers, the image
353
* collection and others.
354
* @see KoCanvasBase::resourceManager()
356
KoResourceManager *resourceManager() const;
330
* \ingroup Operations
332
361
void flushDamages();
335
* \ingroup Operations
337
366
void handleDamages(const QList<Damage*>& damages);
369
* Emits the signal commandAdded(QUndoCommand *).
370
* You have to connect the signal to the object holding the undo stack or
371
* any relay object, that propagates \p command to the undo stack.
373
void addCommand(QUndoCommand *command);
341
* \ingroup Operations
343
379
void damagesFlushed(const QList<Damage*>& damages);
382
* Emitted, if a command was added by addCommand(QUndoCommand *).
384
void commandAdded(QUndoCommand *command);
346
387
* Emitted, if a newly created sheet was added to the document.
348
389
void sheetAdded(Sheet* sheet);