CStaticHelpFileProviderComp.h
Go to the documentation of this file.
1 #ifndef iqtdoc_CStaticHelpFileProviderComp_included
2 #define iqtdoc_CStaticHelpFileProviderComp_included
3 
4 
5 // ACF includes
6 #include <icomp/CComponentBase.h>
7 #include <ifile/IFileNameParam.h>
9 
10 
11 namespace iqtdoc
12 {
13 
14 
16  public icomp::CComponentBase,
17  virtual public idoc::IHelpFileProvider
18 {
19 public:
21 
22  I_BEGIN_COMPONENT(CStaticHelpFileProviderComp);
23  I_REGISTER_INTERFACE(idoc::IHelpFileProvider);
24  I_ASSIGN(m_helpFileDirCompPtr, "HelpFileDir", "Directory where help files are stored", true, "HelpFileDir");
25  I_ASSIGN(m_defaultFileNameAttrPtr, "DefaultHelpFileName", "Help file name used if help without context is asked", true, "GeneralHelp.html");
26  I_ASSIGN(m_contextPrefixAttrPtr, "ContextPrefix", "File name prefix used for context based help file name", true, "");
27  I_ASSIGN(m_contextSuffixAttrPtr, "ContextSuffix", "File name suffix added to context based help file name", true, ".html");
28  I_END_COMPONENT;
29 
30  // reimplemented (idoc::IHelpFileProvider)
31  virtual double GetHelpQuality(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const;
32  virtual QString GetHelpFilePath(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const;
33 
34 private:
35  I_REF(ifile::IFileNameParam, m_helpFileDirCompPtr);
36  I_ATTR(QString, m_defaultFileNameAttrPtr);
37  I_ATTR(QString, m_contextPrefixAttrPtr);
38  I_ATTR(QString, m_contextSuffixAttrPtr);
39 };
40 
41 
42 } // namespace iqtdoc
43 
44 
45 #endif // !iqtdoc_CStaticHelpFileProviderComp_included
46 
47 
virtual double GetHelpQuality(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const
Get quality of help information for specified context and/or object.
virtual QString GetHelpFilePath(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const
Get access to help file path for specified help information.
Base class for component implementation.
Allow to show help document to specified object or text.
Common interface for any file system item name (e.g directory, file or URL path)
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17

© 2007-2017 Witold Gantzke and Kirill Lepskiy