本文整理汇总了C++中MythUISearchDialog类的典型用法代码示例。如果您正苦于以下问题:C++ MythUISearchDialog类的具体用法?C++ MythUISearchDialog怎么用?C++ MythUISearchDialog使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MythUISearchDialog类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetMythMainWindow
void GameUI::searchStart(void)
{
MythGenericTree *parent = m_gameUITree->GetCurrentNode()->getParent();
if (parent != NULL)
{
QStringList childList;
QList<MythGenericTree*>::iterator it;
QList<MythGenericTree*> *children = parent->getAllChildren();
for (it = children->begin(); it != children->end(); ++it)
{
MythGenericTree *child = *it;
childList << child->getString();
}
MythScreenStack *popupStack =
GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDialog = new MythUISearchDialog(popupStack,
tr("Game Search"), childList, true, "");
if (searchDialog->Create())
{
connect(searchDialog, SIGNAL(haveResult(QString)),
SLOT(searchComplete(QString)));
popupStack->AddScreen(searchDialog);
}
else
delete searchDialog;
}
}
示例2: tr
void Ripper::searchAlbum()
{
QString msg = tr("Select an Album");
QStringList searchList = MusicMetadata::fillFieldList("album");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDlg = new MythUISearchDialog(popupStack, msg, searchList, false, "");
if (!searchDlg->Create())
{
delete searchDlg;
return;
}
connect(searchDlg, SIGNAL(haveResult(QString)), SLOT(setAlbum(QString)));
popupStack->AddScreen(searchDlg);
}
示例3: GetMythMainWindow
void ImportNative::showList(const QString &caption, QString &value,
const char *slot)
{
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDialog = new
MythUISearchDialog(popupStack, caption, m_searchList, true, value);
if (!searchDialog->Create())
{
delete searchDialog;
searchDialog = NULL;
return;
}
connect(searchDialog, SIGNAL(haveResult(QString)), this, slot);
popupStack->AddScreen(searchDialog);
}
示例4: tr
void EditMetadataDialog::searchCompilationArtist()
{
QString msg = tr("Select a Compilation Artist");
QStringList searchList = Metadata::fillFieldList("compilation_artist");
QString s = m_metadata->CompilationArtist();
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDlg = new MythUISearchDialog(popupStack, msg, searchList, false, s);
if (!searchDlg->Create())
{
delete searchDlg;
return;
}
connect(searchDlg, SIGNAL(haveResult(QString)), SLOT(setCompArtist(QString)));
popupStack->AddScreen(searchDlg);
}
示例5: query
void Ripper::chooseBackend(void)
{
QStringList hostList;
// get a list of hosts with a directory defined for the 'Music' storage group
MSqlQuery query(MSqlQuery::InitCon());
QString sql = "SELECT DISTINCT hostname "
"FROM storagegroup "
"WHERE groupname = 'Music'";
if (!query.exec(sql) || !query.isActive())
MythDB::DBError("Ripper::chooseBackend get host list", query);
else
{
while(query.next())
{
hostList.append(query.value(0).toString());
}
}
if (hostList.isEmpty())
{
LOG(VB_GENERAL, LOG_ERR, "Ripper::chooseBackend: No backends found");
return;
}
QString msg = tr("Select where to save tracks");
MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
MythUISearchDialog *searchDlg = new MythUISearchDialog(popupStack, msg, hostList, false, "");
if (!searchDlg->Create())
{
delete searchDlg;
return;
}
connect(searchDlg, SIGNAL(haveResult(QString)), SLOT(setSaveHost(QString)));
popupStack->AddScreen(searchDlg);
}