CProcessorCommandComp.h
Go to the documentation of this file.
1 #ifndef iprocgui_CProcessorCommandComp_included
2 #define iprocgui_CProcessorCommandComp_included
3 
4 
5 // ACF includes
7 
8 #include "icomp/CComponentBase.h"
9 
11 
12 #include "iqtgui/IIconProvider.h"
14 
15 #include "iproc/IProcessor.h"
16 
17 
18 namespace iprocgui
19 {
20 
21 
26  public QObject,
27  public icomp::CComponentBase,
28  virtual public ibase::ICommandsProvider
29 {
30  Q_OBJECT
31 public:
33 
34  I_BEGIN_COMPONENT(CProcessorCommandComp);
35  I_REGISTER_INTERFACE(ibase::ICommandsProvider);
36  I_ASSIGN(m_processorCompPtr, "ActionProcessor", "Processor used for action execution", true, "ActionProcessor");
37  I_ASSIGN(m_processorParamsCompPtr, "ProcessingParams", "Parameter set used for processor execution", false, "ProcessingParams");
38  I_ASSIGN(m_processorInputCompPtr, "ProcessingInput", "Input object used for processor execution", false, "ProcessingInput");
39  I_ASSIGN(m_processorOutputCompPtr, "ProcessingOutput", "Output object used for processor execution", false, "ProcessingOutput");
40  I_ASSIGN(m_progressManagerCompPtr, "ProgressManager", "Progress manager used for processor execution", false, "ProgressManager");
41  I_ASSIGN(m_actionIconAttrPtr, "ActionIcon", "Icon used command menu", true, ":/Icons");
42  I_ASSIGN(m_menuNameAttrPtr, "MenuName", "Name of the menu for the action group", true, "MenuName");
43  I_ASSIGN(m_menuDescriptionAttrPtr, "MenuDescription", "Description for the action group", true, "MenuDescription");
44  I_ASSIGN(m_rootMenuNameAttrPtr, "RootMenu", "Name of the root command", true, "RootMenu");
45  I_ASSIGN(m_successMessageAttrPtr, "SuccessMessage", "If defined, the message will be shown at the end of a successed processing action", false, "");
46  I_ASSIGN(m_errorMessageAttrPtr, "ErrorMessage", "If defined, the message will be shown at the end of a failed processing action", false, "");
47  I_ASSIGN(m_cancelMessageAttrPtr, "CancelMessage", "If defined, the message will be shown at the end of a canceled processing action", false, "");
48  I_END_COMPONENT;
49 
51 
52  // reimpemented (ibase::ICommandsProvider)
53  virtual const ibase::IHierarchicalCommand* GetCommands() const;
54 
55  // reimpemented (icomp::IComponent)
56  virtual void OnComponentCreated();
57 
58 private Q_SLOTS:
59  void OnCommandActivated();
60 
61 protected:
62  I_REF(iproc::IProcessor, m_processorCompPtr);
63  I_REF(iprm::IParamsSet, m_processorParamsCompPtr);
64  I_REF(istd::IPolymorphic, m_processorInputCompPtr);
65  I_REF(istd::IChangeable, m_processorOutputCompPtr);
66  I_REF(ibase::IProgressManager, m_progressManagerCompPtr);
67  I_ATTR(QByteArray, m_actionIconAttrPtr);
68  I_ATTR(QString, m_menuNameAttrPtr);
69  I_ATTR(QString, m_menuDescriptionAttrPtr);
70  I_ATTR(QString, m_rootMenuNameAttrPtr);
71  I_ATTR(QString, m_successMessageAttrPtr);
72  I_ATTR(QString, m_errorMessageAttrPtr);
73  I_ATTR(QString, m_cancelMessageAttrPtr);
74 
78 };
79 
80 
81 } // namespace iprocgui
82 
83 
84 #endif // !iprocgui_CProcessorCommandComp_included
85 
86 
iqtgui::CHierarchicalCommand m_rootMenuCommand
iqtgui::CHierarchicalCommand m_mainMenuCommand
Component for binding of a menu command (action) with some processor.
virtual const ibase::IHierarchicalCommand * GetCommands() const
iqtgui::CHierarchicalCommand m_processingCommand
Interface for all synchrone and assynchrone processors with "push data" model.
Definition: IProcessor.h:24

© 2007-2011 Witold Gantzke and Kirill Lepskiy