ImagingTools Core SDK
ICollectionHeadersProvider.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// ACF includes
6#include <istd/IPolymorphic.h>
7
8
9namespace imtcol
10{
11
12
13class ICollectionHeadersProvider: virtual public istd::IPolymorphic
14{
15public:
16 enum FieldType
17 {
18 FT_SCALAR,
19 FT_ARRAY
20 };
21 I_DECLARE_ENUM(FieldType, FT_SCALAR, FT_ARRAY);
22
23 struct HeaderInfo
24 {
25 QByteArray headerId;
26 QString headerName;
27 bool sortable = true;
28 bool filterable = true;
29 QByteArray permissionId;
30 FieldType fieldType = FT_SCALAR;
31
32 bool operator == (const HeaderInfo& other) const
33 {
34 return (headerId == other.headerId) &&
35 (fieldType == other.fieldType) &&
36 (headerName == other.headerName) &&
37 (sortable == other.sortable) &&
38 (filterable == other.filterable) &&
39 (permissionId == other.permissionId) ;
40 }
41 };
42
43 typedef QByteArrayList HeaderIds;
44
45 virtual HeaderIds GetHeaderIds() const = 0;
46 virtual bool GetHeaderInfo(const QByteArray& headerId, HeaderInfo& headerInfo) const = 0;
47};
48
49
50} // namespace imtcol
51
52