ACF $AcfVersion:0$
IDocumentTypesInfo.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QString>
7#include <QtCore/QVector>
8
9// ACF includes
10#include <ifile/IFileTypeInfo.h>
11
12
13namespace idoc
14{
15
16
69{
70public:
74 typedef QVector<QByteArray> Ids;
75
80 {
85
90
94 SF_DEFAULT = 0xffff
95 };
96
103 virtual bool IsFeatureSupported(int featureFlags, const QByteArray& documentTypeId) const = 0;
104
109 virtual Ids GetDocumentTypeIds() const = 0;
110
116 virtual QString GetDocumentTypeName(const QByteArray& documentTypeId) const = 0;
117
123 virtual ifile::IFileTypeInfo* GetDocumentFileTypeInfo(const QByteArray& documentTypeId) const = 0;
124
133 virtual Ids GetDocumentTypeIdsForFile(const QString& filePath) const = 0;
134
144 virtual QString GetDefaultDirectory(const QString& sugestedDir = "", const QByteArray* documentTypeIdPtr = NULL) const = 0;
145};
146
147
148} // namespace idoc
149
150
151
152
Provide information about different document types.
virtual QString GetDefaultDirectory(const QString &sugestedDir="", const QByteArray *documentTypeIdPtr=NULL) 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 type IDs.
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
Type definition for document type ID collections.
SupportedFeatures
Enumeration for supported types of operations with documents.
@ SF_EDIT_DOCUMENT
A document is editable (content can be modified).
@ SF_DEFAULT
All features are supported.
@ SF_NEW_DOCUMENT
A new document can be created (File > New).
virtual Ids GetDocumentTypeIdsForFile(const QString &filePath) const =0
Get list of supported document IDs that can handle the specified file.
Provide loading and saving of objects.
Base interface for all used interfaces and implementations.
#define NULL
Definition istd.h:74
Contains the system independent basic implementations of Document/View design pattern.