CProcessStartCommandComp.h
Go to the documentation of this file.
1 #ifndef iqtgui_CProcessStartCommanComp_included
2 #define iqtgui_CProcessStartCommanComp_included
3 
4 
5 // ACF includes
6 #include <icomp/CComponentBase.h>
7 #include <ifile/IFileNameParam.h>
9 #include <ilog/TLoggerCompWrap.h>
11 
12 
13 namespace iqtgui
14 {
15 
16 
18  public QObject,
20  virtual public ibase::ICommandsProvider
21 {
22  Q_OBJECT
23 public:
25 
26  enum GroupId
27  {
29  };
30 
31  I_BEGIN_COMPONENT(CProcessStartCommandComp);
32  I_REGISTER_INTERFACE(ibase::ICommandsProvider);
33  I_ASSIGN(m_applicationPathCompPtr, "ApplicationPath", "Path to the external executable used for opening the document file", true, "ApplicationPath");
34  I_ASSIGN(m_startProcessCommandNameAttrPtr, "CommandName", "Name/Text of the open document command shown in File menu", true, "Open In...");
35  I_ASSIGN_MULTI_0(m_processArgumentsAttrPtr, "ProcessArguments", "List of arguments for the external process", true);
36  I_END_COMPONENT;
37 
39 
40  // reimplemented (ibase::ICommandsProvider)
41  virtual const ibase::IHierarchicalCommand* GetCommands() const;
42 
43 protected:
44  virtual void CreateMenu();
45  virtual QStringList GetProcessArguments() const;
46  virtual bool StartProcess(const QStringList& arguments);
47 
48  // reimplemented (icomp::CComponentBase)
49  virtual void OnComponentCreated();
50 
51 private Q_SLOTS:
52  void OnStartProcessCommand();
53 
54 protected:
57 
58  I_REF(ifile::IFileNameParam, m_applicationPathCompPtr);
59  I_ATTR(QString, m_startProcessCommandNameAttrPtr);
60  I_MULTIATTR(QString, m_processArgumentsAttrPtr);
61 };
62 
63 
64 } // namespace iqtgui
65 
66 
67 #endif // iqtgui_CProcessStartCommanComp_included
68 
69 
Implementation of hierarchical command based on QAction from Qt.
virtual QStringList GetProcessArguments() const
virtual bool StartProcess(const QStringList &arguments)
virtual const ibase::IHierarchicalCommand * GetCommands() const
Get list of menu commands.
iqtgui::CHierarchicalCommand m_startProcessCommand
Interface for a provider of the heriarchical commands.
Wrapper provider of log-functionality for component based implementations.
Common interface for any file system item name (e.g directory, file or URL path)
Common interface to define the hierarchical graph structures.
ilog::CLoggerComponentBase BaseClass
iqtgui::CHierarchicalCommand m_rootCommands

© 2007-2017 Witold Gantzke and Kirill Lepskiy