CHtmlHelpGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtdoc_CHtmlHelpGuiComp_included
2 #define iqtdoc_CHtmlHelpGuiComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QtGlobal>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QTextBrowser>
9 #include <QtPrintSupport/QPrinter>
10 #else
11 #include <QtGui/QTextBrowser>
12 #include <QtGui/QPrinter>
13 #endif
14 
15 // ACF includes
17 #include <idoc/IHelpViewer.h>
18 #include <idoc/IHelpFileProvider.h>
19 
20 
21 namespace iqtdoc
22 {
23 
24 
26  public iqtgui::TGuiComponentBase<QTextBrowser>,
27  virtual public idoc::IHelpViewer
28 {
29 public:
31 
32  I_BEGIN_COMPONENT(CHtmlHelpGuiComp);
33  I_REGISTER_INTERFACE(idoc::IHelpInfoProvider);
34  I_REGISTER_INTERFACE(idoc::IHelpViewer);
35  I_ASSIGN(m_helpFileProviderCompPtr, "HelpFileProvider", "Calculate path of html document", true, "HelpFileProvider");
36  I_END_COMPONENT;
37 
38  // reimplemented (idoc::IHelpInfoProvider)
39  virtual double GetHelpQuality(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const;
40 
41  // reimplemented (idoc::IHelpViewer)
42  virtual void ShowHelp(const QString& contextText, const istd::IPolymorphic* contextObjectPtr);
43 
44  // reimplemented (iqtgui::CGuiComponentBase)
45  virtual void OnGuiShown();
46 
47 private:
48  I_REF(idoc::IHelpFileProvider, m_helpFileProviderCompPtr);
49 
50  mutable QUrl m_urlToShow;
51 };
52 
53 
54 } // namespace iqtdoc
55 
56 
57 #endif // !iqtdoc_CHtmlHelpGuiComp_included
58 
59 
iqtgui::TGuiComponentBase< QTextBrowser > BaseClass
Allow to show help document to specified object or text.
Allow to show help document to specified object or text.
Definition: IHelpViewer.h:20
Base class for all Qt GUI componentes.
Allow to show help document to specified object or text.
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17
virtual void ShowHelp(const QString &contextText, const istd::IPolymorphic *contextObjectPtr)
Show some help information for specified context.
virtual double GetHelpQuality(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const
Get quality of help information for specified context and/or object.
virtual void OnGuiShown()
Called from widget event filter when slave widget is shown.

© 2007-2017 Witold Gantzke and Kirill Lepskiy