ImagingTools Core SDK
CTaskManagerGuiComp.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 <iqtgui/TMakeStateIconWrapper.h>
7
8// ImtCore includes
9#include <imthypegui/TTaskCollectionEditorCompBase.h>
10#include <GeneratedFiles/imthypegui/ui_CTaskManagerGuiComp.h>
11
12
13namespace imthypegui
14{
15
16
17class CTaskManagerGuiComp: public TTaskCollectionEditorCompBase<Ui::CTaskManagerGuiComp>
18{
19 Q_OBJECT
20
21public:
22 typedef TTaskCollectionEditorCompBase<Ui::CTaskManagerGuiComp> BaseClass;
23
24 I_BEGIN_COMPONENT(CTaskManagerGuiComp);
25 I_ASSIGN(m_autoAssignUserIdAttrPtr, "AutoAssignUserId", "Automatically assign new User-ID for created and duplicated tasks", true, false);
26 I_ASSIGN(m_autoRenameAttrPtr, "AutoRename", "Automatically renaming if the new task name entered by user already exists", true, false);
27 I_ASSIGN_MULTI_0(m_taskEditorsFactCompPtr, "TaskEditors", "List of task editors", true);
28 I_ASSIGN_TO(m_taskObserversFactCompPtr, m_taskEditorsFactCompPtr, true);
29 I_ASSIGN_MULTI_0(m_editorTypeIdsAttrPtr, "TaskEditorTypeIds", "List of type IDs for corresponding task editors", true);
30 I_ASSIGN(m_showAllExecuteButtonAttrPtr, "ShowAllExecute", "Show all execute button in the tool bar", true, true);
31 I_END_COMPONENT;
32
33 CTaskManagerGuiComp();
34
35protected Q_SLOTS:
36 void OnToggleTaskList(bool toggled);
37 void OnTestAll();
38 void OnAddTask();
39 void OnDeleteTask();
40 void OnDuplicateTask();
41 void OnAddMenuOptionClicked(QAction* action);
42 void OnSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
43 void OnMicroSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
44 void on_TaskList_doubleClicked(const QModelIndex& index);
45 void on_MicroTaskList_doubleClicked(const QModelIndex& index);
46 void OnItemContextMenu(const QPoint& position);
47 void OnMicroItemContextMenu(const QPoint& position);
48 void OnToggleTask();
49 void OnRenameTask();
50 void OnShowInputsManager();
51
52protected:
53 // reimplemented (TTaskCollectionEditorCompBase)
54 virtual QItemSelectionModel* GetTaskSelectionModel() const override;
55 virtual void UpdateCommands() override;
56
57 // reimplemented (iqtgui::CGuiComponentBase)
58 virtual void OnGuiCreated() override;
59 virtual void OnGuiDestroyed() override;
60 virtual void OnGuiRetranslate() override;
61 virtual void OnGuiDesignChanged() override;
62
63private:
64 void ShowContextMenu(const QPoint& position, QListView& list);
65
66private:
67 I_ATTR(bool, m_autoAssignUserIdAttrPtr);
68 I_ATTR(bool, m_autoRenameAttrPtr);
69 I_ATTR(bool, m_showAllExecuteButtonAttrPtr);
70 I_MULTIFACT(iqtgui::IGuiObject, m_taskEditorsFactCompPtr);
71 I_MULTIFACT(imod::IObserver, m_taskObserversFactCompPtr);
72 I_MULTIATTR(QByteArray, m_editorTypeIdsAttrPtr);
73};
74
75
76} // namespace imthypegui
77
78