23 , m_webHitTestResult(webHitTestResult)
25 QQmlEngine::setObjectOwnership(
this, QQmlEngine::JavaScriptOwnership);
30 return !m_webHitTestResult.
imageUrl().isEmpty();
45 return m_webHitTestResult.
isNull();
50 return !m_webHitTestResult.
linkUrl().isEmpty();
55 return !m_webHitTestResult.
mediaUrl().isEmpty();
70 return m_webHitTestResult.
tagName();
75 const QUrl base = m_webHitTestResult.
baseUrl();
76 return QString::fromUtf8(base.toEncoded());
86 const QUrl link = m_webHitTestResult.
linkUrl();
87 return QString::fromUtf8(link.toEncoded());
92 const QUrl image = m_webHitTestResult.
imageUrl();
93 return QString::fromUtf8(image.toEncoded());
98 const QUrl media = m_webHitTestResult.
mediaUrl();
99 return QString::fromUtf8(media.toEncoded());
104 return m_webHitTestResult.
pos();
QString imageUrl
Gets the url of image on which the context menu is requested.
Q_INVOKABLE bool mediaPaused() const
Checks if the context menu requested on media element is paused.
Q_INVOKABLE bool isLink() const
Checks if the context menu is requested on a link.
QmlWebHitTestResult(const WebHitTestResult &webHitTestResult, QObject *parent=nullptr)
QString linkUrl
Gets the link url on which the context menu is requested.
QString baseUrl
Gets the base url on which the context menu is requested.
QString linkTitle
Gets the link title on which the context menu is requested.
Q_INVOKABLE bool isNull() const
Checks if the context menu is requested on null element.
Q_INVOKABLE bool isMedia() const
Checks if the context menu is requested on a media element.
QPointF viewportPos
Gets the viewport position at which the context menu is requested.
QPoint pos
Gets the position at which the context menu is requested.
QString tagName
Gets the tagName of the element on which the context menu is requested.
Q_INVOKABLE bool isImage() const
Checks if the context menu is requested on image.
Q_INVOKABLE bool mediaMuted() const
Checks if the context menu requested on media element is muted.
QString mediaUrl
Gets the url of media on which the context menu is requested.
Q_INVOKABLE bool isContentEditable() const
Checks if the context menu is requested on editable content.
Q_INVOKABLE bool isContentSelected() const
Checks if the context menu is requested on the selected content.
QPointF viewportPos() const
QString linkTitle() const
bool isContentSelected() const
bool isContentEditable() const