IDocumentTemplate.h
Go to the documentation of this file.
1 #ifndef idoc_IDocumentTemplate_included
2 #define idoc_IDocumentTemplate_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 
8 // ACF includes
9 #include <istd/IChangeable.h>
10 #include <ifile/IFilePersistence.h>
11 #include <imod/IObserver.h>
12 #include <ibase/ICommand.h>
13 #include <idoc/IUndoManager.h>
15 
16 
17 namespace idoc
18 {
19 
20 
27 {
28 public:
33  virtual Ids GetViewTypeIds(const QByteArray& documentTypeId) const = 0;
34 
38  virtual QString GetViewTypeName(
39  const QByteArray& documentTypeId,
40  const QByteArray& viewTypeId) const = 0;
41 
46  virtual ifile::IFilePersistence* GetFileLoader(const QByteArray& documentTypeId) const = 0;
47 
57  QByteArray& documentTypeId,
58  bool initialize = true,
59  bool beQuiet = false,
60  bool* ignoredFlagPtr = NULL) const = 0;
61 
69  const QByteArray& documentTypeId,
70  istd::IChangeable* documentPtr,
71  const QByteArray& viewTypeId = QByteArray()) const = 0;
72 
79  virtual idoc::IUndoManager* CreateUndoManager(const QByteArray& documentTypeId, istd::IChangeable* documentPtr) const = 0;
80 };
81 
82 
83 } // namespace idoc
84 
85 
86 #endif // !idoc_IDocumentTemplate_included
87 
88 
virtual ifile::IFilePersistence * GetFileLoader(const QByteArray &documentTypeId) const =0
Get file loader/saver for spacified document ID.
virtual istd::IPolymorphic * CreateView(const QByteArray &documentTypeId, istd::IChangeable *documentPtr, const QByteArray &viewTypeId=QByteArray()) const =0
Creates a view instance for document document of type viewTypeId.
Provide information about different document types.
virtual QString GetViewTypeName(const QByteArray &documentTypeId, const QByteArray &viewTypeId) const =0
Get human readable name of some view type ID.
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17
Common interface for a document template.
#define NULL
Definition: istd.h:64
virtual idoc::IUndoManager * CreateUndoManager(const QByteArray &documentTypeId, istd::IChangeable *documentPtr) const =0
Creates an undo manger for a given document documentPtr.
Interface providing loading and saving of data objects.
QVector< QByteArray > Ids
Interface providing UNDO/REDO functionality.
Definition: IUndoManager.h:16
virtual Ids GetViewTypeIds(const QByteArray &documentTypeId) const =0
Return supported view type IDs for specified document type.
virtual istd::IChangeable * CreateDocument(QByteArray &documentTypeId, bool initialize=true, bool beQuiet=false, bool *ignoredFlagPtr=NULL) const =0
Creates a document instance for document type documentTypeId.

© 2007-2017 Witold Gantzke and Kirill Lepskiy