Messagelib

webhittestresult.h
1/*
2 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7/* ============================================================
8 * QupZilla - QtWebEngine based browser
9 * SPDX-FileCopyrightText: 2015 David Rosca <nowrep@gmail.com>
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
33namespace WebEngineViewer
34{
35class WebHitTestResultPrivate;
36/**
37 * @brief The WebHitTestResult class
38 */
39class WEBENGINEVIEWER_EXPORT WebHitTestResult
40{
41public:
43 WebHitTestResult(const QPoint &pos, const QUrl &pageUrl, const QVariant &result);
46
47 [[nodiscard]] QString alternateText() const;
48 [[nodiscard]] QRect boundingRect() const;
49 [[nodiscard]] QUrl imageUrl() const;
50 [[nodiscard]] bool isContentEditable() const;
51 [[nodiscard]] bool isContentSelected() const;
52 [[nodiscard]] bool isNull() const;
53 [[nodiscard]] QString linkTitle() const;
54 [[nodiscard]] QUrl linkUrl() const;
55 [[nodiscard]] QUrl mediaUrl() const;
56 [[nodiscard]] bool mediaPaused() const;
57 [[nodiscard]] bool mediaMuted() const;
58 [[nodiscard]] QPoint pos() const;
59 [[nodiscard]] QString tagName() const;
60 [[nodiscard]] QUrl pageUrl() const;
61
62 WebHitTestResult &operator=(const WebHitTestResult &webHit);
63
64private:
65 std::unique_ptr<WebHitTestResultPrivate> const d;
66};
67}
68Q_DECLARE_METATYPE(WebEngineViewer::WebHitTestResult)
The WebHitTestResult class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:55:44 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.