ICF 3.1.1.10
Technical documentation of ICF Libraries
CProcessorCommandComp.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iprocgui_CProcessorCommandComp_included
7#define iprocgui_CProcessorCommandComp_included
8
9
10// ICF includes
12
14
16
19
20#include <iproc/IProcessor.h>
21
22
23namespace iprocgui
24{
25
26
31 public QObject,
33 virtual public ibase::ICommandsProvider
34{
35 Q_OBJECT
36public:
38
39 I_BEGIN_COMPONENT(CProcessorCommandComp);
40 I_REGISTER_INTERFACE(ibase::ICommandsProvider);
41 I_ASSIGN(m_processorCompPtr, "ActionProcessor", "Processor used for action execution", true, "ActionProcessor");
42 I_ASSIGN(m_processorParamsCompPtr, "ProcessingParams", "Parameter set used for processor execution", false, "ProcessingParams");
43 I_ASSIGN(m_processorInputCompPtr, "ProcessingInput", "Input object used for processor execution", false, "ProcessingInput");
44 I_ASSIGN(m_processorOutputCompPtr, "ProcessingOutput", "Output object used for processor execution", false, "ProcessingOutput");
45 I_ASSIGN(m_progressManagerCompPtr, "ProgressManager", "Progress manager used for processor execution", false, "ProgressManager");
46 I_ASSIGN(m_actionIconAttrPtr, "ActionIcon", "Icon used command menu", true, ":/IcfIcons");
47 I_ASSIGN(m_menuNameAttrPtr, "MenuName", "Name of the menu for the action group", true, "MenuName");
48 I_ASSIGN(m_menuDescriptionAttrPtr, "MenuDescription", "Description for the action group", true, "MenuDescription");
49 I_ASSIGN(m_rootMenuNameAttrPtr, "RootMenu", "Name of the root command", true, "Process");
50 I_ASSIGN(m_successMessageAttrPtr, "SuccessMessage", "If defined, the message will be shown at the end of a successed processing action", false, "");
51 I_ASSIGN(m_errorMessageAttrPtr, "ErrorMessage", "If defined, the message will be shown at the end of a failed processing action", false, "");
52 I_ASSIGN(m_cancelMessageAttrPtr, "CancelMessage", "If defined, the message will be shown at the end of a canceled processing action", false, "");
53 I_END_COMPONENT;
54
56
57 // reimpemented (ibase::ICommandsProvider)
59
60 // reimpemented (icomp::IComponent)
61 void OnComponentCreated() override;
62
63private Q_SLOTS:
64 void OnCommandActivated();
65
66protected:
67 I_REF(iproc::IProcessor, m_processorCompPtr);
68 I_REF(iprm::IParamsSet, m_processorParamsCompPtr);
69 I_REF(istd::IPolymorphic, m_processorInputCompPtr);
70 I_REF(istd::IChangeable, m_processorOutputCompPtr);
71 I_REF(iproc::IProgressManager, m_progressManagerCompPtr);
72 I_ATTR(QByteArray, m_actionIconAttrPtr);
73 I_TEXTATTR(m_menuNameAttrPtr);
74 I_TEXTATTR(m_menuDescriptionAttrPtr);
75 I_TEXTATTR(m_rootMenuNameAttrPtr);
76 I_TEXTATTR(m_successMessageAttrPtr);
77 I_TEXTATTR(m_errorMessageAttrPtr);
78 I_TEXTATTR(m_cancelMessageAttrPtr);
79
83};
84
85
86} // namespace iprocgui
87
88
89#endif // !iprocgui_CProcessorCommandComp_included
90
91
Interface for a provider of the heriarchical commands.
Base class for component implementation.
Set of general parameters.
Definition IParamsSet.h:29
Interface for all synchrone and asynchrone processors with "push data" model.
Definition IProcessor.h:26
Consume information about progress of some process.
Component for binding of a menu command (action) with some processor.
istdgui::CHierarchicalCommand m_rootMenuCommand
const ibase::IHierarchicalCommand * GetCommands() const override
Get list of menu commands.
istdgui::CHierarchicalCommand m_mainMenuCommand
istdgui::CHierarchicalCommand m_processingCommand
void OnComponentCreated() override
Common interface for data model objects, which can be changed.
Definition IChangeable.h:32
Common interface to define the hierarchical graph structures.
Implementation of hierarchical command based on QAction from Qt.
This package contains GUI implementations of data processing.

© Witold Gantzke and Kirill Lepskiy