CRegistryPreviewComp.h
Go to the documentation of this file.
1 #ifndef icmpstr_CRegistryPreviewComp_included
2 #define icmpstr_CRegistryPreviewComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QProcess>
7 #include <QtCore/QDir>
8 #if QT_VERSION >= 0x050000
9 #include <QtWidgets/QLabel>
10 #else
11 #include <QtGui/QLabel>
12 #endif
13 
14 // ACF includes
16 #include <ilog/TLoggerCompWrap.h>
17 #include <ifile/IFileNameParam.h>
18 
19 // ACF-Solutions includes
21 
22 
23 namespace icmpstr
24 {
25 
26 
28  public QObject,
30  public IRegistryPreview
31 {
32  Q_OBJECT
33 public:
35 
36  I_BEGIN_COMPONENT(CRegistryPreviewComp);
37  I_REGISTER_INTERFACE(icmpstr::IRegistryPreview);
38  I_ASSIGN(m_versionInfoCompPtr, "VersionInfo", "Version info used to serialize temporary registry file", false, "VersionInfo");
39  I_ASSIGN(m_commandFileNameCompPtr, "CommandFileName", "Parameter storing command file name", true, "CommandFileName");
40  I_ASSIGN(m_envManagerCompPtr, "EnvironmentManager", "Registry loader used to retrive package configuration", false, "EnvironmentManager");
41  I_END_COMPONENT;
42 
44 
45  // reimplemented (icmpstr::IRegistryPreview)
46  virtual bool StartRegistry(const icomp::IRegistry& registry);
47  virtual bool IsRunning() const;
48  virtual void AbortRegistry();
49 
50 protected:
51  // reimplemented (icomp::CComponentBase)
52  virtual void OnComponentCreated();
53  virtual void OnComponentDestroyed();
54 
55 protected Q_SLOTS:
56 #ifndef QT_NO_PROCESS
57  void OnStateChanged(QProcess::ProcessState state);
60 #endif
61 
62 private:
63  QString m_tempFileName;
64 
65 #ifndef QT_NO_PROCESS
66  QProcess m_process;
67 #endif
68  bool m_isRunning;
69 
70  I_REF(ifile::IFileNameParam, m_commandFileNameCompPtr);
71  I_REF(icomp::IComponentEnvironmentManager, m_envManagerCompPtr);
72  I_REF(iser::IVersionInfo, m_versionInfoCompPtr);
73 };
74 
75 
76 } // namespace icmpstr
77 
78 
79 #endif // !icmpstr_CRegistryPreviewComp_included
80 
81 
virtual void OnComponentCreated()
virtual bool IsRunning() const
Returns true if the registry registry is executing.
ilog::CLoggerComponentBase BaseClass
virtual void OnComponentDestroyed()
virtual void AbortRegistry()
Abort registry execution.
virtual bool StartRegistry(const icomp::IRegistry &registry)
Start registry execution.
void OnStateChanged(QProcess::ProcessState state)

© 2007-2017 Witold Gantzke and Kirill Lepskiy