mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
right menu context
This commit is contained in:
parent
d5af210785
commit
c17a4d9b74
|
@ -1742,6 +1742,25 @@ void ArticleView::contextMenuRequested( QPoint const & pos )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QUrl imageUrl;
|
||||||
|
if( !popupView && menuData.mediaType ()==QWebEngineContextMenuData::MediaTypeImage)
|
||||||
|
{
|
||||||
|
imageUrl = menuData.mediaUrl ();
|
||||||
|
if( !imageUrl.isEmpty() )
|
||||||
|
{
|
||||||
|
menu.addAction( ui.definition->pageAction( QWebEnginePage::CopyImageToClipboard ) );
|
||||||
|
saveImageAction = new QAction( tr( "Save &image..." ), &menu );
|
||||||
|
menu.addAction( saveImageAction );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !popupView && ( targetUrl.scheme() == "gdau"
|
||||||
|
|| Dictionary::WebMultimediaDownload::isAudioUrl( targetUrl ) ) )
|
||||||
|
{
|
||||||
|
saveSoundAction = new QAction( tr( "Save s&ound..." ), &menu );
|
||||||
|
menu.addAction( saveSoundAction );
|
||||||
|
}
|
||||||
|
|
||||||
QString selectedText = ui.definition->selectedText();
|
QString selectedText = ui.definition->selectedText();
|
||||||
QString text = selectedText.trimmed();
|
QString text = selectedText.trimmed();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue