ImagingTools Core SDK
CTaskCollectionComp.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 <imod/CModelUpdateBridge.h>
7#include <iprm/IEnableableParam.h>
8#include <iprm/COptionsManager.h>
9
10// Acula includes
11#include <imthype/CTaskCollectionCompBase.h>
12
13
14namespace imthype
15{
16
17
22{
23public:
25
26 I_BEGIN_COMPONENT(CTaskCollectionComp);
27 I_ASSIGN_MULTI_0(m_taskFactCompPtr, "TaskFactories", "List of task factories", false);
28 I_ASSIGN_MULTI_0(m_taskTypeIdsAttrPtr, "TaskTypeIds", "List of type IDs for corresponding task", false);
29 I_ASSIGN_MULTI_0(m_taskTypeNamesAttrPtr, "TaskTypeNames", "List of names for corresponding task type", false);
30 I_ASSIGN_MULTI_0(m_taskEnablersCompPtr, "TaskTypeEnablers", "List of enablers for the task type", false);
31 I_END_COMPONENT;
32
33 // reimplemented (CTaskCollectionCompBase)
34 virtual QString GetTaskTypeName(const QByteArray& taskTypeId) const override;
35
36 // reimplemented (IObjectCollectionInfo)
37 virtual const iprm::IOptionsList* GetObjectTypesInfo() const override;
38
39protected:
40 // reimplemented (CTaskCollectionCompBase)
41 virtual iinsp::ISupplierUniquePtr CreateTaskInstance(const QByteArray& taskTypeId) const override;
42
43 // reimplemented (icomp::CComponentBase)
44 virtual void OnComponentCreated() override;
45
46protected:
47 imod::TModelWrap<iprm::COptionsManager> m_taskFactories;
48
49private:
50 I_MULTIFACT(iinsp::ISupplier, m_taskFactCompPtr);
51 I_MULTITEXTATTR(m_taskTypeNamesAttrPtr);
52 I_MULTIATTR(QByteArray, m_taskTypeIdsAttrPtr);
53 I_MULTIREF(iprm::IEnableableParam, m_taskEnablersCompPtr);
54};
55
56
57} // namespace imthype
58
59