ACF $AcfVersion:0$
CHtmlHelpGuiComp.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
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>
19
20
21namespace iqtdoc
22{
23
24
105 public iqtgui::TGuiComponentBase<QTextBrowser>,
106 virtual public idoc::IHelpViewer
107{
108public:
110
111 I_BEGIN_COMPONENT(CHtmlHelpGuiComp);
112 I_REGISTER_INTERFACE(idoc::IHelpInfoProvider);
113 I_REGISTER_INTERFACE(idoc::IHelpViewer);
114 I_ASSIGN(m_helpFileProviderCompPtr, "HelpFileProvider", "Calculate path of html document", true, "HelpFileProvider");
115 I_END_COMPONENT;
116
117 // reimplemented (idoc::IHelpInfoProvider)
118 virtual double GetHelpQuality(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) const override;
119
120 // reimplemented (idoc::IHelpViewer)
121 virtual void ShowHelp(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) override;
122
123 // reimplemented (iqtgui::CGuiComponentBase)
124 virtual void OnGuiCreated() override;
125 virtual void OnGuiShown() override;
126
127private:
128 I_REF(idoc::IHelpFileProvider, m_helpFileProviderCompPtr);
129
130 mutable QUrl m_urlToShow;
131};
132
133
134} // namespace iqtdoc
135
136
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:45
HTML-based help viewer component.
iqtgui::TGuiComponentBase< QTextBrowser > BaseClass
virtual void ShowHelp(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) override
Show some help information for specified context.
virtual void OnGuiShown() override
Called from widget event filter when slave widget is shown.
virtual double GetHelpQuality(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) const override
Get quality of help information for specified context and/or object.
virtual void OnGuiCreated() override
Called just after GUI is initialized.
Base class for all Qt GUI componentes.
Base interface for all used interfaces and implementations.
This package contains Qt implementations related to Document/View concept.