ImagingTools Core SDK
ISelection.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// Qt includes
6#include <QtCore/QByteArray>
7
8// ACF includes
9#include <iser/ISerializable.h>
10
11
12namespace imtbase
13{
14
15
16class ICollectionInfo;
17
18
22class ISelection: virtual public iser::ISerializable
23{
24public:
25 typedef QByteArray Id;
26 typedef QSet<Id> Ids;
27
28 static const QByteArray CN_SELECTION_MODE_CHANGED;
29 static const QByteArray CN_SELECTION_CHANGED;
30 static const QByteArray CN_CONSTRAINTS_CHANGED;
31
36 {
37 CF_SELECTION_MODE_CHANGED = 0x373978,
38 CF_SELECTION_CHANGED,
39 CF_CONSTRAINTS_CHANGED
40 };
41
42 enum SelectionMode
43 {
44 SM_SINGLE = 0,
45 SM_MULTI
46 };
47
48 I_DECLARE_ENUM(SelectionMode, SM_SINGLE, SM_MULTI);
49
53 virtual const ICollectionInfo* GetSelectionConstraints() const = 0;
54
58 virtual SelectionMode GetSelectionMode() const = 0;
59
63 virtual bool SetSelectionMode(SelectionMode mode) = 0;
64
68 virtual Ids GetSelectedIds() const = 0;
69
73 virtual bool SetSelectedIds(const Ids& selectedIds) = 0;
74};
75
76
77} // namespace imtbase
78
79
virtual bool SetSelectedIds(const Ids &selectedIds)=0
virtual bool SetSelectionMode(SelectionMode mode)=0
virtual Ids GetSelectedIds() const =0
virtual const ICollectionInfo * GetSelectionConstraints() const =0
virtual SelectionMode GetSelectionMode() const =0