KoDocument.h
411 virtual void paintChildren( TQPainter &painter, const TQRect &rect, KoView *view, double zoomX = 1.0, double zoomY = 1.0 );
455 enum InitDocFlags { InitDocAppStarting, InitDocFileNew, InitDocFileClose, InitDocEmbedded, InitDocEmpty };
591 static TQDomDocument createDomDocument( const TQString& appName, const TQString& tagName, const TQString& version );
virtual TQWidget * widget()
PartManager * manager() const
virtual Part * hitTest(TQWidget *widget, const TQPoint &globalPos)
virtual bool openURL(const KURL &url)
TQString m_file
KURL m_url
virtual bool openFile()=0
KURL url() const
virtual void setReadWrite(bool readwrite=true)
virtual bool saveFile()=0
bool isModified() const
virtual void setModified()
virtual TDEInstance * instance() const
TDEAction * action(const char *name) const
virtual TQDomDocument domDocument() const
KoChild is an abstract base class that represents the geometry associated with an embedded document.
Definition KoChild.h:42
KoDocument(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, bool singleViewMode=false)
Constructor.
Definition KoDocument.cpp:224
virtual void openTemplate(const TQString &file)
This slot loads a template and deletes the start up widget.
Definition KoDocument.cpp:2581
static TQString tagNameToDocumentType(const TQString &localName)
The first thing to do in loadOasis is get hold of the office:body tag, then its child.
Definition KoDocument.cpp:2511
void resetURL()
Sets the document URL to empty URL KParts doesn't allow this, but KOffice apps have e....
Definition KoDocument.h:818
KoView * hitTestView()
Temporary API for accessing the view that calls hitTest.
Definition KoDocument.cpp:716
virtual TQDomDocument saveXML()
Reimplement this to save the contents of the KOffice document into a TQDomDocument.
Definition KoDocument.cpp:2182
bool isAutoErrorHandlingEnabled() const
Checks whether error message boxes should be shown.
Definition KoDocument.cpp:537
virtual int supportedSpecialFormats() const
Return the set of SupportedSpecialFormats that the application wants to offer in the "Save" file dial...
Definition KoDocument.cpp:2311
virtual TQWidget * createCustomDocumentWidget(TQWidget *parent)
Override this method in your derived class to show a widget in the startup 'dialog'.
Definition KoDocument.cpp:2654
virtual bool loadOasis(const TQDomDocument &doc, KoOasisStyles &oasisStyles, const TQDomDocument &settings, KoStore *store)=0
Reimplement this method to load the contents of your KOffice document, from the XML document ("conten...
virtual bool loadNativeFormat(const TQString &file)
Loads a document in the native format from a given URL.
Definition KoDocument.cpp:1651
bool checkAutoSaveFile()
Called by koApplication to check for an autosave file in $HOME.
Definition KoDocument.cpp:1293
virtual bool completeLoading(KoStore *store)
Overload this function if you have to load additional files from a store.
Definition KoDocument.cpp:2120
virtual void paintChildren(TQPainter &painter, const TQRect &rect, KoView *view, double zoomX=1.0, double zoomY=1.0)
Paints all of the documents children into the given painter object.
Definition KoDocument.cpp:790
KoView * createView(TQWidget *parent=0, const char *name=0)
Create a new view for the document.
Definition KoDocument.cpp:318
void setMimeType(const TQCString &mimeType)
Sets the mime type for the document.
Definition KoDocument.cpp:479
static TQCString readNativeFormatMimeType(TDEInstance *instance=0)
Used by KoApplication, and by KoMainWindow, when no document exists yet.
Definition KoDocument.cpp:2247
void setAutoErrorHandlingEnabled(bool b)
Set whether the next openURL call should show error message boxes in case of errors.
Definition KoDocument.cpp:532
virtual TQStringList extraNativeMimeTypes() const
Returns a list of the mimetypes considered "native", i.e.
Definition KoDocument.cpp:2299
virtual bool saveChildren(KoStore *store)
Saves all internal children (only!).
Definition KoDocument.cpp:880
bool isNativeFormat(const TQCString &mimetype) const
Checks whether a given mimetype can be handled natively.
Definition KoDocument.cpp:2292
TQString & file()
Only use these functions to restore m_file (in KoMainWindow) after a failed save (remember to use set...
Definition KoDocument.h:846
static TQStringList readExtraNativeMimeTypes(TDEInstance *instance=0)
Used by KoMainWindow, when no document exists yet.
Definition KoDocument.cpp:2268
virtual bool saveOasis(KoStore *store, KoXmlWriter *manifestWriter)=0
Reimplement this method to save the contents of your KOffice document, using the OASIS format.
void showSavingErrorDialog()
Show the last error message in a message box.
Definition KoDocument.cpp:2366
void unitChanged(KoUnit::Unit)
This signal is emitted when the unit is changed by setUnit() It is common to connect views to it,...
virtual bool initDoc(InitDocFlags flags, TQWidget *parentWidget=0)=0
Initializes an empty document (display the template dialog!).
virtual TQPixmap generatePreview(const TQSize &size)
Generates a preview picture of the document.
Definition KoDocument.cpp:1218
void emitProgress(int value)
Signal the progress of operations such as loading or saving.
Definition KoDocument.h:730
static void setupXmlReader(TQXmlSimpleReader &reader, bool namespaceProcessing=false)
setup the XML reader, so that we don't have to duplicate the code.
Definition KoDocument.cpp:2276
TQCString nativeOasisMimeType() const
Returns the OASIS OpenDocument mimetype of the document, if supported This comes from the X-TDE-Nativ...
Definition KoDocument.cpp:2213
virtual bool saveNativeFormat(const TQString &file)
Saves the document in native format, to a given file You should never have to reimplement.
Definition KoDocument.cpp:954
void childChanged(KoDocumentChild *child)
This signal is emitted when a direct or indirect child document changes and needs to be updated in al...
bool isSingleViewMode() const
Tells whether this document is in singleview mode.
Definition KoDocument.cpp:308
void setErrorMessage(const TQString &errMsg)
Sets the error message to be shown to the user (use i18n()!) when loading or saving fails.
Definition KoDocument.cpp:2356
TQDomDocument createDomDocument(const TQString &tagName, const TQString &version) const
Return a correctly created TQDomDocument for this KoDocument, including processing instruction,...
Definition KoDocument.cpp:2130
virtual void paintChild(KoDocumentChild *child, TQPainter &painter, KoView *view, double zoomX=1.0, double zoomY=1.0)
Paint a given child.
Definition KoDocument.cpp:802
bool confirmNonNativeSave(const bool exporting) const
Returns true if this document was the result of opening a foreign file format and if the user hasn't ...
Definition KoDocument.cpp:500
virtual void paintContent(TQPainter &painter, const TQRect &rect, bool transparent=false, double zoomX=1.0, double zoomY=1.0)=0
Paints the data itself.
virtual bool completeSaving(KoStore *store)
If you want to write additional files to a store, then you must do it here.
Definition KoDocument.cpp:2125
void setCheckAutoSaveFile(bool b)
Set whether the next openURL call should check for an auto-saved file and offer to open it.
Definition KoDocument.cpp:527
static int defaultAutoSave()
Retrieve the default value for autosave in seconds.
Definition KoDocument.h:658
virtual void insertChild(KoDocumentChild *child)
Inserts the new child in the list of children and emits the childChanged() signal.
Definition KoDocument.cpp:653
void setAutoSave(int delay)
Activate/deactivate/configure the autosave feature.
Definition KoDocument.cpp:620
virtual TQCString nativeFormatMimeType() const
To be preferred when a document exists.
Definition KoDocument.cpp:2197
virtual bool loadXML(TQIODevice *, const TQDomDocument &doc)=0
Reimplement this method to load the contents of your KOffice document, from the XML document.
bool exp0rt(const KURL &url)
Saves the document as url without changing the state of the KoDocument (URL, modified flag etc....
Definition KoDocument.cpp:325
void setURL(const KURL &url)
Sets the document URL to url KParts doesn't really allow this, but it is needed for undo of setStoreI...
Definition KoDocument.h:836
void setOutputMimeType(const TQCString &mimeType, int specialOutputFlag=0)
Set the format in which the document should be saved.
Definition KoDocument.cpp:484
virtual void paintEverything(TQPainter &painter, const TQRect &rect, bool transparent=false, KoView *view=0L, double zoomX=1.0, double zoomY=1.0)
Paints the whole document into the given painter object.
Definition KoDocument.cpp:784
bool isAutosaving() const
Checks whether the document is currently in the process of autosaving.
Definition KoDocument.cpp:2390
static KService::Ptr readNativeService(TDEInstance *instance=0)
With the help of instance or TDEApplication::instance() this method figures out which ....
Definition KoDocument.cpp:2223
virtual void showStartUpWidget(KoMainWindow *parent, bool alwaysShow=false)
Creates and shows the start up widget.
Definition KoDocument.cpp:2548
void setFile(const TQString &file)
Only use these functions to restore m_file (in KoMainWindow) after a failed save (remember to use set...
Definition KoDocument.h:856
virtual bool saveChildrenOasis(KoStore *store, KoXmlWriter *manifestWriter)
Saves all internal children (only!), to the store, using the OASIS format.
Definition KoDocument.cpp:904
virtual void setTitleModified()
Tells the document that its title has been modified, either because the modified status changes (this...
Definition KoDocument.cpp:2078
static KoXmlWriter * createOasisXmlWriter(TQIODevice *dev, const char *rootElementName)
Return an XML writer for saving Oasis XML into the device dev, including the XML processing instructi...
Definition KoDocument.cpp:2150
void showLoadingErrorDialog()
Show the last error message in a message box.
Definition KoDocument.cpp:2378
virtual void openExistingFile(const TQString &file)
This slot loads an existing file and deletes the start up widget.
Definition KoDocument.cpp:2571
Repository of styles used during loading of OASIS/OOo file.
Definition KoOasisStyles.h:38
A class for writing out XML (to any TQIODevice), with a special attention on performance.
Definition KoXmlWriter.h:37
This structure defines the page layout, including its size in pt, its format (e.g.
Definition KoPageLayout.h:161
