本文整理汇总了C++中ProgramInfo::GetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramInfo::GetTitle方法的具体用法?C++ ProgramInfo::GetTitle怎么用?C++ ProgramInfo::GetTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramInfo
的用法示例。
在下文中一共展示了ProgramInfo::GetTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getRecordingList
void RecordingSelector::getRecordingList(void)
{
ProgramInfo *p;
m_recordingList = RemoteGetRecordedList(-1);
m_categories.clear();
if (m_recordingList && !m_recordingList->empty())
{
vector<ProgramInfo *>::iterator i = m_recordingList->begin();
for ( ; i != m_recordingList->end(); ++i)
{
p = *i;
// ignore live tv and deleted recordings
if (p->GetRecordingGroup() == "LiveTV" ||
p->GetRecordingGroup() == "Deleted")
{
i = m_recordingList->erase(i);
--i;
continue;
}
if (m_categories.indexOf(p->GetTitle()) == -1)
m_categories.append(p->GetTitle());
}
}
}
示例2: HandleAllRecordings
void LookerUpper::HandleAllRecordings()
{
QMap< QString, ProgramInfo* > recMap;
QMap< QString, uint32_t > inUseMap = ProgramInfo::QueryInUseMap();
QMap< QString, bool > isJobRunning = ProgramInfo::QueryJobsRunning(JOB_COMMFLAG);
ProgramList progList;
LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );
for( int n = 0; n < (int)progList.size(); n++)
{
ProgramInfo *pginfo = new ProgramInfo(*(progList[n]));
if (pginfo->GetInetRef().isEmpty() ||
(!pginfo->GetSubtitle().isEmpty() &&
(pginfo->GetSeason() == 0) &&
(pginfo->GetEpisode() == 0)))
{
QString msg = QString("Looking up: %1 %2").arg(pginfo->GetTitle())
.arg(pginfo->GetSubtitle());
VERBOSE(VB_IMPORTANT, msg);
m_busyRecList.append(pginfo);
m_metadataFactory->Lookup(pginfo, false, false);
}
}
}
示例3: CopyRuleInetrefsToRecordings
void LookerUpper::CopyRuleInetrefsToRecordings()
{
QMap< QString, ProgramInfo* > recMap;
QMap< QString, uint32_t > inUseMap = ProgramInfo::QueryInUseMap();
QMap< QString, bool > isJobRunning = ProgramInfo::QueryJobsRunning(JOB_COMMFLAG);
ProgramList progList;
LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );
for( int n = 0; n < (int)progList.size(); n++)
{
ProgramInfo *pginfo = new ProgramInfo(*(progList[n]));
if (pginfo && pginfo->GetInetRef().isEmpty())
{
RecordingRule *rule = new RecordingRule();
rule->m_recordID = pginfo->GetRecordingRuleID();
rule->Load();
if (!rule->m_inetref.isEmpty())
{
QString msg = QString("%1").arg(pginfo->GetTitle());
if (!pginfo->GetSubtitle().isEmpty())
msg += QString(": %1").arg(pginfo->GetSubtitle());
msg += " has no inetref, but its recording rule does. Copying...";
LOG(VB_GENERAL, LOG_INFO, msg);
pginfo->SaveInetRef(rule->m_inetref);
}
delete rule;
}
delete pginfo;
}
}
示例4: HandleAllRecordings
void LookerUpper::HandleAllRecordings(bool updaterules)
{
QMap< QString, ProgramInfo* > recMap;
QMap< QString, uint32_t > inUseMap = ProgramInfo::QueryInUseMap();
QMap< QString, bool > isJobRunning = ProgramInfo::QueryJobsRunning(JOB_COMMFLAG);
m_updaterules = updaterules;
ProgramList progList;
LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );
for( int n = 0; n < (int)progList.size(); n++)
{
ProgramInfo *pginfo = new ProgramInfo(*(progList[n]));
if ((pginfo->GetRecordingGroup() != "Deleted") &&
(pginfo->GetRecordingGroup() != "LiveTV") &&
(pginfo->GetInetRef().isEmpty() ||
(!pginfo->GetSubtitle().isEmpty() &&
(pginfo->GetSeason() == 0) &&
(pginfo->GetEpisode() == 0))))
{
QString msg = QString("Looking up: %1 %2").arg(pginfo->GetTitle())
.arg(pginfo->GetSubtitle());
LOG(VB_GENERAL, LOG_INFO, msg);
m_busyRecList.append(pginfo);
m_metadataFactory->Lookup(pginfo, true, false, false);
}
else
delete pginfo;
}
}
示例5: ShowPrevious
/**
* \brief Show the previous recordings for this recording rule
*/
void ScheduleCommon::ShowPrevious(void) const
{
ProgramInfo *pginfo = GetCurrentProgram();
if (!pginfo)
return;
ShowPrevious(pginfo->GetRecordingRuleID(), pginfo->GetTitle());
}
示例6: ShowDeleteOldSeriesMenu
void ProgLister::ShowDeleteOldSeriesMenu(void)
{
ProgramInfo *pi = GetCurrent();
if (!pi)
return;
QString message = tr("Delete all episodes of '%1'?").arg(pi->GetTitle());
ShowOkPopup(message, this, SLOT(DeleteOldSeries(bool)), true);
}
示例7: updateRecordingList
void RecordingSelector::updateRecordingList(void)
{
if (!m_recordingList || m_recordingList->size() == 0)
return;
m_recordingButtonList->Reset();
if (m_categorySelector)
{
ProgramInfo *p;
vector<ProgramInfo *>::iterator i = m_recordingList->begin();
for ( ; i != m_recordingList->end(); i++)
{
p = *i;
if (p->GetTitle() == m_categorySelector->GetValue() ||
m_categorySelector->GetValue() == tr("All Recordings"))
{
MythUIButtonListItem* item = new MythUIButtonListItem(
m_recordingButtonList,
p->GetTitle() + " ~ " +
p->GetScheduledStartTime().toString("dd MMM yy (hh:mm)"));
item->setCheckable(true);
if (m_selectedList.indexOf((ProgramInfo *) p) != -1)
{
item->setChecked(MythUIButtonListItem::FullChecked);
}
else
{
item->setChecked(MythUIButtonListItem::NotChecked);
}
item->SetData(qVariantFromValue(p));
}
qApp->processEvents();
}
}
m_recordingButtonList->SetItemCurrent(m_recordingButtonList->GetItemFirst());
titleChanged(m_recordingButtonList->GetItemCurrent());
}
示例8: ShowUpcoming
/**
* \brief Show the upcoming recordings for this title
*/
void ScheduleCommon::ShowUpcoming(void) const
{
ProgramInfo *pginfo = GetCurrentProgram();
if (!pginfo)
return;
if (pginfo->GetChanID() == 0 &&
pginfo->GetRecordingRuleID() > 0)
return ShowUpcomingScheduled();
ShowUpcoming(pginfo->GetTitle(), pginfo->GetSeriesID());
}
示例9: titleChanged
void RecordingSelector::titleChanged(MythUIButtonListItem *item)
{
ProgramInfo *p;
p = qVariantValue<ProgramInfo *>(item->GetData());
if (!p)
return;
if (m_titleText)
m_titleText->SetText(p->GetTitle());
if (m_datetimeText)
m_datetimeText->SetText(p->GetScheduledStartTime()
.toString("dd MMM yy (hh:mm)"));
if (m_descriptionText)
{
m_descriptionText->SetText(
((!p->GetSubtitle().isEmpty()) ? p->GetSubtitle() + "\n" : "") +
p->GetDescription());
}
if (m_filesizeText)
{
m_filesizeText->SetText(formatSize(p->GetFilesize() / 1024));
}
if (m_cutlistImage)
{
if (p->HasCutlist())
m_cutlistImage->Show();
else
m_cutlistImage->Hide();
}
if (m_previewImage)
{
// try to locate a preview image
if (QFile::exists(p->GetPathname() + ".png"))
{
m_previewImage->SetFilename(p->GetPathname() + ".png");
m_previewImage->Load();
}
else
{
m_previewImage->SetFilename("blank.png");
m_previewImage->Load();
}
}
}
示例10: getRecordingList
void RecordingSelector::getRecordingList(void)
{
ProgramInfo *p;
m_recordingList = RemoteGetRecordedList(true);
m_categories.clear();
if (m_recordingList && m_recordingList->size() > 0)
{
vector<ProgramInfo *>::iterator i = m_recordingList->begin();
for ( ; i != m_recordingList->end(); i++)
{
p = *i;
// we can't handle recordings that have to be streamed to us
if (p->GetPlaybackURL(false, true).startsWith("myth://"))
{
VERBOSE(VB_FILE,
QString("MythArchive cannot handle this file because it isn't available locally - %1")
.arg(p->GetPlaybackURL(false, true)));
i = m_recordingList->erase(i);
i--;
continue;
}
// ignore live tv and deleted recordings
if (p->GetRecordingGroup() == "LiveTV" ||
p->GetRecordingGroup() == "Deleted")
{
i = m_recordingList->erase(i);
i--;
continue;
}
if (m_categories.indexOf(p->GetTitle()) == -1)
m_categories.append(p->GetTitle());
}
}
}
示例11: ShowPrevious
/**
* \brief Show the previous recordings for this recording rule
*/
void ScheduleCommon::ShowPrevious(void) const
{
ProgramInfo *pginfo = GetCurrentProgram();
if (!pginfo)
return;
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
ProgLister *pl = new ProgLister(mainStack, pginfo->GetRecordingRuleID(),
pginfo->GetTitle());
if (pl->Create())
mainStack->AddScreen(pl);
else
delete pl;
}
示例12: DeleteOldSeries
void ProgLister::DeleteOldSeries(bool ok)
{
ProgramInfo *pi = GetCurrent();
if (!ok || !pi)
return;
MSqlQuery query(MSqlQuery::InitCon());
query.prepare("DELETE FROM oldrecorded "
"WHERE title = :TITLE AND future = 0");
query.bindValue(":TITLE", pi->GetTitle());
if (!query.exec())
MythDB::DBError("ProgLister::DeleteOldSeries -- delete", query);
ScheduledRecording::signalChange(0);
FillItemList(true);
}
示例13: ShowUpcomingScheduled
/**
* \brief Show the upcoming recordings for this recording rule
*/
void ScheduleCommon::ShowUpcomingScheduled(void) const
{
ProgramInfo *pginfo = GetCurrentProgram();
if (!pginfo)
return;
RecordingInfo ri(*pginfo);
uint id;
if ((id = ri.GetRecordingRuleID()) == 0)
return ShowUpcoming(pginfo->GetTitle(), pginfo->GetSeriesID());
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
ProgLister *pl = new ProgLister(mainStack, plRecordid,
QString::number(id), "");
if (pl->Create())
mainStack->AddScreen(pl);
else
delete pl;
}
示例14: HandleAllRecordingRules
void LookerUpper::HandleAllRecordingRules()
{
m_updaterules = true;
vector<ProgramInfo *> recordingList;
RemoteGetAllScheduledRecordings(recordingList);
for( int n = 0; n < (int)recordingList.size(); n++)
{
ProgramInfo *pginfo = new ProgramInfo(*(recordingList[n]));
if (pginfo->GetInetRef().isEmpty())
{
QString msg = QString("Looking up: %1 %2").arg(pginfo->GetTitle())
.arg(pginfo->GetSubtitle());
LOG(VB_GENERAL, LOG_INFO, msg);
m_busyRecList.append(pginfo);
m_metadataFactory->Lookup(pginfo, false, false);
}
}
}
示例15: FillItemList
//.........这里部分代码省略.........
else if (m_type == plStoredSearch) // stored search
{
MSqlQuery query(MSqlQuery::InitCon());
query.prepare("SELECT fromclause, whereclause FROM customexample "
"WHERE rulename = :RULENAME;");
query.bindValue(":RULENAME", qphrase);
if (query.exec() && query.next())
{
QString fromc = query.value(0).toString();
QString wherec = query.value(1).toString();
where = QString("WHERE channel.visible = 1 "
" AND program.endtime > :PGILSTART "
" AND ( %1 ) ").arg(wherec);
if (!fromc.isEmpty())
where = fromc + ' ' + where;
}
}
else if (m_type == plPreviouslyRecorded)
{
if (m_recid && !m_title.isEmpty())
{
where = QString("WHERE recordid = %1 OR title = :MTITLE ")
.arg(m_recid);
bindings[":MTITLE"] = m_title;
}
else if (!m_title.isEmpty())
{
where = QString("WHERE title = :MTITLE ");
bindings[":MTITLE"] = m_title;
}
else if (m_recid)
{
where = QString("WHERE recordid = %1 ").arg(m_recid);
}
}
ProgramInfo selected;
const ProgramInfo *selectedP = (restorePosition) ? GetCurrent() : NULL;
if (selectedP)
{
selected = *selectedP;
selectedP = &selected;
}
int selectedOffset =
m_progList->GetCurrentPos() - m_progList->GetTopItemPos();
m_progList->Reset();
m_itemList.clear();
if (m_type == plPreviouslyRecorded)
{
LoadFromOldRecorded(m_itemList, where, bindings);
}
else
{
LoadFromScheduler(m_schedList);
LoadFromProgram(m_itemList, where, bindings, m_schedList, oneChanid);
}
const QRegExp prefixes(
tr("^(The |A |An )",
"Regular Expression for what to ignore when sorting"));
for (uint i = 0; i < m_itemList.size(); i++)
{
ProgramInfo *s = m_itemList[i];
s->sortTitle = (m_type == plTitle) ? s->GetSubtitle() : s->GetTitle();
s->sortTitle.remove(prefixes);
}
if (m_type == plNewListings || m_titleSort)
{
SortList(kTitleSort, m_reverseSort);
if (m_type != plPreviouslyRecorded)
{
// Prune to one per title
QString curtitle;
ProgramList::iterator it = m_itemList.begin();
while (it != m_itemList.end())
{
if ((*it)->sortTitle != curtitle)
{
curtitle = (*it)->sortTitle;
++it;
}
else
{
it = m_itemList.erase(it);
}
}
}
}
if (!m_titleSort)
SortList(GetSortBy(), m_reverseSort);
if (updateDisp)
UpdateDisplay(selectedP, selectedOffset);
}