CHtmlHelpViewerComp.h
Go to the documentation of this file.
1 #ifndef iqtdoc_CHtmlHelpViewerComp_included
2 #define iqtdoc_CHtmlHelpViewerComp_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
16 #include <istd/TDelPtr.h>
17 #include <icomp/CComponentBase.h>
18 #include <idoc/IHelpViewer.h>
19 #include <idoc/IHelpFileProvider.h>
20 
21 
22 namespace iqtdoc
23 {
24 
25 
27  public icomp::CComponentBase,
28  virtual public idoc::IHelpViewer
29 {
30 public:
32 
33  I_BEGIN_COMPONENT(CHtmlHelpViewerComp);
34  I_REGISTER_INTERFACE(idoc::IHelpInfoProvider);
35  I_REGISTER_INTERFACE(idoc::IHelpViewer);
36  I_ASSIGN(m_helpFileProviderCompPtr, "HelpFileProvider", "Calculate path of html document", true, "HelpFileProvider");
37  I_END_COMPONENT;
38 
39  // reimplemented (idoc::IHelpInfoProvider)
40  virtual double GetHelpQuality(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const;
41 
42  // reimplemented (idoc::IHelpViewer)
43  virtual void ShowHelp(const QString& contextText, const istd::IPolymorphic* contextObjectPtr);
44 
45 private:
46  I_REF(idoc::IHelpFileProvider, m_helpFileProviderCompPtr);
47 
48  istd::TDelPtr<QTextBrowser> m_helpWidgetPtr;
49 };
50 
51 
52 } // namespace iqtdoc
53 
54 
55 #endif // !iqtdoc_CHtmlHelpViewerComp_included
56 
57 
Base class for component implementation.
Allow to show help document to specified object or text.
Allow to show help document to specified object or text.
Definition: IHelpViewer.h:20
Allow to show help document to specified object or text.
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.
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17
icomp::CComponentBase BaseClass

© 2007-2017 Witold Gantzke and Kirill Lepskiy