ICF 3.1.1.10
Technical documentation of ICF Libraries
IDocumentTypesInfo.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QString>
11#include <QtCore/QVector>
12
13// ICF includes
14#include <ifile/IFileTypeInfo.h>
15
16
17namespace idoc
18{
19
20
24class IDocumentTypesInfo: virtual public istd::IPolymorphic
25{
26public:
27 typedef QVector<QByteArray> Ids;
28
33 {
38
43
47 SF_DEFAULT = 0xffff
48 };
49
53 virtual bool IsFeatureSupported(int featureFlags, const QByteArray& documentTypeId) const = 0;
54
58 virtual Ids GetDocumentTypeIds() const = 0;
59
64 virtual QString GetDocumentTypeName(const QByteArray& documentTypeId) const = 0;
65
70 virtual ifile::IFileTypeInfo* GetDocumentFileTypeInfo(const QByteArray& documentTypeId) const = 0;
71
75 virtual Ids GetDocumentTypeIdsForFile(const QString& filePath) const = 0;
76
82 virtual QString GetDefaultDirectory(const QString& sugestedDir = "", const QByteArray* documentTypeIdPtr = nullptr) const = 0;
83};
84
85
86} // namespace idoc
87
88
Provide information about different document types.
virtual QString GetDefaultDirectory(const QString &sugestedDir="", const QByteArray *documentTypeIdPtr=nullptr) const =0
Return default directory for specified document type.
virtual ifile::IFileTypeInfo * GetDocumentFileTypeInfo(const QByteArray &documentTypeId) const =0
Get file type information object for some selected document type.
virtual Ids GetDocumentTypeIds() const =0
Get list of supported document ID's can be created for specified file.
virtual QString GetDocumentTypeName(const QByteArray &documentTypeId) const =0
Get human readable name of some document type ID.
virtual bool IsFeatureSupported(int featureFlags, const QByteArray &documentTypeId) const =0
Return true, if the feature(s) is supported by this document template.
QVector< QByteArray > Ids
SupportedFeatures
Enumeration for supported types of operation with the document.
@ SF_EDIT_DOCUMENT
A document is editable.
@ SF_DEFAULT
All features are supported.
@ SF_NEW_DOCUMENT
A new document can be created.
virtual Ids GetDocumentTypeIdsForFile(const QString &filePath) const =0
Get list of supported document ID's can be created for specified file.
Provide loading and saving of objects.
Contains the system indenendent basic implementations of Document/View design pattern.

© Witold Gantzke and Kirill Lepskiy