Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
helpviewerimpl.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
6
8#include "tracer.h"
9
10#include <QtCore/QCoreApplication>
11
12#include <QtGui/QMouseEvent>
13
15
16const QString HelpViewerImpl::AboutBlank =
17 QCoreApplication::translate("HelpViewer", "<title>about:blank</title>");
18
19const QString HelpViewerImpl::LocalHelpFile =
20 "qthelp://org.qt-project.qtassistant.%1%2%3/qtassistant/assistant-quick-guide.html"_L1.arg(
21 QString::number(QT_VERSION_MAJOR), QString::number(QT_VERSION_MINOR),
22 QString::number(QT_VERSION_PATCH));
23
24const QString HelpViewerImpl::PageNotFoundMessage =
25 QCoreApplication::translate("HelpViewer", "<title>Error 404...</title><div "
26 "align=\"center\"><br><br><h1>The page could not be found.</h1><br><h3>'%1'"
27 "</h3></div>");
28
29HelpViewerImpl::~HelpViewerImpl()
30{
32 delete d;
33}
34
35// -- public slots
36
37void HelpViewerImpl::home()
38{
40 setSource(HelpEngineWrapper::instance().homePage());
41}
42
43// -- private slots
44
45void HelpViewerImpl::setLoadFinished()
46{
47 emit sourceChanged(source());
48}
49
50// -- private
51
52bool HelpViewerImpl::handleForwardBackwardMouseButtons(QMouseEvent *event)
53{
55 if (event->button() == Qt::XButton1) {
56 backward();
57 return true;
58 }
59
60 if (event->button() == Qt::XButton2) {
61 forward();
62 return true;
63 }
64
65 return false;
66}
67
68QT_END_NAMESPACE
Combined button and popup list for selecting options.
#define TRACE_OBJ
Definition tracer.h:34