ICF 3.1.1.10
Technical documentation of ICF Libraries
CHtmlHelpGuiComp.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// Qt includes
10#include <QtCore/QtGlobal>
11#include <QtWidgets/QTextBrowser>
12
13// ICF includes
15#include <idoc/IHelpViewer.h>
17
18
19namespace idocgui
20{
21
22
24 public istdgui::TGuiComponentBase<QTextBrowser>,
25 virtual public idoc::IHelpViewer
26{
27public:
29
30 I_BEGIN_COMPONENT(CHtmlHelpGuiComp);
31 I_REGISTER_INTERFACE(idoc::IHelpInfoProvider);
32 I_REGISTER_INTERFACE(idoc::IHelpViewer);
33 I_ASSIGN(m_helpFileProviderCompPtr, "HelpFileProvider", "Calculate path of html document", true, "HelpFileProvider");
34 I_END_COMPONENT;
35
36 // reimplemented (idoc::IHelpInfoProvider)
37 double GetHelpQuality(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const override;
38
39 // reimplemented (idoc::IHelpViewer)
40 void ShowHelp(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) override;
41
42 // reimplemented (istdgui::CGuiComponentBase)
43 void OnGuiCreated() override;
44 void OnGuiShown() override;
45
46private:
47 I_REF(idoc::IHelpFileProvider, m_helpFileProviderCompPtr);
48
49 mutable QUrl m_urlToShow;
50};
51
52
53} // namespace idocgui
54
55
Allow to show help document to specified object or text.
Allow to show help document to specified object or text.
Allow to show help document to specified object or text.
Definition IHelpViewer.h:25
void OnGuiShown() override
Called from widget event filter when slave widget is shown.
double GetHelpQuality(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const override
Get quality of help information for specified context and/or object.
void ShowHelp(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) override
Show some help information for specified context.
istdgui::TGuiComponentBase< QTextBrowser > BaseClass
void OnGuiCreated() override
Called just after GUI is initialized.
Base class for all Qt GUI componentes.
This package contains Qt implementations related to Document/View concept.

© Witold Gantzke and Kirill Lepskiy