Public Member Functions | List of all members
idoc::IDocumentTemplate Class Referenceabstract

Common interface for a document template. More...

#include <IDocumentTemplate.h>

Inheritance diagram for idoc::IDocumentTemplate:
idoc::IDocumentTypesInfo istd::IPolymorphic idoc::CCompositeDocumentTemplateComp idoc::CSingleDocumentTemplateBase idoc::CSingleDocumentTemplateComp iqtdoc::CExtendedDocumentTemplateComp

Public Member Functions

virtual Ids GetViewTypeIds (const QByteArray &documentTypeId) const =0
 Return supported view type IDs for specified document type. More...
 
virtual QString GetViewTypeName (const QByteArray &documentTypeId, const QByteArray &viewTypeId) const =0
 Get human readable name of some view type ID. More...
 
virtual ifile::IFilePersistenceGetFileLoader (const QByteArray &documentTypeId) const =0
 Get file loader/saver for spacified document ID. More...
 
virtual istd::IChangeableCreateDocument (QByteArray &documentTypeId, bool initialize=true, bool beQuiet=false, bool *ignoredFlagPtr=NULL) const =0
 Creates a document instance for document type documentTypeId. More...
 
virtual istd::IPolymorphicCreateView (const QByteArray &documentTypeId, istd::IChangeable *documentPtr, const QByteArray &viewTypeId=QByteArray()) const =0
 Creates a view instance for document document of type viewTypeId. More...
 
virtual idoc::IUndoManagerCreateUndoManager (const QByteArray &documentTypeId, istd::IChangeable *documentPtr) const =0
 Creates an undo manger for a given document documentPtr. More...
 
- Public Member Functions inherited from idoc::IDocumentTypesInfo
virtual bool IsFeatureSupported (int featureFlags, const QByteArray &documentTypeId) const =0
 Return true, if the feature(s) is supported by this document template. More...
 
virtual Ids GetDocumentTypeIds () const =0
 Get list of supported document ID's can be created for specified file. More...
 
virtual QString GetDocumentTypeName (const QByteArray &documentTypeId) const =0
 Get human readable name of some document type ID. More...
 
virtual ifile::IFileTypeInfoGetDocumentFileTypeInfo (const QByteArray &documentTypeId) const =0
 Get file type information object for some selected document type. More...
 
virtual Ids GetDocumentTypeIdsForFile (const QString &filePath) const =0
 Get list of supported document ID's can be created for specified file. More...
 
virtual QString GetDefaultDirectory (const QString &sugestedDir="", const QByteArray *documentTypeIdPtr=NULL) const =0
 Return default directory for specified document type. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Additional Inherited Members

- Public Types inherited from idoc::IDocumentTypesInfo
enum  SupportedFeatures { SF_NEW_DOCUMENT = 0x0001, SF_EDIT_DOCUMENT = 0x0010, SF_DEFAULT = 0xffff }
 Enumeration for supported types of operation with the document. More...
 
typedef QVector< QByteArray > Ids
 

Detailed Description

Common interface for a document template.

Document template provides all necessary functionality for creating and controling data model of a document, its persistence and its representation (view).

Definition at line 26 of file IDocumentTemplate.h.

Member Function Documentation

virtual istd::IChangeable* idoc::IDocumentTemplate::CreateDocument ( QByteArray &  documentTypeId,
bool  initialize = true,
bool  beQuiet = false,
bool *  ignoredFlagPtr = NULL 
) const
pure virtual

Creates a document instance for document type documentTypeId.

Parameters
documentTypeIdID of document type, can be empty for default document. If document type is undefined (empty), this field will be used to return ID of used type.
initializeIf true, document should be filled with initial data (operation new), otherwise initialization is not needed (e.g. for document loading - filling of data will be done by loader).
ignoredFlagPtroptional output flag indicating that the user canceled this operation.

Implemented in idoc::CCompositeDocumentTemplateComp, and idoc::CSingleDocumentTemplateComp.

virtual idoc::IUndoManager* idoc::IDocumentTemplate::CreateUndoManager ( const QByteArray &  documentTypeId,
istd::IChangeable documentPtr 
) const
pure virtual

Creates an undo manger for a given document documentPtr.

Parameters
documentTypeIdID of document type.
documentPtrpointer to document object.
Returns
pointer to created instance of undo manager or NULL, if creating of undo manager was impossible.

Implemented in idoc::CCompositeDocumentTemplateComp, and idoc::CSingleDocumentTemplateComp.

virtual istd::IPolymorphic* idoc::IDocumentTemplate::CreateView ( const QByteArray &  documentTypeId,
istd::IChangeable documentPtr,
const QByteArray &  viewTypeId = QByteArray() 
) const
pure virtual

Creates a view instance for document document of type viewTypeId.

Parameters
documentTypeIdID of document type.
documentPtrpointer to document object.
viewTypeIdoptional ID specifying view type if more view types are supported.

Implemented in idoc::CCompositeDocumentTemplateComp, and idoc::CSingleDocumentTemplateComp.

virtual ifile::IFilePersistence* idoc::IDocumentTemplate::GetFileLoader ( const QByteArray &  documentTypeId) const
pure virtual

Get file loader/saver for spacified document ID.

Parameters
documentTypeIdtype ID of document will be loaded/saved.

Implemented in idoc::CCompositeDocumentTemplateComp, and idoc::CSingleDocumentTemplateComp.

virtual Ids idoc::IDocumentTemplate::GetViewTypeIds ( const QByteArray &  documentTypeId) const
pure virtual

Return supported view type IDs for specified document type.

Parameters
documentTypeIdID of document type.

Implemented in idoc::CSingleDocumentTemplateBase, and idoc::CCompositeDocumentTemplateComp.

virtual QString idoc::IDocumentTemplate::GetViewTypeName ( const QByteArray &  documentTypeId,
const QByteArray &  viewTypeId 
) const
pure virtual

Get human readable name of some view type ID.

Implemented in idoc::CSingleDocumentTemplateBase, and idoc::CCompositeDocumentTemplateComp.


The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy