64 TQ_PROPERTY( TQCString dcopObjectId READ dcopObjectId)
65 TQ_PROPERTY(
bool backupFile READ backupFile WRITE setBackupFile )
89 const char* widgetName,
92 bool singleViewMode =
false );
106 bool isSingleViewMode()
const;
111 bool isEmbedded()
const;
145 virtual bool openURL(
const KURL & url );
157 bool import(
const KURL &
url );
169 bool exp0rt(
const KURL &url );
190 static TQCString readNativeFormatMimeType( TDEInstance *instance = 0 );
202 static TQStringList readExtraNativeMimeTypes( TDEInstance *instance = 0 );
209 static KService::Ptr readNativeService( TDEInstance *instance = 0 );
214 static void setupXmlReader( TQXmlSimpleReader& reader,
bool namespaceProcessing =
false );
223 virtual TQCString nativeFormatMimeType()
const;
229 TQCString nativeOasisMimeType()
const;
232 bool isNativeFormat(
const TQCString& mimetype )
const;
236 virtual TQStringList extraNativeMimeTypes()
const;
240 SaveAsDirectoryStore = 2,
249 virtual int supportedSpecialFormats()
const;
254 TQCString mimeType()
const;
262 void setMimeType(
const TQCString & mimeType );
273 void setOutputMimeType(
const TQCString & mimeType,
int specialOutputFlag = 0 );
274 TQCString outputMimeType()
const;
275 int specialOutputFlag()
const;
290 bool confirmNonNativeSave(
const bool exporting )
const;
291 void setConfirmNonNativeSave(
const bool exporting,
const bool on );
293 virtual bool wantExportConfirmation()
const;
301 void setErrorMessage(
const TQString& errMsg );
308 TQString errorMessage()
const;
316 void showSavingErrorDialog();
325 void showLoadingErrorDialog();
330 KoView *createView( TQWidget *parent = 0,
const char *name = 0 );
338 virtual void addView(
KoView *view );
343 virtual void removeView(
KoView *view );
348 const TQPtrList<KoView> & views()
const;
353 int viewCount()
const;
375 virtual KoDocument *
hitTest(
const TQPoint &pos,
const TQWMatrix& matrix = TQWMatrix() );
391 virtual void paintEverything( TQPainter &painter,
const TQRect &rect,
bool transparent =
false,
392 KoView *view = 0L,
double zoomX = 1.0,
double zoomY = 1.0 );
398 virtual TQPixmap generatePreview(
const TQSize& size );
411 virtual void paintChildren( TQPainter &painter,
const TQRect &rect,
KoView *view,
double zoomX = 1.0,
double zoomY = 1.0 );
425 double zoomX = 1.0,
double zoomY = 1.0 );
440 virtual void paintContent( TQPainter &painter,
const TQRect &rect,
bool transparent =
false,
441 double zoomX = 1.0,
double zoomY = 1.0 ) = 0;
446 bool checkAutoSaveFile();
455 enum InitDocFlags { InitDocAppStarting, InitDocFileNew, InitDocFileClose, InitDocEmbedded, InitDocEmpty };
471 virtual void showStartUpWidget(
KoMainWindow* parent,
bool alwaysShow =
false);
484 virtual void setTitleModified();
489 virtual bool isEmpty()
const {
return m_bEmpty; }
509 virtual bool loadFromStore(
KoStore* store,
const TQString& url );
515 virtual bool loadOasisFromStore(
KoStore* store );
522 virtual bool saveToStore(
KoStore* store,
const TQString& path );
532 virtual bool loadXML( TQIODevice *,
const TQDomDocument & doc ) = 0;
541 const TQDomDocument & settings,
KoStore* store ) = 0;
553 virtual TQDomDocument saveXML();
562 TQDomDocument createDomDocument(
const TQString& tagName,
const TQString& version )
const;
581 static KoXmlWriter* createOasisXmlWriter( TQIODevice* dev,
const char* rootElementName );
591 static TQDomDocument createDomDocument(
const TQString& appName,
const TQString& tagName,
const TQString& version );
599 static TQString tagNameToDocumentType(
const TQString& localName );
606 virtual bool saveToStream( TQIODevice * dev );
614 virtual bool loadNativeFormat(
const TQString & file );
621 virtual bool saveNativeFormat(
const TQString & file );
627 void setAutoSave(
int delay );
632 bool isAutosaving()
const;
639 void setCheckAutoSaveFile(
bool b );
646 void setAutoErrorHandlingEnabled(
bool b );
652 bool isAutoErrorHandlingEnabled()
const;
664 const TQPtrList<KoDocumentChild>& children()
const;
679 KoDocumentInfo *documentInfo()
const;
681 void setViewBuildDocument(
KoView *view,
const TQDomDocument &doc );
682 TQDomDocument viewBuildDocument(
KoView *view );
702 const TQPtrList<KoMainWindow>& shells()
const;
707 int shellCount()
const;
712 static TQPtrList<KoDocument> *
documentList() {
return s_documentList; }
725 TQCString dcopObjectId()
const;
732 bool isInOperation()
const;
733 virtual void emitBeginOperation();
734 virtual void emitEndOperation();
740 virtual bool isStoredExtern()
const;
748 virtual KoPageLayout pageLayout(
int pageNumber = 0)
const;
753 void removeAutoSaveFiles();
755 void setBackupFile(
bool _b );
757 bool backupFile()
const;
767 bool isLoading()
const;
769 int queryCloseExternalChildren();
785 void setDoNotSaveExtDoc(
bool on =
true );
790 void setBackupPath(
const TQString & _path );
795 TQString backupPath()
const;
802 void setCurrent(
bool on =
true );
807 void forceCurrent(
bool on );
808 bool isCurrent()
const;
810 void setTitleModified(
const TQString caption,
bool mod );
818 void resetURL() { m_url = KURL(); m_file = TQString(); }
823 void setStoreInternal(
bool i );
828 bool storeInternal()
const;
830 bool hasExternURL()
const;
856 void setFile(
const TQString &file ) { m_file = file; }
861 void setMimeTypeAfterLoading(
const TQString& mimeType );
873 virtual TQValueList<KoTextDocument *> allTextDocuments()
const;
893 TQString unitName()
const;
900 void setTemplateType(
const TQString& _templateType);
906 TQString templateType()
const;
913 virtual bool showEmbedInitDialog(TQWidget* parent);
920 virtual void initEmpty();
960 void sigBeginOperation();
961 void sigEndOperation();
968 void closeEmbedInitDialog();
976 virtual void openExistingFile(
const TQString& file );
982 virtual void openTemplate(
const TQString& file );
984 void deleteOpenPaneDelayed();
988 TQString autoSaveFile(
const TQString & path )
const;
990 virtual KoView *createViewInstance( TQWidget *parent,
const char *name ) = 0;
1020 virtual TQWidget* createCustomDocumentWidget(TQWidget *parent);
1042 virtual bool loadChildren(
KoStore* );
1049 virtual bool saveChildren(
KoStore* store );
1064 virtual bool completeLoading(
KoStore* store );
1076 virtual bool completeSaving(
KoStore* store );
1095 virtual void insertChild(TQObject *o) { TQObject::insertChild(o); }
1104 virtual bool saveExternalChildren();
1111 bool isImporting()
const;
1120 bool isExporting()
const;
1129 KoOpenPane* createOpenPane( TQWidget* parent, TDEInstance* instance,
1130 const TQString& templateType = TQString());
1133 void slotChildChanged(
KoChild *c );
1134 void slotChildDestroyed();
1135 void slotAutoSave();
1136 void slotStarted( TDEIO::Job* );
1137 void startCustomDocument();
1142 void deleteOpenPane();
1145 KService::Ptr nativeService();
1146 bool oldLoadAndParse(
KoStore* store,
const TQString& filename, TQDomDocument& doc );
1147 bool loadNativeFormatFromStore(
const TQString& file );
1148 bool savePreview(
KoStore* store );
1152 KService::Ptr m_nativeService;
1154 static TQPtrList<KoDocument> *s_documentList;
1155 static const int s_defaultAutoSave;
Main window for a KOffice application.
This structure defines the page layout, including its size in pt, its format (e.g.