CQuickHelpGuiComp.h
Go to the documentation of this file.
1 #ifndef icmpstr_CQuickHelpGuiComp_included
2 #define icmpstr_CQuickHelpGuiComp_included
3 
4 
5 // Qt includes
6 #include<QtCore/QtGlobal>
7 #if QT_VERSION >= 0x050000
8 #include <QtPrintSupport/QPrinter>
9 #include <QtWidgets/QTextBrowser>
10 #else
11 #include <QtGui/QPrinter>
12 #include <QtGui/QTextBrowser>
13 #endif
14 
15 // ACF includes
16 #include "icomp/IMetaInfoManager.h"
17 #include "ifile/IFileNameParam.h"
18 #include "idoc/IHelpViewer.h"
19 #include "idoc/IHelpFileProvider.h"
21 
22 // ACF-Solutions includes
24 
25 #include "GeneratedFiles/icmpstr/ui_CQuickHelpGuiComp.h"
26 
27 
28 namespace icmpstr
29 {
30 
31 
33  public iqtgui::TDesignerGuiCompBase<Ui::CQuickHelpGuiComp>,
34  virtual public idoc::IHelpViewer
35 {
36  Q_OBJECT
37 
38 public:
40 
41  I_BEGIN_COMPONENT(CQuickHelpGuiComp);
42  I_REGISTER_INTERFACE(idoc::IHelpInfoProvider);
43  I_REGISTER_INTERFACE(idoc::IHelpViewer);
44  I_ASSIGN(m_descriptionFileProviderCompPtr, "HelpFileProvider", "Calculate path of html document for short description", true, "HelpFileProvider");
45  I_ASSIGN(m_docuEditorFileParamsCompPtr, "DocuEditorFileParam", "Object storing path to html editor used to edit the description", true, "DocuEditorFileParam");
46  I_ASSIGN(m_techDocuViewerFileParamsCompPtr, "TechDocuViewerParam", "Object storing path to html viewer used to show technical documentation", true, "TechDocuViewerParam");
47  I_ASSIGN(m_metaInfoManagerCompPtr, "MetaInfoManager", "Allows access to component meta information", true, "MetaInfoManager");
48  I_ASSIGN_TO(m_externalMetaInfoManagerCompPtr, m_metaInfoManagerCompPtr, false);
49  I_END_COMPONENT;
50 
51  // reimplemented (idoc::IHelpInfoProvider)
52  virtual double GetHelpQuality(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const;
53 
54  // reimplemented (idoc::IHelpViewer)
55  virtual void ShowHelp(const QString& contextText, const istd::IPolymorphic* contextObjectPtr);
56 
57 protected:
58  QString CalcDoxygenFileName(const istd::CClassInfo& classInfo) const;
59 
60  // reimplemented (CGuiComponentBase)
61  virtual void OnGuiCreated();
62 
63 protected Q_SLOTS:
64  void on_EditButton_clicked();
65  void on_NewButton_clicked();
67 
68 private:
69  I_REF(idoc::IHelpFileProvider, m_descriptionFileProviderCompPtr);
70  I_REF(ifile::IFileNameParam, m_docuEditorFileParamsCompPtr);
71  I_REF(ifile::IFileNameParam, m_techDocuViewerFileParamsCompPtr);
72  I_REF(icomp::IMetaInfoManager, m_metaInfoManagerCompPtr);
73  I_REF(IExternalMetaInfoManager, m_externalMetaInfoManagerCompPtr);
74 
75  QString m_descrFilePath;
76  QString m_techFilePath;
77 };
78 
79 
80 } // namespace icmpstr
81 
82 
83 #endif // !icmpstr_CQuickHelpGuiComp_included
84 
85 
I_ASSIGN_TO(m_externalMetaInfoManagerCompPtr, m_metaInfoManagerCompPtr, false)
virtual void ShowHelp(const QString &contextText, const istd::IPolymorphic *contextObjectPtr)
virtual double GetHelpQuality(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const
virtual void OnGuiCreated()
QString CalcDoxygenFileName(const istd::CClassInfo &classInfo) const
iqtgui::TDesignerGuiCompBase< Ui::CQuickHelpGuiComp > BaseClass

© 2007-2011 Witold Gantzke and Kirill Lepskiy