本文整理汇总了C++中Video::getWebpage方法的典型用法代码示例。如果您正苦于以下问题:C++ Video::getWebpage方法的具体用法?C++ Video::getWebpage怎么用?C++ Video::getWebpage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video
的用法示例。
在下文中一共展示了Video::getWebpage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: copyWebPage
void MediaView::copyWebPage() {
Video *video = playlistModel->activeVideo();
if (!video) return;
QString address = video->getWebpage();
QApplication::clipboard()->setText(address);
QString message = tr("You can now paste the YouTube link into another application");
MainWindow::instance()->showMessage(message);
}
示例2: openWebPage
void MediaView::openWebPage() {
Video *video = playlistModel->activeVideo();
if (!video) return;
media->pause();
QString url =
video->getWebpage() + QLatin1String("&t=") + QString::number(media->position() / 1000);
QDesktopServices::openUrl(url);
}
示例3: shareViaFacebook
void MediaView::shareViaFacebook() {
Video *video = playlistModel->activeVideo();
if (!video) return;
QUrl url("https://www.facebook.com/sharer.php");
QUrlQuery q;
q.addQueryItem("t", video->getTitle());
q.addQueryItem("u", video->getWebpage());
url.setQuery(q);
QDesktopServices::openUrl(url);
}
示例4: shareViaTwitter
void MediaView::shareViaTwitter() {
Video *video = playlistModel->activeVideo();
if (!video) return;
QUrl url("https://twitter.com/intent/tweet");
QUrlQuery q;
q.addQueryItem("via", "minitubeapp");
q.addQueryItem("text", video->getTitle());
q.addQueryItem("url", video->getWebpage());
url.setQuery(q);
QDesktopServices::openUrl(url);
}
示例5: shareViaEmail
void MediaView::shareViaEmail() {
Video *video = playlistModel->activeVideo();
if (!video) return;
QUrl url("mailto:");
QUrlQuery q;
q.addQueryItem("subject", video->getTitle());
const QString body = video->getTitle() + "\n" + video->getWebpage() + "\n\n" +
tr("Sent from %1").arg(Constants::NAME) + "\n" + Constants::WEBSITE;
q.addQueryItem("body", body);
url.setQuery(q);
QDesktopServices::openUrl(url);
}