IDocumentTypesInfo.h
Go to the documentation of this file.
1 #ifndef idoc_IDocumentTypesInfo_included
2 #define idoc_IDocumentTypesInfo_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 #include <QtCore/QVector>
8 
9 // ACF includes
10 #include <ifile/IFileTypeInfo.h>
11 
12 
13 namespace idoc
14 {
15 
16 
21 {
22 public:
23  typedef QVector<QByteArray> Ids;
24 
29  {
33  SF_NEW_DOCUMENT = 0x0001,
34 
38  SF_EDIT_DOCUMENT = 0x0010,
39 
43  SF_DEFAULT = 0xffff
44  };
45 
49  virtual bool IsFeatureSupported(int featureFlags, const QByteArray& documentTypeId) const = 0;
50 
54  virtual Ids GetDocumentTypeIds() const = 0;
55 
60  virtual QString GetDocumentTypeName(const QByteArray& documentTypeId) const = 0;
61 
66  virtual ifile::IFileTypeInfo* GetDocumentFileTypeInfo(const QByteArray& documentTypeId) const = 0;
67 
71  virtual Ids GetDocumentTypeIdsForFile(const QString& filePath) const = 0;
72 
78  virtual QString GetDefaultDirectory(const QString& sugestedDir = "", const QByteArray* documentTypeIdPtr = NULL) const = 0;
79 };
80 
81 
82 } // namespace idoc
83 
84 
85 #endif // !idoc_IDocumentTypesInfo_included
86 
87 
Provide loading and saving of objects.
Definition: IFileTypeInfo.h:22
virtual Ids GetDocumentTypeIds() const =0
Get list of supported document ID's can be created for specified file.
All features are supported.
Provide information about different document types.
SupportedFeatures
Enumeration for supported types of operation with the document.
virtual bool IsFeatureSupported(int featureFlags, const QByteArray &documentTypeId) const =0
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 Ids GetDocumentTypeIdsForFile(const QString &filePath) const =0
Get list of supported document ID's can be created for specified file.
virtual QString GetDefaultDirectory(const QString &sugestedDir="", const QByteArray *documentTypeIdPtr=NULL) const =0
Return default directory for specified document type.
#define NULL
Definition: istd.h:64
virtual QString GetDocumentTypeName(const QByteArray &documentTypeId) const =0
Get human readable name of some document type ID.
virtual ifile::IFileTypeInfo * GetDocumentFileTypeInfo(const QByteArray &documentTypeId) const =0
Get file type information object for some selected document type.
QVector< QByteArray > Ids
A new document can be created.

© 2007-2017 Witold Gantzke and Kirill Lepskiy