ICF 3.0.5.47
Technical documentation of ICF Libraries
CStaticHelpFileProviderComp.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// ICF includes
13
14
15namespace idocgui
16{
17
18
21 virtual public idoc::IHelpFileProvider
22{
23public:
25
26 I_BEGIN_COMPONENT(CStaticHelpFileProviderComp);
27 I_REGISTER_INTERFACE(idoc::IHelpFileProvider);
28 I_ASSIGN(m_helpFileDirCompPtr, "HelpFileDir", "Directory where help files are stored", true, "HelpFileDir");
29 I_ASSIGN(m_defaultFileNameAttrPtr, "DefaultHelpFileName", "Help file name used if help without context is asked", true, "GeneralHelp.html");
30 I_ASSIGN(m_contextPrefixAttrPtr, "ContextPrefix", "File name prefix used for context based help file name", true, "");
31 I_ASSIGN(m_contextSuffixAttrPtr, "ContextSuffix", "File name suffix added to context based help file name", true, ".html");
32 I_END_COMPONENT;
33
34 // reimplemented (idoc::IHelpFileProvider)
35 double GetHelpQuality(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const override;
36 QString GetHelpFilePath(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const override;
37
38private:
39 I_REF(ifile::IFileNameParam, m_helpFileDirCompPtr);
40 I_ATTR(QString, m_defaultFileNameAttrPtr);
41 I_ATTR(QString, m_contextPrefixAttrPtr);
42 I_ATTR(QString, m_contextSuffixAttrPtr);
43};
44
45
46} // namespace idocgui
47
48
Base class for component implementation.
Allow to show help document to specified object or text.
double GetHelpQuality(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const override
Get quality of help information for specified context and/or object.
QString GetHelpFilePath(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const override
Get access to help file path for specified help information.
Common interface for any file system item name (e.g directory, file or URL path)
This package contains Qt implementations related to Document/View concept.

© Witold Gantzke and Kirill Lepskiy