本文整理汇总了C++中MythMainWindow::RemoteScreenShot方法的典型用法代码示例。如果您正苦于以下问题:C++ MythMainWindow::RemoteScreenShot方法的具体用法?C++ MythMainWindow::RemoteScreenShot怎么用?C++ MythMainWindow::RemoteScreenShot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythMainWindow
的用法示例。
在下文中一共展示了MythMainWindow::RemoteScreenShot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetScreenShot
void MythFEXML::GetScreenShot(HTTPRequest *pRequest)
{
pRequest->m_eResponseType = ResponseTypeFile;
// Optional Parameters
int nWidth = pRequest->m_mapParams[ "width" ].toInt();
int nHeight = pRequest->m_mapParams[ "height" ].toInt();
QString sFormat = pRequest->m_mapParams[ "format" ];
if (sFormat.isEmpty())
sFormat = "png";
if (sFormat != "jpg" && sFormat != "png")
{
LOG(VB_GENERAL, LOG_ERR, "Invalid screen shot format: " + sFormat);
return;
}
LOG(VB_GENERAL, LOG_INFO,
QString("Screen shot requested (%1x%2), format %3")
.arg(nWidth).arg(nHeight).arg(sFormat));
QString sFileName = QString("/%1/myth-screenshot-XML.%2")
.arg(gCoreContext->GetSetting("ScreenShotPath","/tmp"))
.arg(sFormat);
MythMainWindow *window = GetMythMainWindow();
window->RemoteScreenShot(sFileName, nWidth, nHeight);
pRequest->m_sFileName = sFileName;
}