ACF $AcfVersion:0$
CProcessStartCommandComp.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
11
12
13namespace iqtgui
14{
15
16
18 public QObject,
20 virtual public ibase::ICommandsProvider
21{
22 Q_OBJECT
23public:
25
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 override;
42
43protected:
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() override;
50
51private Q_SLOTS:
52 void OnStartProcessCommand();
53
54protected:
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
68
Interface for a provider of the heriarchical commands.
Common interface for any file system item name (e.g directory, file or URL path)
Template wrapper adding comprehensive logging functionality to components.
Implementation of hierarchical command based on QAction from Qt.
virtual QStringList GetProcessArguments() const
iqtgui::CHierarchicalCommand m_startProcessCommand
iqtgui::CHierarchicalCommand m_rootCommands
virtual void OnComponentCreated() override
Called when component is created.
virtual const ibase::IHierarchicalCommand * GetCommands() const override
Get list of menu commands.
virtual bool StartProcess(const QStringList &arguments)
Common interface to define the hierarchical graph structures.
Standard GUI specific interfaces and components based on Qt.