CTmplBasedDocumentManagerBase.h
Go to the documentation of this file.
1 #ifndef idoc_CTmplBasedDocumentManagerBase_included
2 #define idoc_CTmplBasedDocumentManagerBase_included
3 
4 
5 // ACF includes
7 
8 
9 namespace idoc
10 {
11 
12 
13 class IDocumentTemplate;
14 
15 
22 {
23 public:
25 
26  // reimplemented (idoc::IDocumentManager)
27  virtual int GetAllowedOperationFlags(const istd::IPolymorphic* viewPtr = NULL) const;
28 
29  // reimplemented (idoc::IDocumentTypesInfo)
30  virtual bool IsFeatureSupported(int featureFlags, const QByteArray& documentTypeId) const;
31  virtual Ids GetDocumentTypeIds() const;
32  virtual QString GetDocumentTypeName(const QByteArray& documentTypeId) const;
33  virtual ifile::IFileTypeInfo* GetDocumentFileTypeInfo(const QByteArray& documentTypeId) const;
34  virtual Ids GetDocumentTypeIdsForFile(const QString& filePath) const;
35  virtual QString GetDefaultDirectory(const QString& sugestedDir = "", const QByteArray* documentTypeIdPtr = NULL) const;
36 
37 protected:
38  virtual const idoc::IDocumentTemplate* GetDocumentTemplate() const;
39  void SetDocumentTemplate(const idoc::IDocumentTemplate* documentTemplatePtr);
40 
41 private:
42  const IDocumentTemplate* m_documentTemplatePtr;
43 
44  int m_baseAllowedFlags;
45 };
46 
47 
48 } // namespace idoc
49 
50 
51 #endif // idoc_CTmplBasedDocumentManagerBase_included
52 
53 
virtual int GetAllowedOperationFlags(const istd::IPolymorphic *viewPtr=NULL) const
Get flags of allowed operations.
Provide loading and saving of objects.
Definition: IFileTypeInfo.h:22
virtual ifile::IFileTypeInfo * GetDocumentFileTypeInfo(const QByteArray &documentTypeId) const
Get file type information object for some selected document type.
virtual QString GetDocumentTypeName(const QByteArray &documentTypeId) const
Get human readable name of some document type ID.
virtual Ids GetDocumentTypeIds() const
Get list of supported document ID's can be created for specified file.
Base implementation of document manager.
void SetDocumentTemplate(const idoc::IDocumentTemplate *documentTemplatePtr)
virtual bool IsFeatureSupported(int featureFlags, const QByteArray &documentTypeId) const
Return true, if the feature(s) is supported by this document template.
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17
virtual QString GetDefaultDirectory(const QString &sugestedDir="", const QByteArray *documentTypeIdPtr=NULL) const
Return default directory for specified document type.
Provide set of user actions needed to manage documents in MVC (Model View Controller) concept...
Common interface for a document template.
#define NULL
Definition: istd.h:64
QVector< QByteArray > Ids
virtual const idoc::IDocumentTemplate * GetDocumentTemplate() const
virtual Ids GetDocumentTypeIdsForFile(const QString &filePath) const
Get list of supported document ID's can be created for specified file.

© 2007-2017 Witold Gantzke and Kirill Lepskiy