ACF $AcfVersion:0$
CHtmlHelpViewerComp.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
16#include <istd/TDelPtr.h>
18#include <idoc/IHelpViewer.h>
20
21
22namespace iqtdoc
23{
24
25
28 virtual public idoc::IHelpViewer
29{
30public:
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 override;
41
42 // reimplemented (idoc::IHelpViewer)
43 virtual void ShowHelp(const QString& contextText, const istd::IPolymorphic* contextObjectPtr) override;
44
45private:
46 I_REF(idoc::IHelpFileProvider, m_helpFileProviderCompPtr);
47
48 istd::TDelPtr<QTextBrowser> m_helpWidgetPtr;
49};
50
51
52} // namespace iqtdoc
53
54
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.
Allow to show help document to specified object or text.
Definition IHelpViewer.h:45
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 ShowHelp(const QString &contextText, const istd::IPolymorphic *contextObjectPtr) override
Show some help information for specified context.
icomp::CComponentBase BaseClass
Base interface for all used interfaces and implementations.
Pointer wrapper providing automatic deleting pointed object during destruction.
Definition TDelPtr.h:21
This package contains Qt implementations related to Document/View concept.