Messagelib

webhittestresult.h
1 /*
2  SPDX-FileCopyrightText: 2016-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 /* ============================================================
8  * QupZilla - QtWebEngine based browser
9  * SPDX-FileCopyrightText: 2015 David Rosca <[email protected]>
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program. If not, see <https://www.gnu.org/licenses/>.
23  * ============================================================ */
24 #pragma once
25 
26 #include "webengineviewer_export.h"
27 #include <QRect>
28 #include <QString>
29 #include <QUrl>
30 #include <QVariant>
31 #include <memory>
32 
33 namespace WebEngineViewer
34 {
35 class WebHitTestResultPrivate;
36 /**
37  * @brief The WebHitTestResult class
38  */
39 class WEBENGINEVIEWER_EXPORT WebHitTestResult
40 {
41 public:
43  WebHitTestResult(const QPoint &pos, const QUrl &pageUrl, const QVariant &result);
44  WebHitTestResult(const WebHitTestResult &other);
46 
47  Q_REQUIRED_RESULT QString alternateText() const;
48  Q_REQUIRED_RESULT QRect boundingRect() const;
49  Q_REQUIRED_RESULT QUrl imageUrl() const;
50  Q_REQUIRED_RESULT bool isContentEditable() const;
51  Q_REQUIRED_RESULT bool isContentSelected() const;
52  Q_REQUIRED_RESULT bool isNull() const;
53  Q_REQUIRED_RESULT QString linkTitle() const;
54  Q_REQUIRED_RESULT QUrl linkUrl() const;
55  Q_REQUIRED_RESULT QUrl mediaUrl() const;
56  Q_REQUIRED_RESULT bool mediaPaused() const;
57  Q_REQUIRED_RESULT bool mediaMuted() const;
58  Q_REQUIRED_RESULT QPoint pos() const;
59  Q_REQUIRED_RESULT QString tagName() const;
60  Q_REQUIRED_RESULT QUrl pageUrl() const;
61 
62  WebHitTestResult &operator=(const WebHitTestResult &webHit);
63 
64 private:
65  std::unique_ptr<WebHitTestResultPrivate> const d;
66 };
67 }
68 Q_DECLARE_METATYPE(WebEngineViewer::WebHitTestResult)
The WebHitTestResult class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:04:55 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.