Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
rooturlschemehandler.h
Go to the documentation of this file.
1// Author: Sergey Linev <S.Linev@gsi.de>
2// Date: 2017-06-29
3// Warning: This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
4
5/*************************************************************************
6 * Copyright (C) 1995-2023, Rene Brun and Fons Rademakers. *
7 * All rights reserved. *
8 * *
9 * For the licensing terms see $ROOTSYS/LICENSE. *
10 * For the list of contributors see $ROOTSYS/README/CREDITS. *
11 *************************************************************************/
12
13#ifndef ROOT_UrlSchemeHandler
14#define ROOT_UrlSchemeHandler
15
16#include <QWebEngineUrlSchemeHandler>
17
18class THttpServer;
19
21 Q_OBJECT
22
23 QWebEngineUrlRequestJob *fRequest{nullptr};
24
25public:
26 UrlRequestJobHolder(QWebEngineUrlRequestJob *req);
27
28 QWebEngineUrlRequestJob *req() const { return fRequest; }
29
30 void reset();
31
32public slots:
33
34 void onRequestDeleted(QObject *obj);
35
36};
37
38// ===============================================================
39
40
42 Q_OBJECT
43protected:
44
45 THttpServer *fServer{nullptr}; ///< server instance which should handle requests
46
47public:
48 QString MakeFullUrl(THttpServer *serv, const QString &url);
49
50 void requestStarted(QWebEngineUrlRequestJob *request) override;
51};
52
53
54#endif
THttpServer * fServer
server instance which should handle requests
QString MakeFullUrl(THttpServer *serv, const QString &url)
Returns fully qualified URL, required to open in QWindow.
void requestStarted(QWebEngineUrlRequestJob *request) override
Start processing of emulated HTTP request in WebEngine scheme handler Either one reads file or redire...
Online http server for arbitrary ROOT application.
Definition THttpServer.h:31
Class UrlRequestJobHolder Required to monitor state of QWebEngineUrlRequestJob Qt can delete object a...
QWebEngineUrlRequestJob * req() const
void onRequestDeleted(QObject *obj)
destroyed signal handler
void reset()
Reset holder.
QWebEngineUrlRequestJob * fRequest