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
helpbrowsersupport.h
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
4#ifndef HELPBROWSERSUPPORT_H
5#define HELPBROWSERSUPPORT_H
6
7#include <QtCore/QtGlobal>
8
9QT_BEGIN_NAMESPACE
10
11class QNetworkAccessManager;
12class QObject;
13class QString;
14class QByteArray;
15class QUrl;
16
17// Provide helper functions for feeding the QtHelp data stored in the help database
18// into various browsers.
20{
21public:
27
28 static QString msgError404();
29 static QString msgPageNotFound();
30 static QString msgAllDocumentationSets();
31 static QString msgLoadError(const QUrl &url);
32 static QString msgHtmlErrorPage(const QUrl &url);
33
34 static ResolveUrlResult resolveUrl(const QUrl &url, QUrl *targetUrl,
35 QByteArray *data);
36 static QByteArray fileDataForLocalUrl(const QUrl &url);
37
38 // Create an instance of QNetworkAccessManager for WebKit-type browsers.
39 static QNetworkAccessManager *createNetworkAccessManager(QObject *parent = nullptr);
40};
41
42QT_END_NAMESPACE
43
44#endif // HELPBROWSERSUPPORT_H
static QNetworkAccessManager * createNetworkAccessManager(QObject *parent=nullptr)
static QByteArray fileDataForLocalUrl(const QUrl &url)
static QString msgAllDocumentationSets()
static QString msgLoadError(const QUrl &url)
static QString msgPageNotFound()
static ResolveUrlResult resolveUrl(const QUrl &url, QUrl *targetUrl, QByteArray *data)
static QString msgHtmlErrorPage(const QUrl &url)
static QString msgError404()
static HelpEngineWrapper & instance()
QNetworkReply * createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData=nullptr) override
Returns a new QNetworkReply object to handle the operation op and request originalReq.
HelpNetworkAccessManager(QObject *parent)
void abort() override
Aborts the operation immediately and close down any network connections still open.
HelpNetworkReply(const QNetworkRequest &request, const QByteArray &fileData, const QString &mimeType)
qint64 bytesAvailable() const override
Returns the number of bytes that are available for reading.
qint64 readData(char *data, qint64 maxlen) override
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an...
HelpRedirectNetworkReply(const QNetworkRequest &request, const QUrl &newUrl)
qint64 readData(char *, qint64) override
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an...
void abort() override
Aborts the operation immediately and close down any network connections still open.
static QT_BEGIN_NAMESPACE const char g_htmlPage[]
Combined button and popup list for selecting options.
#define TRACE_OBJ
Definition tracer.h:34