本文整理汇总了C++中ProgramInfo::GetRecordingID方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramInfo::GetRecordingID方法的具体用法?C++ ProgramInfo::GetRecordingID怎么用?C++ ProgramInfo::GetRecordingID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramInfo
的用法示例。
在下文中一共展示了ProgramInfo::GetRecordingID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendEvent
/**
* Send a message back to all objects that have requested creation of
* a specific preview.
*
* \param[in] pginfo The program info structure from which the preview
* was generated.
* \param[in] eventname The name of the event being sent to all
* listeners. This will always be one of PREVIEW_FAILED,
* PREVIEW_QUEUED, or PREVIEW_SUCCESS.
* \param[in] filename For a SUCCESS message, this is the name of the
* newly generated preview file. For a QUEUED message, this
* is an empty string. For a FAILED message, this will be
* the internal key value.
* \param[in] token The token specified by the listener when it
* requested the preview generation.
* \param[in] msg A text string giving more information about the
* processing of the event.
* \param[in] dt For a PREVIEW_SUCCESS message, this is the the last
* modified time of the preview file. For the other
* messages, this is a null datetime.
*/
void PreviewGeneratorQueue::SendEvent(
const ProgramInfo &pginfo,
const QString &eventname,
const QString &filename, const QString &token, const QString &msg,
const QDateTime &dt)
{
QStringList list;
list.push_back(QString::number(pginfo.GetRecordingID()));
list.push_back(filename);
list.push_back(msg);
list.push_back(dt.toUTC().toString(Qt::ISODate));
list.push_back(token);
QMutexLocker locker(&m_lock);
QSet<QObject*>::iterator it = m_listeners.begin();
for (; it != m_listeners.end(); ++it)
{
MythEvent *e = new MythEvent(eventname, list);
QCoreApplication::postEvent(*it, e);
}
}